/* ==========================================================================
   Arcade Matrix // Master Game Control Panel Stylesheet
   ========================================================================== */

:root {
    --bg-main: #060810;
    --bg-surface: rgba(14, 19, 36, 0.75);
    --bg-surface-hover: rgba(22, 30, 58, 0.85);
    --bg-card: rgba(16, 22, 42, 0.7);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 240, 255, 0.35);
    --border-pink: rgba(255, 0, 127, 0.35);
    
    --primary-cyan: #00f0ff;
    --primary-blue: #3b82f6;
    --accent-pink: #ff007f;
    --accent-gold: #ffd700;
    --accent-green: #10b981;
    --accent-purple: #a855f7;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --font-heading: 'Orbitron', 'Kantumruy Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-pixel: 'Press Start 2P', monospace;
    --font-body: 'Inter', 'Kantumruy Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --shadow-glow-cyan: 0 0 25px rgba(0, 240, 255, 0.25);
    --shadow-glow-pink: 0 0 25px rgba(255, 0, 127, 0.25);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.5);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(0, 240, 255, 0.05) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(255, 0, 127, 0.05) 0%, transparent 45%),
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    line-height: 1.6;
}

/* Container */
.container {
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   Header & Control Panel Command Strip
   ========================================================================== */
.main-header {
    background: rgba(10, 14, 28, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glow);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    gap: 20px;
    flex-wrap: wrap;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px var(--primary-cyan));
    animation: iconPulse 3s ease-in-out infinite alternate;
}

@keyframes iconPulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 8px var(--primary-cyan)); }
    100% { transform: scale(1.08); filter: drop-shadow(0 0 16px var(--accent-pink)); }
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    background: linear-gradient(135deg, #ffffff 0%, var(--primary-cyan) 60%, var(--accent-pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.brand-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    font-family: var(--font-heading);
}

/* System Stats HUD in Header */
.system-hud {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hud-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 6px 14px;
    font-size: 0.75rem;
    font-family: var(--font-heading);
    display: flex;
    align-items: center;
    gap: 8px;
}

.hud-pill.status-online {
    border-color: rgba(16, 185, 129, 0.4);
    color: var(--accent-green);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-green);
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.quick-action-btn {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(0, 119, 255, 0.2));
    border: 1px solid var(--primary-cyan);
    color: var(--primary-cyan);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.quick-action-btn:hover {
    background: var(--primary-cyan);
    color: #000;
    box-shadow: 0 0 15px var(--primary-cyan);
    transform: translateY(-1px);
}

/* ==========================================================================
   Hero Featured Showcase (Bomberman Spotlight)
   ========================================================================== */
.hero-spotlight {
    margin: 28px 0;
}

.spotlight-card {
    background: linear-gradient(135deg, rgba(16, 24, 52, 0.85) 0%, rgba(26, 15, 38, 0.85) 100%);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 32px;
    align-items: center;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-card), var(--shadow-glow-cyan);
    position: relative;
    overflow: hidden;
}

.spotlight-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 0, 127, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.spotlight-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 0, 127, 0.18);
    border: 1px solid var(--accent-pink);
    color: #ff66b2;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.spotlight-title {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: 1px;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.2;
}

.spotlight-desc {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.spotlight-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.feature-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    color: #cbd5e1;
}

.spotlight-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.btn-launch-hero {
    background: linear-gradient(135deg, var(--primary-cyan), #0077ff);
    color: #050811;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1rem;
    letter-spacing: 1px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
    transition: all 0.25s ease;
    text-decoration: none;
}

.btn-launch-hero:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.8);
}

.btn-outline-hero {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-outline-hero:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #fff;
}

.spotlight-visual {
    position: relative;
    border-radius: var(--radius-md);
    background: #090d1a;
    border: 1px solid rgba(0, 240, 255, 0.3);
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
}

.spotlight-emoji-stage {
    font-size: 4.5rem;
    filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.6));
    animation: floatBounce 4s ease-in-out infinite alternate;
}

@keyframes floatBounce {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-10px) rotate(4deg); }
}

.spotlight-stats-mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
}

.mini-stat-box {
    background: rgba(0, 0, 0, 0.4);
    padding: 8px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.mini-stat-label {
    font-size: 0.65rem;
    color: var(--text-dim);
    font-family: var(--font-heading);
}

.mini-stat-val {
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--accent-gold);
    font-family: var(--font-heading);
}

/* ==========================================================================
   Control Bar & Filters
   ========================================================================== */
.controls-section {
    margin-bottom: 28px;
}

.search-toolbar {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 16px;
}

