body {
    width: auto;
    margin: 0 auto;
    background-color: #6038D3;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Dela Gothic One', sans-serif;
}

.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 300;
}

.popup-content {
    width: 50%;
    background-color: #6038D3;
    padding: 32px;
    border: 4px solid black;
    border-radius: 24px;
    text-align: center;
    color: white;
}
  
.popup-content h1 {
    font-size: 48px;
    margin-bottom: 32px;
    font-family: 'Dela Gothic One', sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.popup-content p {
    font-size: 24px;
    margin-bottom: 40px;
    font-family: 'Inter', sans-serif;
    letter-spacing: 1px;
}
  
.popup-content button {
    background-color: #008D5E;
    border: 4px solid black;
    border-radius: 24px;
    padding: 20px 40px;
    font-size: 32px;
    color: white;
    cursor: pointer;
    font-family: 'Dela Gothic One', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
}

#fixedMenu {
    position: fixed;
    top: 0;
    left: 0;
    padding: 2.4vh; 
    display: flex;
    align-items: center;
    justify-content: start;
    width: 100%;
    gap: 2.4vh; 
    z-index: 200;
}

.menuSection {
    display: flex;
    align-items: center;
    gap: 1.6vh; 
}

.menuSection img {
    width: 3.64vw; 
    height: 3.64vw; 
}

#counter1, #counter2, #counter3 {
    font-size: 2.29vw; 
    color: white;
    text-shadow: 
        -0.21vw 0 0 black,  
        0.21vw 0 0 black,
        0 -0.21vw 0 black,
        0 0.21vw 0 black;
}
#firstScreen {
    height: 120vh;
    display: flex;
    flex-direction: row;
    align-items: end;
    justify-content: center;
}

#bubbles {
    justify-content: center;
    position: absolute;
    display: flex;
    z-index: 100;
    top: -160px;
    gap: 3%;
    align-items: end;
}

#bubbleFirst, #bubbleThird  {
    margin-bottom: -10px;
}

#pipeFirst, #pipeThird {
    background-image: url('../images/bigTube.svg');
    position: relative;
    width: 474px;
    height: 0;
    padding-top: 816px;
    clip-path: polygon(32% 0%, 71% 0%, 100% 100%, 0% 100%);
    overflow: hidden;
}
#graffityFirst{
    position: absolute;
    z-index: 100;
    margin-top: -800px;
}
#graffitySecond {
    position: absolute;
    z-index: 100;
    margin-top: -400px;
}
#graffityThird{
    position: absolute;
    z-index: 100;
    margin-top: -625px;
}
#graffityFourth {
    position: absolute;
    z-index: 100;
    margin-top: -400px;
    margin-left: 46px;
}
#graffityFifth{
    position: absolute;
    z-index: 100;
    margin-top: -822px;
}
#graffitySixth {
    position: absolute;
    z-index: 100;
    margin-top: -347px;
}
#pipeSecond {
    background-image: url('../images/smallTube.svg');
    position: relative;
    width: 412px;
    height: 0;
    padding-top: 627px;
    clip-path: polygon(29% 0%, 68% 0%, 100% 100%, 0% 100%);
    overflow: hidden;
}

/* Второй экран */

#secondScreen {
    width: auto;
    display: flex;
    flex-direction: row;
}
#utilityRoom {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
#leftPartUtility {
    display: flex;
    flex-direction: row;
}
#groupKnobLine {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}
#knobSmall {
    width: 61px;
    height: 187px;
    background-image: url('../images/knobSmall.svg');
}
#lineSmall {
    width: 115px;
    height: 31px;
    background-image: url('../images/lineSmall.svg');
}
#rightPartUtility {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: -52%;
    margin-left: -4%;
    gap: 0.6vh;
}
#groupKnobShield {
    width: 335px;
    height: 262px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}
