/* --- СБРОС СТИЛЕЙ --- */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: Arial, sans-serif;
    background-color: #4dd0e1;
}

/* --- ФОН --- */
body {
    background-image: url('background.png'); 
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat; 
    position: relative;
}

/* --- ОБЛАКА --- */
.clouds-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 2; 
    pointer-events: none; 
}

.cloud {
    position: absolute;
    left: 0; 
    animation-name: moveClouds;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-fill-mode: both; 
    opacity: 0.85; 
}

.cloud1 { width: 250px; top: 5%; animation-duration: 30s; animation-delay: 0s; }
.cloud2 { width: 150px; top: 20%; animation-duration: 45s; animation-delay: 7s; }
.cloud3 { width: 350px; top: 10%; animation-duration: 60s; animation-delay: 15s; }
.cloud4 { width: 120px; top: 40%; animation-duration: 25s; animation-delay: 3s; }
.cloud5 { width: 200px; top: 25%; animation-duration: 40s; animation-delay: 22s; }
.cloud6 { width: 180px; top: 60%; animation-duration: 35s; animation-delay: 10s; }
.cloud7 { width: 280px; top: 15%; animation-duration: 50s; animation-delay: 30s; }
.cloud8 { width: 130px; top: 35%; animation-duration: 28s; animation-delay: 18s; }

@keyframes moveClouds {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-400px); }
}

/* --- СОЛНЦЕ --- */
.sun-logo {
    position: fixed;
    top: 30px; 
    right: 150px; 
    height: 200px; 
    width: auto;
    z-index: 1; 
    filter: drop-shadow(0px 0px 20px rgba(255, 230, 0, 0.5)); 
}

/* --- ОСНОВНОЙ КОНТЕЙНЕР --- */
.content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; 
    height: 100vh;
    padding-top: 10px; 
    box-sizing: border-box;
    position: relative;
    z-index: 3; 
}

/* --- ЛОГОТИП --- */
.logo {
    width: 1000px; 
    max-width: 95vw; 
    filter: drop-shadow(0px 10px 15px rgba(0,0,0,0.3)); 
    transform-origin: bottom center; 
    animation: 
        dropAndBounce 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards,
        levitate 6s ease-in-out infinite 2s; 
    position: relative; 
    right: 0%; 
    margin-bottom: 20px; 
}

@keyframes dropAndBounce {
    0% { transform: translateY(-100vh) scale(1, 1); animation-timing-function: ease-in; }
    45% { transform: translateY(0) scale(1, 1); animation-timing-function: ease-out; }
    55% { transform: translateY(0) scale(1.15, 0.8); animation-timing-function: ease-in; }
    70% { transform: translateY(-40px) scale(0.95, 1.05); animation-timing-function: ease-out; }
    82% { transform: translateY(0) scale(1.05, 0.95); animation-timing-function: ease-in; }
    92% { transform: translateY(-10px) scale(1, 1); animation-timing-function: ease-out; }
    100% { transform: translateY(0) scale(1, 1); }
}

@keyframes levitate {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* --- МЕНЮ --- */
.menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px; 
    margin-top: -30px; 
}

/* --- БАЗОВЫЙ СТИЛЬ КНОПОК --- */
.menu-btn {
    display: block;
    background-color: #a2e2f5; 
    color: #ffffff; 
    font-family: Arial, sans-serif;
    font-weight: 900; 
    font-size: 55px; 
    text-shadow: 2px 2px 0px #73a6bd; 
    padding: 5px 30px; 
    border: 3px solid #3b4c5e; 
    border-radius: 4px;
    box-shadow: 4px 4px 0px #000000; 
    cursor: pointer;
    text-align: center;
    box-sizing: border-box; 
    width: fit-content; 
    
    opacity: 0;
    transform: translateX(-150%);
    animation: slideInLeft 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.btn-play { animation-delay: 1.2s; }
.btn-options { animation-delay: 1.4s; }
.btn-about { animation-delay: 1.6s; }
.btn-quit { animation-delay: 1.8s; }

@keyframes slideInLeft {
    0% { opacity: 0; transform: translateX(-150%); }
    100% { opacity: 1; transform: translateX(0); }
}

/* --- ВЕРСИЯ --- */
.version-text {
    position: fixed;
    bottom: 20px;
    right: 25px;
    color: white;
    font-family: 'Century Gothic', 'Questrial', sans-serif; /* НОВЫЙ ШРИФТ */
    font-weight: 900;
    font-size: 32px;
    z-index: 10;
}

/* ========================================= */
/* --- ВСПЛЫВАЮЩЕЕ ОКНО С BIGBOX.PNG --- */
/* ========================================= */
.modal {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); 
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-image: url('bigbox.png'); 
    background-size: 100% 100%; 
    background-repeat: no-repeat;
    background-position: center;
    width: 660px; 
    height: 506px; 
    background-color: transparent; 
    border: none; 
    box-shadow: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px; 
    box-sizing: border-box;
}

.modal-content h2 {
    color: white;
    margin-top: -20px; 
    font-size: 32px;
    text-shadow: 2px 2px 0px #000;
    margin-bottom: 20px;
}

/* Кнопки в модалке */
.modal-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px; 
}

.modal-buttons .menu-btn {
    font-size: 24px; 
    padding: 6px 20px;
    width: 260px; 
    opacity: 1;
    transform: none;
    animation: none;
    box-shadow: 0px 3px 0px #000000; 
}

.cancel-btn {
    background-color: #ff8a8a !important; 
    margin-top: 10px;
}

.cancel-btn:hover {
    background-color: #ff7070 !important;
}

/* --- СТИЛИ ДЛЯ ИНСТРУКЦИЙ --- */
.instructions-box {
    display: none; 
    color: white;
    font-size: 16px;
    line-height: 1.4; /* Улучшает читаемость */
    text-align: left;
    width: 100%;
    max-height: 350px; 
    overflow-y: auto; 
    padding: 0 20px;
    box-sizing: border-box;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.instructions-box p { margin: 10px 0; }
.instructions-box ol { margin: 10px 0; padding-left: 20px; }
.instructions-box li { margin-bottom: 8px; }

.instructions-box code {
    background-color: rgba(0, 0, 0, 0.4);
    padding: 2px 5px;
    border-radius: 3px;
    font-family: monospace;
    color: #a2e2f5;
}

.download-link {
    color: #a2e2f5;
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
}

.download-link:hover { color: white; }

.code-block {
    background-color: rgba(0, 0, 0, 0.6);
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    color: #a2e2f5;
    word-wrap: break-word;
    margin-top: 5px;
}

.back-btn {
    margin-top: 15px;
    font-size: 20px !important;
    padding: 5px 15px !important;
    width: 120px !important;
    background-color: #ff8a8a !important; 
}

.back-btn:hover { background-color: #ff7070 !important; }

/* --- АДАПТИВНОСТЬ --- */
@media (max-height: 900px) {
    .logo { width: 750px; margin-bottom: 10px; }
    .menu-btn { font-size: 40px; padding: 5px 20px; }
    .sun-logo { height: 150px; top: 20px; right: 100px; }
    .version-text { font-size: 24px; }
    
    .modal-content { width: 520px; height: 400px; }
    .modal-content h2 { font-size: 26px; margin-top: -10px; margin-bottom: 10px;}
    .modal-buttons .menu-btn { font-size: 20px; padding: 5px 15px; width: 220px; }
    .instructions-box { font-size: 14px; max-height: 250px; }
}