@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Share+Tech+Mono&family=Inter:wght@300;400;500;600;700&display=swap');

/* --- CUSTOM VARIABLES --- */
:root {
    --bg-chassis: #12141c;
    --bg-screen: #0a0c10;
    --bg-card: rgba(26, 30, 40, 0.7);
    --bg-card-hover: rgba(35, 41, 55, 0.95);
    --border-tech: rgba(138, 149, 165, 0.15);
    
    /* Cyber Glowing Highlight Colors */
    --neon-cyan: #00f0ff;
    --neon-magenta: #ff007f;
    --neon-amber: #ff9f1c;
    --neon-green: #00ff66;
    
    --text-white: #eef1f6;
    --text-muted: #828d9c;
    
    /* Font stacks */
    --font-header: 'Orbitron', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
    --font-sans: 'Inter', sans-serif;
    
    /* Theme specs */
    --header-height: 50px; /* Slim status HUD bar */
    --border-radius-sm: 6px;
    --border-radius-md: 12px;
    --border-radius-lg: 24px;
    --transition-fast: 0.25s ease;
    --transition-smooth: 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    
    /* Neon Aura Glows */
    --shadow-soft: 0 15px 40px rgba(0, 0, 0, 0.5);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

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

html {
    scroll-behavior: smooth;
    background-color: #0c0d12;
    color: var(--text-white);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 20px;
    background: radial-gradient(circle at 50% 50%, #1e222b 0%, #0a0b0e 100%);
}

/* CRT Scanlines Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.08) 50%);
    background-size: 100% 3px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.5;
}

/* --- THE CHASSIS SCREEN NAVIGATION BAR --- */
.chassis-nav {
    background: rgba(16, 19, 26, 0.95);
    border-bottom: 1px solid var(--border-tech);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    gap: clamp(6px, 1.5vw, 20px);
    z-index: 90;
    overflow-x: auto;
    scrollbar-width: none;
}
.chassis-nav::-webkit-scrollbar {
    display: none;
}
.chassis-nav-link {
    font-family: var(--font-header);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid transparent;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    white-space: nowrap;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.chassis-nav-link:hover {
    color: var(--text-white);
    border-color: rgba(255,255,255,0.08);
    background: rgba(255, 255, 255, 0.02);
}
.chassis-nav-link.is-active {
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.05);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}
.chassis-nav-link.is-active.amber {
    color: var(--neon-amber);
    border-color: var(--neon-amber);
    background: rgba(255, 159, 28, 0.05);
    box-shadow: 0 0 10px rgba(255, 159, 28, 0.15);
}
.chassis-nav-link.is-active.magenta {
    color: var(--neon-magenta);
    border-color: var(--neon-magenta);
    background: rgba(255, 0, 127, 0.05);
    box-shadow: 0 0 10px rgba(255, 0, 127, 0.15);
}
.chassis-nav-link.is-active.green {
    color: var(--neon-green);
    border-color: var(--neon-green);
    background: rgba(0, 255, 102, 0.05);
    box-shadow: 0 0 10px rgba(0, 255, 102, 0.15);
}

/* --- PHYSICAL HANDHELD CONSOLE BEZEL FRAME --- */
.console-bezel {
    width: 100%;
    max-width: 1160px;
    background: linear-gradient(135deg, #272d37 0%, #171b22 100%);
    border: 6px solid #3c4554;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-soft), 0 0 50px rgba(0, 0, 0, 0.8), inset 0 2px 5px rgba(255,255,255,0.1);
    padding: 18px;
    position: relative;
    overflow: hidden;
}
/* Carbon fiber subtle side stripes */
.console-bezel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: linear-gradient(45deg, rgba(0, 0, 0, 0.05) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, 0.05) 50%, rgba(0, 0, 0, 0.05) 75%, transparent 75%, transparent);
    background-size: 4px 4px;
    pointer-events: none;
}

/* --- THE ARCADE DECK OS SCREEN VIEWPORT --- */
.chassis-screen {
    width: 100%;
    min-height: 600px;
    background: radial-gradient(circle at 50% 20%, var(--active-aura, rgba(0, 240, 255, 0.06)) 0%, var(--bg-screen) 100%);
    border: 3px solid #0f1116;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: background 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: inset 0 0 40px rgba(0,0,0,0.8);
}

/* --- SYSTEM HUD STATUS BAR --- */
.hud-bar {
    height: var(--header-height);
    background: rgba(10, 12, 16, 0.85);
    border-bottom: 1px solid var(--border-tech);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    position: relative;
    z-index: 100;
}
.hud-left, .hud-right, .hud-center {
    display: flex;
    align-items: center;
    gap: 16px;
}
.hud-logo {
    font-family: var(--font-header);
    font-weight: 900;
    color: var(--text-white);
    text-decoration: none;
    font-size: 0.85rem;
}
.hud-logo span { color: var(--neon-cyan); }

/* Wi-Fi widget */
.hud-wifi {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
}
.hud-wifi-bar {
    width: 3px;
    background: rgba(255,255,255,0.08);
    border-radius: 1px;
}
.hud-wifi-bar.active { background: var(--neon-cyan); }
.hud-wifi-bar:nth-child(1) { height: 4px; }
.hud-wifi-bar:nth-child(2) { height: 7px; }
.hud-wifi-bar:nth-child(3) { height: 10px; }
.hud-wifi-bar:nth-child(4) { height: 13px; }

/* Battery widget */
.hud-battery {
    width: 24px;
    height: 12px;
    border: 1.5px solid var(--text-muted);
    border-radius: 2px;
    padding: 1px;
    position: relative;
    display: flex;
}
.hud-battery-level {
    height: 100%;
    width: 90%; /* 90% simulated charge */
    background: var(--neon-green);
    border-radius: 0.5px;
}
.hud-battery::after {
    content: '';
    position: absolute;
    right: -3px;
    top: 3px;
    width: 1.5px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 0.5px;
}

/* User identity card in HUD */
.hud-user {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-white);
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-tech);
    padding: 4px 10px;
    border-radius: 20px;
    transition: all var(--transition-fast);
}
.hud-user:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