#knobMedium {
    width: 61px;
    height: 256px;
    background-image: url('../images/knobMedium.svg');
}
#Shield {
    width: 216px;
    height: 262px;
    background-image: url('../images/shield.svg');
}
#resourcesRoom {
    width: 770px;
    height: 700px;
    background-image: url('../images/roomBackground.svg');
    border: solid black 4px;
    border-top: none;
}
#alertRoundFirst {
    z-index: 100;
    position: absolute;
    left: 64%;
    bottom: -900px;
    pointer-events: none; /* отключение взаимодействия с элементом */
}
#robotHand {
    width: 688px;
    height: 402px;
    background-image: url('../images/robotHand.svg');
    margin-left: 6vw;
    margin-top: -0.8vh;
}
#boxes {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: -200px;
    margin-left: -2%;
    justify-content: center;
}
.box {
    cursor: pointer;
}
#boxFirst {
    width: 217px;
    height: 177px;
    background-image: url('../images/boxSmall.svg');
    margin-left: 310px;
    border: solid black 4px;
    border-bottom: none;
}
#boxFirst svg {
    margin: 15%;
}
#downLine {
    display: flex;
    flex-direction: row;
    align-items: end;
}
#boxSecond {
    width: 306px;
    height: 205px;
    background-image: url('../images/boxMedium.svg');
    border: solid black 4px;
    border-right: none;
}
#boxSecond svg {
    margin: 13%;
}
#boxThird {
    width: 396px;
    height: 324px;
    background-image: url('../images/boxLarge.svg');
    border: solid black 4px;
}
#boxThird svg {
    margin: 15%;
}

/* Третий экран */

#thirdScreen {
    display: flex;
    flex-direction: row;
    margin: 2% 0;
    gap: 2vw;
}
#alertArrowLeft {
    position: absolute;
    display: none;
    z-index: 100;
    left: 22vw;
    bottom: -1700px;
    pointer-events: none; /* отключение взаимодействия с элементом */
}
#alertArrowRight {
    position: absolute;
    display: none;
    z-index: 100;
    right: 22vw;
    bottom: -1700px;
    pointer-events: none; /* отключение взаимодействия с элементом */
}
#leftPart {
    width: 292px;
    height: 781px;
    background-image: url('../images/conveyorLeft.svg');
}
#centerPart {
    position: relative;
    width: 758px;
    height: 775px;
    background-image: url('../images/flask.svg');
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}
#heartCenter {
    width: 308px;
    height: 308px;
    background-image: url('../images/Step0.svg');
    margin-right: 10px;
}
#resurses {
    position: absolute;
    width: 100%;
    height: 100%;
}
#resurses img {
    cursor: move;
}
#resourse1 {
    position: absolute;
    top: 162px;
    left: 50px;
}
#resourse2 {
    position: absolute;
    top: 20px;
    left: 310px;
}
#resourse3 {
    position: absolute;
    top: 162px;
    left: 600px;
}
#resourse4 {
    position: absolute;
    bottom: 162px;
    left: 50px;
}
#resourse5 {
    position: absolute;
    bottom: 30px;
    left: 340px;
}
#resourse6 {
    position: absolute;
    bottom: 162px;
    left: 600px;
}
#rightPart {
    width: 292px;
    height: 781px;
    background-image: url('../images/conveyorRight.svg');
}
#pillsLeft {
    width: 120px;
    margin-left: 40px;
    margin-top: 60px;
    gap: 22px;
    flex-direction: column;
    display: flex;
}
#pillsRight {
    width: 120px;
    margin-left: 130px;
    margin-top: 60px;
    gap: 22px;
    flex-direction: column;
    display: flex;
}
#topKnob {
    width: 752px;
    height: 61px;
    display: flex;
    justify-content: space-between;
}
#bottomKnob {
    width: 752px;
    height: 61px;
    display: flex;
    justify-content: space-between;
}

/* Четвертый экран */

