/* single-player-controls.css - Video Game Style Difficulty Selector */

.mobile-difficulty-selector {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    user-select: none;
    transition: all 0.3s ease;

    /* Video game control bar */
    background: linear-gradient(180deg,
        rgba(20, 25, 40, 0.95) 0%,
        rgba(12, 15, 28, 0.98) 100%);
    border: 2px solid rgba(100, 150, 255, 0.35);
    border-radius: 16px;
    padding: 0.625rem;

    /* Glow effect */
    box-shadow:
        0 0 30px rgba(100, 150, 255, 0.15),
        0 10px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

/* Accent line at top */
.mobile-difficulty-selector::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        rgba(100, 180, 255, 0.7),
        transparent);
    border-radius: 0 0 2px 2px;
}

/* Difficulty Toggle Container */
.difficulty-toggles {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
}

/* Difficulty Buttons - Video Game Style */
.difficulty-btn {
    padding: 0.75rem 1.5rem;
    min-width: 110px;
    font-family: 'Rajdhani', 'Share Tech', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    text-align: center;

    /* Button styling */
    background: linear-gradient(180deg,
        rgba(50, 60, 80, 0.8) 0%,
        rgba(35, 45, 65, 0.8) 100%);
    border: 1px solid rgba(100, 150, 255, 0.2);
    border-radius: 8px;
    color: rgba(180, 200, 255, 0.9);
    cursor: pointer;

    /* Subtle inner glow */
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.2);

    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

