@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&family=Comfortaa:wght@300..700&family=Exo+2:ital,wght@0,100..900;1,100..900&family=Fascinate&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Arial', sans-serif;
}

body {
    background: linear-gradient(135deg, #0c291f 0%, #143727 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-body h3{
    color: #c8e6c9;
    margin-bottom: 15px; 
    font-size: 18px;
}

footer {
    position: fixed;
    bottom: 0;
    height: 5vh;
    right: 0;
    width: 300px;
    color: whitesmoke;
    z-index: 1000;
    display: flex;
    
}


.bmo-body {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 100;
    cursor: pointer;
    transition: all 0.3s;
}

.bmo-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 70, 34, 0.9);
    color: #e0d4ff;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-family: 'Exo 2', sans-serif;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    border: 1px solid rgba(80, 240, 101, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    margin-bottom: 6px;
    z-index: 1000;
}

.bmo-body:hover .bmo-tooltip {
    opacity: 1;
}

.menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    z-index: 1000;
    display: flex;
    
}

.menu_handle {
    width: 30px;
    height: 100%;
    background: rgba(0, 0, 0, 0.801);
    backdrop-filter: blur(5px);
    color: yellow;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
    padding: 20px 0;

}

.menu_content {
    display: none;
    background: rgba(0, 0, 0, 0.801);
    flex-direction: column;
    align-items: center;
    width: 300px;
    height: 100%;
    transition: transform 0.3s ease, opacity 0.3s ease;

}

#langToggle{
    border: none;
}
.menu_content button {
    border: 2px solid #3d5a2c;
    margin-top: 20px;
    border-radius: 12px;
    padding: 10px;
    background-color: transparent;
    color: white;
    width: 85%;
    font-size: 15px;

}