#fourthScreen {
    width: 80%;
    height: 300px;
    background-image: url('../images/pipeBackground.svg');
    border: solid black 4px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 72px;
}
#alertRoundSecond {
    z-index: 100;
    position: absolute;
    left: 40%;
    bottom: -220%;
    pointer-events: none; /* отключение взаимодействия с элементом */
}
#details {
    width: 96%;
    align-items: center;
    position: absolute;
    display: flex;
    flex-direction: column;
    z-index: 100;
    gap: 1vh;
}
#ventPartDetails {
    width: 80%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin-top: 2%;
}
#clockPartDetails {
    width: 86%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}
#tubeFirst, #tubeThird {
    width: 312px;
    height: 388px;
    background-image: url('../images/pipePink.svg');
    border: solid black 4px;
}
#tubeFirst img {
    margin-top: 113px;
    margin-left: 22px;
}
#tubeSecond img {
    margin-top: 200px;
    margin-left: -18px;
}
#tubeThird img {
    margin-top: 113px;
    margin-left: 43px;
    rotate: 90deg;
}
#tubeSecond {
    width: 312px;
    height: 388px;
    background-image: url('../images/pipeBlue.svg');
    border: solid black 4px;
}

/* Пятый экран */

#fifthScreen {
    display: flex;
    flex-direction: column;
    margin-top: 180px;
    margin-left: 2vw;
}
#fifthScreen img {
    margin-top: -200px;
    margin-left: -76px;
    margin-right: 22px;
}
#groupFirst, #groupSecond, #groupThird{
    display: none;
    position: absolute;
    bottom: 70%;
    left: 50%;
    transform: translateX(-50%);
}
#cars {
    display: flex;
    flex-direction: row;
    gap: 1vw;
}
#carFirst, #carThird {
    width: 393px;
    height: 238px;
    background-image: url('../images/darkCar.svg');
    position: relative;
}
#carSecond {
    width: 393px;
    height: 238px;
    background-image: url('../images/lightCar.svg');
    position: relative;
}

/* Медиа-запрос для экранов до 1440px */
@media only screen and (max-width: 1440px) {
    #tubeThird,
    #tubeThird img,
    #carThird,
    #groupThird,
    #alertRoundFirst,
    #alertRoundSecond,
    #alertArrowLeft,
    #alertArrowRight {
        display: none; 
    }
}

/* Медиа-запрос для экранов до 1366px */
@media only screen and (max-width: 1366px) {
    .menuSection img {
        width: 7vw; 
        height: 7vw; 
    }
    #counter1, #counter2, #counter3 {
        font-size: 4.5vw; 
        text-shadow: 
            -0.42vw 0 0 black,  
            0.42vw 0 0 black,
            0 -0.42vw 0 black,
            0 0.42vw 0 black;
    }
    #pipeThird,
    #graffityFifth,
    #graffitySixth,
    #bubbleThird,
    #carThird,
    #groupThird {
        display: none; 
    }
    #secondScreen {
        flex-direction: column;
        height: auto;
        align-items: center;
    }
    #thirdScreen {
        flex-direction: column;
        align-items: center;
        margin: 0;
    }
    #leftPart, #rightPart {
        rotate: 270deg;
        margin: -30%;
    }
}

/* Медиа-запрос для экранов до 1024px */
@media only screen and (max-width: 1024px) {

    .menuSection img {
        width: 8vw; 
        height: 8vw; 
    }
    
    #tubeSecond,
    #tubeSecond img,
    #carSecond,
    #groupSecond,
    #bubbleSecond {
        display: none; 
    }
}
/* Медиа-запрос для экранов до 768px */
@media only screen and (max-width: 768px) {
    #counter1, #counter2, #counter3 {
        font-size: 6vw;
        text-shadow: 
            -0.84vw 0 0 black,  
            0.84vw 0 0 black,
            0 -0.84vw 0 black,
            0 0.84vw 0 black;
    }
    #pipeSecond,
    #pipeThird,
    #graffityThird,
    #graffityFourth {
        display: none; 
    }
}