/* --- THE MAIN VIEWPORT WRAP --- */
.screen-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 30px 24px;
    position: relative;
    z-index: 10;
}
.screen-content::-webkit-scrollbar {
    width: 5px;
}
.screen-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: var(--border-radius-sm);
}

.carousel-track {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 24px 0;
}
.carousel-item {
    width: 100%;
    height: 156px; /* Perfect 16:10 console tile ratio! */
    background: var(--bg-card);
    border: 1.5px solid var(--border-tech);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-smooth);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
.carousel-cover-img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform var(--transition-smooth);
    z-index: 1;
}
.carousel-item::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.05) 30%, rgba(10, 12, 16, 0.95) 90%);
    z-index: 2;
}
.carousel-info {
    position: relative;
    z-index: 3;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transform: translateY(0);
    transition: transform var(--transition-smooth);
}
.carousel-badge {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    padding: 1px 5px;
    border-radius: 2px;
    align-self: flex-start;
    font-weight: bold;
    text-transform: uppercase;
}
.carousel-badge.online { background: rgba(0, 240, 255, 0.2); color: var(--neon-cyan); }
.carousel-badge.sweepstakes { background: rgba(255, 159, 28, 0.2); color: var(--neon-amber); }
.carousel-badge.social { background: rgba(255, 0, 127, 0.2); color: var(--neon-magenta); }

.carousel-title {
    font-family: var(--font-header);
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hover/Focus Active Cover Flows */
.carousel-item:hover, .carousel-item.active {
    border-color: var(--active-border, var(--neon-cyan));
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6), 0 0 20px var(--active-glow, rgba(0, 240, 255, 0.25));
}
.carousel-item:hover .carousel-cover-img, .carousel-item.active .carousel-cover-img {
    transform: scale(1.04);
}
.carousel-item:hover .carousel-info, .carousel-item.active .carousel-info {
    transform: translateY(0);
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    padding: 10px 22px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    gap: 8px;
    text-transform: uppercase;
}
.btn--primary {
    background: rgba(0, 240, 255, 0.1);
    color: var(--neon-cyan);
    border: 1px solid var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}
.btn--primary:hover {
    background: var(--neon-cyan);
    color: var(--bg-screen);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}
.btn--outline {
    background: transparent;
    color: var(--text-white);
    border: 1px solid var(--border-tech);
}
.btn--outline:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--text-white);
}
.btn--sm { padding: 6px 14px; font-size: 0.7rem; }
.btn--full { width: 100%; }

/* --- GLASSMORPHIC DECK PANEL --- */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-tech);
    border-radius: var(--border-radius-md);
    padding: 22px;
    box-shadow: var(--shadow-glass);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}
.glass-card::after {
    content: '';
    position: absolute;
    top:0; left:0; width:100%; height:100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.01), transparent);
    pointer-events: none;
}
.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: var(--bg-card-hover);
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--neon-amber);
    letter-spacing: 0.12em;
    margin-bottom: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
}
.section-label::before {
    content: '>';
    color: var(--neon-cyan);
}

/* --- FORMS --- */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}
.form-group label {
    font-family: var(--font-header);
    font-size: 0.75rem;
    font-weight: 600;
}
.form-control {
    width: 100%;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    padding: 10px 14px;
    background: rgba(10, 12, 16, 0.7);
    border: 1px solid var(--border-tech);
    border-radius: var(--border-radius-sm);
    color: var(--text-white);
    outline: none;
    transition: all var(--transition-fast);
}
.form-control:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.15);
}
textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

/* --- GRID LAYOUTS IN SCREEN --- */
.os-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}
@media (min-width: 768px) {
    .os-grid-2 { grid-template-columns: 1fr 1fr; }
}

/* --- OS BOTTOM SHELF CONTROLS --- */
.bottom-shelf {
    height: 40px;
    background: rgba(10, 12, 16, 0.9);
    border-top: 1px solid var(--border-tech);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}
