.tutorial-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 998;
    animation: fadeIn 0.3s ease-out;
}

.tutorial-modal {
    background: rgba(20, 0, 40, 0.96);
    backdrop-filter: blur(25px);
    border: 3px solid rgba(200, 100, 255, 0.5);
    border-radius: 24px;
    padding: 45px 50px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 
        0 35px 90px rgba(0, 0, 0, 0.75),
        0 0 60px rgba(200, 100, 255, 0.4),
        inset 0 0 50px rgba(200, 100, 255, 0.1);
    animation: modalSlideUp 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    padding: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close svg {
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.7);
}

.modal-close:hover {
    background: rgba(255, 50, 50, 0.2);
    border-color: rgba(255, 50, 50, 0.6);
    transform: rotate(90deg);
}

.modal-close:hover svg {
    color: #ff5050;
}

.tutorial-title {
    font-size: 32px;
    font-weight: 800;
    color: #c864ff;
    text-shadow: 0 0 25px rgba(200, 100, 255, 0.8);
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.tutorial-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.tutorial-section h3 {
    font-size: 18px;
    color: rgba(200, 100, 255, 0.9);
    margin-bottom: 15px;
    font-weight: 700;
}

/* ==========================
   GAME OVER MODAL - WITH ICON BUTTONS
========================== */

.game-over-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.93);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.game-over-modal {
    background: linear-gradient(145deg, rgba(15, 0, 35, 0.98), rgba(25, 0, 45, 0.98));
    backdrop-filter: blur(30px);
    border: 3px solid rgba(255, 50, 100, 0.5);
    border-radius: 32px;
    padding: 55px 50px 45px;
    max-width: 460px;
    width: 90%;
    text-align: center;
    box-shadow: 
        0 50px 120px rgba(0, 0, 0, 0.85),
        0 0 100px rgba(255, 50, 100, 0.4),
        inset 0 2px 80px rgba(255, 50, 100, 0.06);
    animation: modalSlideUp 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
}

@keyframes modalSlideUp {
    from { 
        opacity: 0; 
        transform: translateY(60px) scale(0.85);
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1);
    }
}

/* Close Button (X) - Top Right */
.game-over-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 38px;
    height: 38px;
    padding: 0;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.game-over-close svg {
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
}

.game-over-close:hover {
    background: rgba(255, 80, 80, 0.2);
    border-color: rgba(255, 80, 80, 0.6);
    transform: rotate(90deg) scale(1.05);
}

.game-over-close:hover svg {
    color: #ff6666;
}

.game-over-close:active {
    transform: rotate(90deg) scale(0.95);
}

/* Title - Gradient Pink/Red */
.game-over-title {
    font-size: clamp(32px, 5vw, 42px);
    font-weight: 900;
    background: linear-gradient(135deg, #ff3366 0%, #ff6699 50%, #ff99cc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 35px rgba(255, 51, 102, 0.5));
    margin-bottom: 12px;
    letter-spacing: 4px;
    text-transform: uppercase;
    line-height: 1.2;
}

/* Subtitle */
.game-over-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
    margin-bottom: 35px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Score Section - PURPLE/VIOLET gradient */
.game-over-score {
    margin: 0 0 38px;
}

.game-over-score-label {
    font-size: 11px;
    text-transform: uppercase;
    color: rgba(200, 100, 255, 0.7);
    letter-spacing: 3px;
    margin-bottom: 14px;
    font-weight: 700;
}

.game-over-score-value {
    font-size: clamp(52px, 8vw, 68px);
    font-weight: 900;
    background: linear-gradient(135deg, #c864ff 0%, #8b5cf6 50%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(200, 100, 255, 0.6));
    margin-bottom: 10px;
    line-height: 1;
    letter-spacing: -2px;
}

/* New High Score Badge - GOLD */
.new-high-score {
    display: inline-block;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.2));
    border: 2.5px solid rgba(255, 215, 0, 0.7);
    color: #ffd700;
    padding: 12px 26px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 18px;
    box-shadow: 
        0 0 35px rgba(255, 215, 0, 0.35),
        inset 0 0 30px rgba(255, 215, 0, 0.1);
    animation: newHighScorePulse 2s ease-in-out infinite;
}

@keyframes newHighScorePulse {
    0%, 100% {
        box-shadow: 
            0 0 30px rgba(255, 215, 0, 0.4),
            inset 0 0 30px rgba(255, 215, 0, 0.1);
        border-color: rgba(255, 215, 0, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 
            0 0 50px rgba(255, 215, 0, 0.7),
            inset 0 0 40px rgba(255, 215, 0, 0.2);
        border-color: rgba(255, 215, 0, 1);
        transform: scale(1.02);
    }
}

/* High Score Display - ORANGE gradient */
.high-score-display {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 2px solid rgba(255, 140, 0, 0.25);
}

.high-score-label {
    font-size: 11px;
    text-transform: uppercase;
    color: rgba(255, 160, 50, 0.7);
    letter-spacing: 2.5px;
    margin-bottom: 10px;
    font-weight: 700;
}

.high-score-value {
    font-size: clamp(34px, 5vw, 42px);
    font-weight: 900;
    background: linear-gradient(135deg, #ff8c00 0%, #ffa500 50%, #ffb347 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(255, 140, 0, 0.5));
    line-height: 1;
    letter-spacing: -1px;
}