/* ==========================================================================
   MAZE STUDIO - UNIVERSAL GRAPHICS & HARDWARE ADAPTIVE MODAL STYLES
   ========================================================================== */

/* Quick Graphics Pill (Navbar / HUD) */
.graphics-quick-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(18, 24, 38, 0.85);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: #ffffff;
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.22s ease;
    white-space: nowrap;
}

.graphics-quick-pill:hover {
    background: rgba(0, 240, 255, 0.15);
    border-color: #00f0ff;
    transform: translateY(-1.5px);
    box-shadow: 0 6px 18px rgba(0, 240, 255, 0.25);
}

.graphics-quick-pill svg {
    color: #00f0ff;
    flex-shrink: 0;
}

/* Modal Overlay */
.maze-graphics-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 14, 0.86);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.maze-graphics-modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Modal Card */
.maze-graphics-card {
    background: linear-gradient(180deg, #131926 0%, #0a0d16 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.14);
    border-radius: 22px;
    padding: 26px;
    width: 92%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(0, 240, 255, 0.1);
    transform: scale(0.94);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    color: #ffffff;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

.maze-graphics-modal-overlay.active .maze-graphics-card {
    transform: scale(1);
}

/* Modal Header */
.maze-graphics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.maze-graphics-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.maze-graphics-title-wrap svg {
    color: #00f0ff;
}

.maze-graphics-title-wrap h3 {
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: -0.2px;
    margin: 0;
}

.maze-graphics-close {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.maze-graphics-close:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.08);
}

/* Detected Device Box */
.maze-device-detected-box {
    background: rgba(0, 240, 255, 0.06);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.detected-label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #00f0ff;
    text-transform: uppercase;
}

.detected-val {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
}

/* Options Stack */
.maze-graphics-options {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.graphics-opt-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.graphics-opt-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateX(3px);
}

.graphics-opt-btn.selected {
    background: rgba(0, 240, 255, 0.12);
    border-color: #00f0ff;
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.2);
}

.opt-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.opt-name {
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: #ffffff;
}

.opt-desc {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.35;
}

.opt-badge {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    white-space: nowrap;
}

.opt-badge.ultra {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
    border-color: rgba(168, 85, 247, 0.4);
}

.opt-badge.high {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.4);
}

.opt-badge.medium {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.4);
}

.opt-badge.low {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.4);
}

.graphics-opt-btn.selected .opt-badge {
    background: #00f0ff;
    color: #040914;
    border-color: #00f0ff;
    font-weight: 900;
}

/* ==========================================================================
   GRAPHICS TIER PERFORMANCE OVERRIDES (CSS-LEVEL OPTIMIZATION)
   ========================================================================== */

/* Low-RAM / Battery Saver Mode (Low Tier) */
body.graphics-tier-low *,
body.low-ram-mode * {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    text-shadow: none !important;
}

body.graphics-tier-low .game-card,
body.graphics-tier-low .glass-panel,
body.graphics-tier-low .overlay-card {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

/* Ultra Tier Enhancements */
body.graphics-tier-ultra .game-card:hover {
    box-shadow: 0 16px 40px rgba(0, 240, 255, 0.25) !important;
}
