* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
    position: relative;
    overflow: hidden;
}

/* Фон джунглей */
.jungle-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('img/jungle.jpg') no-repeat center center;
    background-size: cover;
    filter: brightness(0.7) contrast(1.1);
    z-index: -2;
}

/* Затемнение для лучшей читаемости */
.jungle-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

.container {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    width: 95%;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.3),
        inset 0 2px 10px rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 1;
    margin: 20px;
}

h1 {
    font-size: 3rem;
    color: #2e7d32;
    margin-bottom: 25px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
    background: linear-gradient(45deg, #388e3c, #4caf50);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
    letter-spacing: 2px;
}

.game-container {
    position: relative;
    margin: 25px 0;
    background: linear-gradient(145deg, #e8f5e9, #c8e6c9);
    border-radius: 15px;
    padding: 15px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-board {
    border: 4px solid #388e3c;
    border-radius: 12px;
    background: linear-gradient(145deg, #a5d6a7, #c8e6c9);
    box-shadow:
        inset 0 0 25px rgba(0, 0, 0, 0.1),
        0 5px 15px rgba(0, 0, 0, 0.2);
    display: block;
}

.score-container {
    background: linear-gradient(135deg, #388e3c, #2e7d32);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin: 25px 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.score {
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.controls {
    margin: 25px 0;
}

#restart-btn {
    background: linear-gradient(135deg, #4caf50, #388e3c);
    color: white;
    border: none;
    padding: 18px 35px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.2),
        inset 0 2px 5px rgba(255, 255, 255, 0.3);
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

#restart-btn:hover {
    transform: translateY(-3px);
    box-shadow:
        0 12px 25px rgba(0, 0, 0, 0.3),
        inset 0 2px 5px rgba(255, 255, 255, 0.4);
    background: linear-gradient(135deg, #388e3c, #2e7d32);
}

#restart-btn:active {
    transform: translateY(0);
}

.instructions {
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(104, 159, 56, 0.1));
    border-radius: 15px;
    border-left: 4px solid #4caf50;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.05);
}

.instructions h3 {
    color: #2e7d32;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.instructions p {
    color: #555;
    line-height: 1.6;
    font-size: 1.1rem;
}

/* Адаптивность */
@media (max-width: 600px) {
    .container {
        padding: 25px;
        margin: 15px;
    }

    h1 {
        font-size: 2.2rem;
    }

    #game-board {
        width: 300px;
        height: 300px;
    }

    .score {
        font-size: 1.5rem;
    }

    #restart-btn {
        padding: 15px 25px;
        font-size: 1rem;
    }

    .instructions h3 {
        font-size: 1.1rem;
    }

    .instructions p {
        font-size: 0.95rem;
    }
}

/* Анимации */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 0.4s ease-in-out;
}

@keyframes appleGlow {
    0% { filter: drop-shadow(0 0 5px #ff5252); }
    50% { filter: drop-shadow(0 0 15px #ff5252); }
    100% { filter: drop-shadow(0 0 5px #ff5252); }
}

.apple-glow {
    animation: appleGlow 2s ease-in-out infinite;
}

.support-btn {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
    color: white;
    text-decoration: none;
    border: none;
    padding: 15px 25px;
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 5px 15px rgba(0, 0, 0, 0.2),
        inset 0 2px 5px rgba(255, 255, 255, 0.3);
    font-weight: bold;
    margin-top: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.support-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.3),
        inset 0 2px 5px rgba(255, 255, 255, 0.4);
    background: linear-gradient(135deg, #ff5252, #e53935);
    color: white;
    text-decoration: none;
}

/* Адаптивность для кнопок */
@media (max-width: 600px) {
    .controls {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .support-btn {
        margin-top: 0;
    }
}