.menu_content button:hover {
    border-color: #4caf50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}


.wrapper {
    width: 100%;
    max-width: 700px;
    height: 90%;
    background-color: #1a3c2f;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border: 1px solid #2d4a3c;
}

.wrapper_sea {
    width: 100%;
    max-width: 700px;
    height: 90%;
    background: linear-gradient(to bottom, #0a2463, #1e3a8a);
    border-radius: 16px;
    box-shadow: 0 10px 30px #16388c;
    overflow: hidden;
    border: 1px solid #0a2463;
}

.wrapper_run {
    width: 100%;
    max-width: 700px;
    height: 90%;
    background: linear-gradient(to bottom, #7b05d5, #912F40);
    border-radius: 16px;
    box-shadow: 0 10px 30px #702632;
    overflow: hidden;
    border: 1px solid #912F40;
}

.page {
    padding: 30px;
    background: linear-gradient(to bottom, #1e4730 0%, #1a3c2f 100%);
    position: relative;
    min-height: 600px;
}

.page_sea {
    padding: 30px;
    background: linear-gradient(to bottom, #0a2463 0%, #1e3a8a 100%);
    position: relative;
    min-height: 600px;
}

.page_run {
    padding: 30px;
    background: linear-gradient(to bottom, #8417a89e 0%, #C60021 100%);
    position: relative;
    min-height: 600px;
}

.timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}


.timer_title h1 {
    color: #d4edda;
    font-size: 2.8rem;
    text-align: center;
    font-family: 'Fascinate', cursive;
    margin-bottom: 10px;
    font-weight: 400;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.timer_title_sea h1 {
    color: #d4d5ed;
    font-size: 2.8rem;
    text-align: center;
    font-family: 'Fascinate', cursive;
    margin-bottom: 10px;
    font-weight: 400;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.timer_title_run h1 {
    color: #edead4;
    font-size: 2.8rem;
    text-align: center;
    font-family: 'Fascinate', cursive;
    margin-bottom: 10px;
    font-weight: 400;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Секция выбора пользователя */
.userchoose {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
    max-width: 700px;
}

.timechoose {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.timechoose button {
    width: 100px;
    height: 60px;
    background: linear-gradient(180deg, #2d5a42 0%, #234735 100%);
    border: 2px solid #2d5a42;
    border-radius: 12px;
    color: #e8f5e9;
    font-size: 1.4rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.timechoose_sea {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.timechoose_sea button {
    width: 100px;
    height: 60px;
    background: linear-gradient(180deg, rgba(56, 182, 255, 0.3) 0%, rgba(6, 86, 133, 0.3) 100%);
    border: 2px solid rgba(6, 86, 133, 0.3);
    border-radius: 12px;
    color: #e8f5e9;
    font-size: 1.4rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.timechoose_run {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.timechoose_run button {
    width: 100px;
    height: 60px;
    background: linear-gradient(180deg, rgba(255, 252, 56, 0.3) 0%, rgba(192, 161, 7, 0.3) 100%);
    border: 2px solid rgba(255, 252, 56, 0.3);
    border-radius: 12px;
    color: #e8f5e9;
    font-size: 1.4rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 8px rgba(255, 252, 56, 0.3);
}

.timechoose button:hover,
.timechoose button.active {
    background: linear-gradient(180deg, #356c4e 0%, #2a5640 100%);
    border-color: #4a7d62;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.timechoose button:active {
    background: linear-gradient(180deg, #234735 0%, #1c3d2d 100%);
    transform: translateY(1px);
}

.timechoose_sea button:hover,
.timechoose_sea button.active {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.3) 0%, rgba(56, 182, 255, 0.5) 100%);
    border-color: rgba(37, 99, 235, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.timechoose_sea button:active {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.3) 0%, rgba(10, 41, 107, 0.3) 100%);
    transform: translateY(1px);
}

.timechoose_run button:hover,
.timechoose_run button.active {
    background: linear-gradient(180deg, rgba(255, 252, 56, 0.683) 0%, rgba(192, 161, 7, 0.3) 100%);
    border-color: rgba(255, 252, 56, 0.683);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 252, 56, 0.3);
}

.timechoose_run button:active {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.3) 0%, rgba(10, 41, 107, 0.3) 100%);
    transform: translateY(1px);
}

.plant {
    display: flex;
    justify-content: center;
    font-family: 'Caveat', cursive;
}

.plant button {
    padding: 18px 40px;
    background: linear-gradient(180deg, #2e7d4d 0%, #266d41 100%);
    border: 2px solid #3d8b5c;
    border-radius: 12px;
    color: #f1f8e9;
    font-size: 1.4rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    max-width: 300px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.plant button:hover {
    background: linear-gradient(180deg, #348a55 0%, #2c7a4a 100%);
    border-color: #4a9a6a;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.timer_clock {
    font-size: 4rem;
    font-weight: 400;
    color: #c8e6c9;
    background: linear-gradient(135deg, #1e4a34 0%, #2a5a44 100%);
    padding: 5px 60px;
    border-radius: 16px;
    border: 2px solid #3a6b50;
    margin: 10px 0;
    letter-spacing: 2px;
    box-shadow:
        inset 0 0 15px rgba(0, 0, 0, 0.3),
        0 8px 20px rgba(0, 0, 0, 0.2);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.plant_sea {
    display: flex;
    justify-content: center;
    font-family: 'Caveat', cursive;
    align-items: center;
    flex-direction: column;
}

.plant_sea button {
    padding: 18px 40px;
    background: #ffcc00;
    color: #2a1b3d;
    border-radius: 12px;

    font-size: 1.4rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    max-width: 300px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.plant_sea button:hover {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.3) 0%, rgba(10, 41, 107, 0.3) 100%);
    border-color: rgba(10, 41, 107, 0.3);
    color: #ffcc00;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.timer_clock_sea {
    font-size: 4rem;
    font-weight: 400;
    color: #ffcc00 !important;

    background: linear-gradient(135deg, #011f5c 0%, #002775 100%);
    padding: 5px 60px;
    border-radius: 16px;
    border: 2px solid #113a8d;
    margin: 10px 0;
    letter-spacing: 2px;
    box-shadow:
        inset 0 0 15px rgba(0, 0, 0, 0.3),
        0 8px 20px rgba(0, 0, 0, 0.2);
    text-shadow: 0 2px 4px #f1cf47 !important;
    transition: all 0.3s ease;
}

.plant_run {
    display: flex;
    justify-content: center;
    font-family: 'Caveat', cursive;
    align-items: center;
    flex-direction: column;
}

.plant_run button {
    padding: 18px 40px;
    background: linear-gradient(180deg, rgb(255, 200, 0) 0%, rgba(222, 215, 3, 0.764) 100%);
    color: #a00e0e;
    border-radius: 12px;
    border-color: #dc1bf5c4;
    font-size: 1.4rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    max-width: 300px;
    box-shadow: 0 4px 8px rgba(251, 255, 0, 0.2);
}

.plant_run button:hover {
    background: linear-gradient(180deg, rgba(235, 139, 37, 0.678) 0%, rgba(223, 216, 10, 0.764) 100%);
    border-color: rgba(207, 194, 5, 0.718);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.timer_clock_run {
    font-size: 4rem;
    font-weight: 400;
    color: #ffcc00 !important;

    background: linear-gradient(135deg, #710075 0%, #5c013bba 100%);
    padding: 5px 60px;
    border-radius: 16px;
    margin: 10px 0;
    letter-spacing: 2px;
    box-shadow:
        inset 0 0 15px rgba(255, 0, 0, 0.156),
        0 8px 20px #5c013bba;
    text-shadow: 0 2px 4px #f1cf47 !important;
    transition: all 0.3s ease;
}


.plant_container {
    width: 300px;
    height: 300px;
    margin: 10px 0;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.plant_stages {
    position: relative;
    width: 100%;
    height: 100%;
}

.plant_stage {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.5s ease;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

.plant_stage.active {
    opacity: 1;
    animation: plantPulse 2s ease-in-out infinite;
}

@keyframes plantPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.timer_time {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.timer_time button {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e8f5e9;
    font-size: 24px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.timer_start {
    background: linear-gradient(180deg, #2e7d4d 0%, #266d41 100%);
}

.timer_reset {
    background: linear-gradient(180deg, #2d5a42 0%, #234735 100%);
}

.timer_stop {
    background: linear-gradient(180deg, #5d4037 0%, #4e342e 100%);
}

.timer_time button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.timer_time button:active {
    transform: scale(0.98);
}

.timer_time button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}
.break-modal {
    border: none;
    border-radius: 20px;
    padding: 0;
    background: rgba(10, 15, 20, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
    color: #fff;
    max-width: 780px;
    width: 95vw;
    margin: auto;
}

.break-modal::backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.break-modal-inner {
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
}

.break-timer-display {
    font-size: 1.5em;
    font-weight: 700;
    color: #f0c040;
    background: rgba(255, 255, 255, 0.08);
    padding: 10px 28px;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    letter-spacing: 0.3px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#gameSelector {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 20px 20px 16px;
    width: 100%;
    max-width: 480px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

#gameSelector p {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    font-size: 1.05em;
    margin: 0;
}

.game-buttons-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

#gameSelector button {
    padding: 12px 26px;
    font-size: 1em;
    font-weight: 600;
    border-radius: 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#gameSelector button:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

#gameSelector button:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.8);
}



#gameFrame {
    width: 100%;
    max-width: 700px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: #0a0f14;
    margin: 6px 0 2px;
}

#snakeIframe {
    width: 100%;
    height: 520px;
    border: none;
    border-radius: 12px;
    display: block;
}

.close-break-btn {
    margin-top: 8px;
    padding: 10px 32px;
    border-radius: 40px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.25s;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.close-break-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.close-break-btn:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 600px) {
    .break-modal-inner {
        padding: 24px 14px 20px;
        gap: 14px;
    }

    .break-timer-display {
        font-size: 1.25em;
        padding: 8px 20px;
    }

    #gameSelector {
        padding: 16px 12px 12px;
    }

    #gameSelector button {
        padding: 10px 18px;
        font-size: 0.9em;
    }

    #snakeIframe {
        height: 380px;
    }

    .game-buttons-row {
        gap: 8px;
    }
}

@media (max-width: 380px) {
    #gameSelector button {
        padding: 9px 14px;
        font-size: 0.82em;
    }
}