/* Hover state */
.difficulty-btn:hover {
    background: linear-gradient(180deg,
        rgba(65, 80, 110, 0.9) 0%,
        rgba(50, 65, 95, 0.9) 100%);
    border-color: rgba(100, 180, 255, 0.4);
    color: #ffffff;
    transform: translateY(-2px);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 15px rgba(100, 150, 255, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Active/Selected state */
.difficulty-btn.active {
    background: linear-gradient(180deg,
        rgba(80, 120, 200, 0.9) 0%,
        rgba(60, 100, 180, 0.9) 100%);
    border-color: rgba(100, 180, 255, 0.6);
    color: #ffffff;
    text-shadow: 0 0 10px rgba(100, 200, 255, 0.5);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 20px rgba(100, 150, 255, 0.3),
        0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Active indicator line */
.difficulty-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        rgba(150, 200, 255, 0.9),
        transparent);
    border-radius: 2px 2px 0 0;
}

/* Click/Press state */
.difficulty-btn:active {
    transform: translateY(0);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ========================================
   LIGHT THEME
   ======================================== */

.theme-light .mobile-difficulty-selector {
    background: linear-gradient(180deg,
        rgba(245, 248, 255, 0.98) 0%,
        rgba(235, 240, 255, 0.98) 100%);
    border-color: rgba(100, 120, 200, 0.3);
    box-shadow:
        0 0 20px rgba(100, 120, 200, 0.1),
        0 10px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.theme-light .mobile-difficulty-selector::before {
    background: linear-gradient(90deg,
        transparent,
        rgba(100, 120, 200, 0.5),
        transparent);
}

.theme-light .difficulty-btn {
    background: linear-gradient(180deg,
        rgba(220, 230, 250, 0.9) 0%,
        rgba(200, 215, 245, 0.9) 100%);
    border-color: rgba(100, 120, 200, 0.2);
    color: rgba(50, 60, 100, 0.9);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 2px 8px rgba(0, 0, 0, 0.1);
}

.theme-light .difficulty-btn:hover {
    background: linear-gradient(180deg,
        rgba(230, 240, 255, 0.95) 0%,
        rgba(215, 225, 250, 0.95) 100%);
    border-color: rgba(100, 150, 200, 0.4);
    color: #1a1a2e;
}

.theme-light .difficulty-btn.active {
    background: linear-gradient(180deg,
        rgba(100, 140, 220, 0.95) 0%,
        rgba(80, 120, 200, 0.95) 100%);
    border-color: rgba(80, 130, 200, 0.6);
    color: #ffffff;
    text-shadow: none;
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */

@media (max-width: 640px) {
    .mobile-difficulty-selector {
        bottom: 1rem;
        width: 95%;
        max-width: 420px;
        padding: 0.5rem;
    }

    .difficulty-toggles {
        gap: 0.375rem;
        width: 100%;
    }

    .difficulty-btn {
        flex: 1;
        min-width: unset;
        padding: 0.625rem 0.5rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 380px) {
    .mobile-difficulty-selector {
        padding: 0.375rem;
    }

    .difficulty-toggles {
        gap: 0.25rem;
    }

    .difficulty-btn {
        padding: 0.5rem 0.375rem;
        font-size: 0.75rem;
        border-radius: 6px;
    }
}

@media (max-width: 320px) {
    .difficulty-btn {
        padding: 0.5rem 0.25rem;
        font-size: 0.7rem;
    }
}

/* ========================================
   TOUCH OPTIMIZATIONS
   ======================================== */

@media (hover: none) {
    .difficulty-btn {
        -webkit-tap-highlight-color: transparent;
    }

    .difficulty-btn:active {
        background: linear-gradient(180deg,
            rgba(70, 90, 130, 0.95) 0%,
            rgba(55, 75, 115, 0.95) 100%);
    }

    .theme-light .difficulty-btn:active {
        background: linear-gradient(180deg,
            rgba(180, 200, 240, 0.95) 0%,
            rgba(160, 180, 230, 0.95) 100%);
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes button-glow {
    0%, 100% {
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.15),
            0 0 20px rgba(100, 150, 255, 0.3),
            0 4px 15px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.15),
            0 0 30px rgba(100, 180, 255, 0.4),
            0 4px 15px rgba(0, 0, 0, 0.3);
    }
}

.difficulty-btn.active {
    animation: button-glow 3s ease-in-out infinite;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .difficulty-btn,
    .mobile-difficulty-selector {
        transition: none;
    }

    .difficulty-btn.active {
        animation: none;
    }
}

/* ========================================
   FOCUS & ACCESSIBILITY
   ======================================== */

.difficulty-btn:focus {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(100, 150, 255, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.difficulty-btn:focus:not(:focus-visible) {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.2);
}

/* High Contrast Mode */
@media (forced-colors: active) {
    .difficulty-btn {
        border: 2px solid currentColor;
    }

    .difficulty-btn.active {
        border-width: 3px;
    }
}

/* ========================================
   GAME OVER DIALOG BUTTONS
   ======================================== */

.single-player-game-over .button {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: 2px solid rgba(100, 150, 255, 0.3);
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.single-player-game-over .button.primary {
    background: linear-gradient(180deg,
        rgba(80, 120, 200, 0.9) 0%,
        rgba(60, 100, 180, 0.9) 100%);
    border-color: rgba(100, 180, 255, 0.5);
    color: #ffffff;
    box-shadow:
        0 0 15px rgba(100, 150, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.single-player-game-over .button.primary:hover {
    background: linear-gradient(180deg,
        rgba(100, 140, 220, 0.95) 0%,
        rgba(80, 120, 200, 0.95) 100%);
    box-shadow:
        0 0 25px rgba(100, 180, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.single-player-game-over .button.secondary {
    background: linear-gradient(180deg,
        rgba(50, 55, 70, 0.9) 0%,
        rgba(35, 40, 55, 0.9) 100%);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(200, 210, 230, 0.9);
}

.single-player-game-over .button.secondary:hover {
    background: linear-gradient(180deg,
        rgba(60, 65, 85, 0.95) 0%,
        rgba(45, 50, 70, 0.95) 100%);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Light Theme Game Over Buttons */
.theme-light .single-player-game-over .button.primary {
    background: linear-gradient(180deg,
        rgba(80, 120, 200, 0.95) 0%,
        rgba(60, 100, 180, 0.95) 100%);
    color: #ffffff;
}

.theme-light .single-player-game-over .button.secondary {
    background: linear-gradient(180deg,
        rgba(220, 225, 240, 0.95) 0%,
        rgba(200, 210, 230, 0.95) 100%);
    border-color: rgba(100, 120, 180, 0.2);
    color: #1a1a2e;
}

/* ==========================================
   LANDSCAPE MODE - COMPACT DIFFICULTY SELECTOR
   ========================================== */

@media (max-height: 500px) and (orientation: landscape) {
    .mobile-difficulty-selector {
        padding: 0.25rem 0.375rem;
        border-radius: 10px;
        bottom: 0.5rem;
    }
    
    .difficulty-toggles {
        gap: 0.25rem;
    }
    
    .difficulty-btn {
        padding: 0.35rem 0.75rem;
        min-width: auto;
        font-size: 0.7rem;
        border-radius: 6px;
    }
    
    .difficulty-btn.active {
        padding: 0.35rem 0.75rem;
    }
}