.search-box-wrapper {
    flex: 1;
    min-width: 280px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    background: rgba(6, 9, 18, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 42px 10px 42px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: var(--font-body);
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.search-shortcut {
    position: absolute;
    right: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--font-heading);
}

.toolbar-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sort-select {
    background: rgba(6, 9, 18, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-family: var(--font-body);
    cursor: pointer;
    outline: none;
}

.sort-select:focus {
    border-color: var(--primary-cyan);
}

/* Category Filter Tabs */
.category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
}

.category-tab {
    background: rgba(18, 24, 46, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.category-tab:hover {
    background: rgba(0, 240, 255, 0.1);
    color: var(--primary-cyan);
    border-color: rgba(0, 240, 255, 0.3);
}

.category-tab.active {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(0, 119, 255, 0.25));
    border-color: var(--primary-cyan);
    color: #fff;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
}

.tab-badge {
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: var(--radius-full);
}

/* ==========================================================================
   Games Grid System
   ========================================================================== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 22px;
    margin-bottom: 48px;
}

.game-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.game-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary-cyan);
    box-shadow: var(--shadow-card), 0 0 25px rgba(0, 240, 255, 0.2);
    background: var(--bg-surface-hover);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-badges {
    display: flex;
    gap: 6px;
    align-items: center;
}

.badge-genre {
    background: rgba(0, 240, 255, 0.12);
    color: var(--primary-cyan);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-flag {
    font-size: 0.65rem;
    font-family: var(--font-heading);
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-new {
    background: rgba(255, 0, 127, 0.2);
    color: #ff3399;
    border: 1px solid #ff3399;
}

.badge-hot {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid #f59e0b;
}

.badge-classic {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
    border: 1px solid #c084fc;
}

.btn-fav {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease;
}

.btn-fav:hover {
    transform: scale(1.2);
    color: var(--accent-gold);
}

.btn-fav.active {
    color: var(--accent-gold);
    filter: drop-shadow(0 0 6px var(--accent-gold));
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.game-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.3;
}

.game-desc {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-dim);
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.controls-chip {
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.72rem;
}

.card-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.btn-play-console {
    background: linear-gradient(135deg, var(--primary-cyan), #0077ff);
    color: #000;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 240, 255, 0.3);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-play-console:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.6);
}

.btn-standalone {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-standalone:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: #fff;
}

/* No Results State */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-surface);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-md);
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

/* ==========================================================================
   Embedded Arcade Cabinet Modal
   ========================================================================== */
#modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 4, 10, 0.92);
    backdrop-filter: blur(12px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#modal-overlay.active {
    display: flex;
    opacity: 1;
}

.arcade-bezel {
    width: 100%;
    max-width: 1160px;
    height: 92vh;
    background: #0d1120;
    border: 2px solid var(--primary-cyan);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 50px rgba(0, 240, 255, 0.4), inset 0 0 20px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    position: relative;
}

.arcade-bezel.fullscreen {
    max-width: 100vw;
    height: 100vh;
    border-radius: 0;
    border: none;
}

.bezel-header {
    background: #151a30;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 240, 255, 0.3);
}

.bezel-game-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bezel-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-cyan);
}

.bezel-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bezel-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: var(--font-heading);
    transition: all 0.2s ease;
}

.bezel-btn:hover {
    background: var(--primary-cyan);
    color: #000;
    border-color: var(--primary-cyan);
}

.bezel-btn-close {
    background: rgba(255, 0, 127, 0.2);
    border-color: var(--accent-pink);
    color: var(--accent-pink);
}

.bezel-btn-close:hover {
    background: var(--accent-pink);
    color: #fff;
    border-color: var(--accent-pink);
}

.bezel-screen-frame {
    flex: 1;
    position: relative;
    background: #000;
    width: 100%;
    height: 100%;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Footer */
.main-footer {
    border-top: 1px solid var(--border-subtle);
    padding: 32px 0;
    margin-top: 40px;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 900px) {
    .spotlight-card {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    .spotlight-visual {
        display: none;
    }
    .brand-title {
        font-size: 1.15rem;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 12px;
    }
    .spotlight-title {
        font-size: 1.4rem;
    }
    .spotlight-actions {
        flex-direction: column;
        width: 100%;
    }
    .btn-launch-hero, .btn-outline-hero {
        width: 100%;
        justify-content: center;
    }
    .games-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .system-hud {
        width: 100%;
        justify-content: space-between;
    }
    .arcade-bezel {
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    .bezel-header {
        padding: 8px 12px;
    }
    .bezel-title {
        font-size: 0.9rem;
    }
    .bezel-btn {
        padding: 5px 8px;
        font-size: 0.72rem;
    }
    .search-toolbar {
        flex-direction: column;
        gap: 10px;
    }
    .toolbar-controls {
        width: 100%;
        justify-content: flex-end;
    }
}
