/* ============================================================
   CORE LAYOUT & RESET
   ============================================================ */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    background-color: #0B0C10; 
    color: #F5F5F5; 
    font-family: 'JetBrains Mono', monospace; 
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    /* Optimize text rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 768px) {
    body { padding: 2rem; }
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.brand-heading { 
    font-family: 'Montserrat', sans-serif; 
    font-weight: 900; 
    letter-spacing: -0.05em; 
    text-transform: uppercase;
}

.italic-heading { font-style: italic; }

h1, p, a, h3 { 
    font-display: swap; 
}

/* ============================================================
   GRID SYSTEM & THEATER MODE
   ============================================================ */
.max-container { 
    width: 100%; 
    max-width: 80rem; 
}

.main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    transition: grid-template-columns 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 1024px) {
    /* Default: Video (2 parts), Toggle (auto), Sidebar (1 part) */
    .main-grid { 
        grid-template-columns: 2fr auto 1fr; 
    }
}

/* Video Column Expansion */
.video-expanded {
    grid-column: span 3 / span 3 !important;
}

/* ============================================================
   COMPONENTS & PANELS
   ============================================================ */
.panel { 
    background-color: #1F2833; 
    border: 1px solid rgba(102, 252, 241, 0.1); 
    padding: 1.5rem;
    border-radius: 0.125rem;
}

.video-container { 
    width: 100%; 
    aspect-ratio: 16 / 9; 
    position: relative; 
    background: black;
}

.video-container iframe { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
}

.accent-border { 
    border-left: 4px solid #66FCF1; 
    padding-left: 1rem; 
}

/* Sidebar hidden state */
#sidebar-panel {
    transition: opacity 0.3s ease, transform 0.3s ease;
    overflow: hidden;
}

.sidebar-hidden {
    width: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    pointer-events: none;
    position: absolute;
}

/* ============================================================
   INTERACTIVE ELEMENTS
   ============================================================ */
.neon-btn, .panel-btn {
    display: block;
    padding: 0.75rem 1rem;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-style: italic;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.2s ease;
}

.neon-btn { 
    background-color: #D1FE00; 
    color: #0B0C10; 
}

.neon-btn:hover { 
    background-color: #66FCF1; 
    transform: translateY(-2px); 
    box-shadow: 0 0 15px rgba(102, 252, 241, 0.4); 
}

.panel-btn { 
    background-color: #1F2833; 
    border: 1px solid rgba(102, 252, 241, 0.1); 
    color: #F5F5F5;
}

.panel-btn:hover { 
    border-color: #66FCF1; 
}

/* Toggle Arrow Button */
.toggle-trigger {
    cursor: pointer;
    background: #1F2833;
    border: 1px solid rgba(102, 252, 241, 0.2);
    color: #66FCF1;
    display: none; /* Hidden on mobile */
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 60px;
    border-radius: 4px;
    margin-top: 150px;
    transition: all 0.2s ease;
    z-index: 10;
}

@media (min-width: 1024px) {
    .toggle-trigger { display: flex; }
}

.toggle-trigger:hover {
    background: #66FCF1;
    color: #0B0C10;
}

/* ============================================================
   LIVE STATUS EFFECTS
   ============================================================ */
.live-pulse { 
    color: #D1FE00 !important; 
    animation: pulse 2s infinite; 
    font-weight: 900; 
    text-shadow: 0 0 10px rgba(209, 254, 0, 0.5);
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

.live-border {
    border-color: #D1FE00 !important;
    box-shadow: 0 0 15px rgba(209, 254, 0, 0.3);
}

/* ============================================================
   FOOTER & STATUS BAR
   ============================================================ */
#url-status {
    font-size: 10px;
    color: #66FCF1;
    opacity: 0.9; /* High opacity for Lighthouse accessibility */
    text-transform: uppercase;
}

footer {
    margin-top: auto;
    width: 100%;
    max-width: 80rem;
    border-top: 1px solid #1F2833;
    padding-top: 2rem;
    padding-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    footer { 
        flex-direction: row; 
        justify-content: space-between; 
    }
}

footer p, footer a {
    color: #94a3b8;
}

.icon-svg { 
    width: 24px; 
    height: 24px; 
    fill: #94a3b8; 
    transition: fill 0.2s ease; 
}

.icon-link:hover .icon-svg { 
    fill: #66FCF1; 
}

/* --- System Specs Section --- */
.specs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
}

@media (min-width: 768px) {
    .specs-grid { grid-template-columns: 1fr 1fr; }
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(102, 252, 241, 0.1);
    font-size: 0.85rem;
}

.spec-label {
    color: #66FCF1; /* Change to #FF4500 for Brotopia Red */
    text-transform: uppercase;
    opacity: 0.8;
}

.spec-value {
    color: #F5F5F5;
    text-align: right;
}

.bios-header {
    background: rgba(102, 252, 241, 0.05); /* Change to #FF4500 for Red */
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    border-left: 3px solid #66FCF1; /* Change to #FF4500 for Red */
}