/* =========================
   1. GLOBAL & OPAL VOID
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box !important;
    cursor: crosshair;
}

body {
    background: #030305; 
    color: #b8c1d1; 
    font-family: "Press Start 2P", monospace;
    font-size: 7px;
    line-height: 2;
    overflow-x: auto;
    background-image: 
        radial-gradient(circle at 50% -20%, rgba(148, 233, 233, 0.05), transparent 50%),
        radial-gradient(circle at 0% 100%, rgba(190, 147, 233, 0.05), transparent 50%),
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    background-attachment: fixed;
}

#vhs-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none; 
    z-index: 9999;
    background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 3px);
}

/* =========================
   2. BALANCED LAYOUT (NO-OVERLAP GRID)
========================= */
.layout-wrapper {
    display: grid;
    grid-template-columns: 200px 1fr 400px; /* Fixed column physics */
    gap: 30px;
    max-width: 1550px; 
    min-width: 1100px; 
    margin: 40px auto;
    padding: 0 25px;
    align-items: start;
}

.layout-wrapper > div { min-width: 0; }

/* =========================
   3. IRIDESCENT GLASS BOXES
========================= */
.content-box, .side-box {
    background: rgba(10, 10, 15, 0.9);
    border: 1px solid;
    border-image: linear-gradient(135deg, #a8e6cf, #dcedc1, #ffd3b6, #ffaaa5, #d291bc) 1;
    padding: 25px;
    margin-bottom: 25px;
    position: relative;
    box-shadow: -5px -5px 20px rgba(168, 230, 207, 0.05), 5px 5px 20px rgba(210, 145, 188, 0.05);
    backdrop-filter: blur(8px);
    width: 100%;
}

.glow-green {
    color: #e0f7fa; 
    text-shadow: 0 0 8px rgba(168, 230, 207, 0.8);
    text-transform: lowercase;
    border-left: 3px solid #ffd3b6; 
    padding-left: 12px;
    margin-bottom: 20px;
    display: block;
    letter-spacing: 2px;
    font-size: 8px;
}

.main-title {
    background: linear-gradient(to right, #a8e6cf 20%, #ffd3b6 50%, #d291bc 80%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 10s linear infinite;
    text-align: center;
    letter-spacing: 6px;
    font-size: 11px;
}

@keyframes shine { to { background-position: 200% center; } }

/* =========================
   4. CHAT READABILITY
========================= */
#comments-container {
    height: 350px;           /* Stays 350px tall */
    width: 1000px;            /* Stays exactly 600px wide (Adjust as needed) */
    overflow-y: auto;
    overflow-x: hidden;
    background: rgba(5, 5, 10, 0.8);
    border: 1px solid;
    border-image: linear-gradient(to right, #a8e6cf, #d291bc) 1;
    padding: 15px;
    box-sizing: border-box;  /* Essential: keeps padding inside the 600px */
    backdrop-filter: blur(5px);
    
    /* Optional: Keep it centered on the screen */
    margin: 0 auto; 
}

.comment-item {
    font-size: 7px;
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 8px;
    color: #ced4da;
    line-height: 1.8;
    background: rgba(255, 255, 255, 0.02);
    word-break: break-word;
}

/* =========================
   5. HYBRID BLINKIE GRID
========================= */
.scroll-box {
    height: 550px; 
    overflow-y: scroll;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px;
    display: flex;
    flex-wrap: wrap; 
    justify-content: center;
    align-content: flex-start;
    gap: 12px;
}

.scroll-box img {
    display: block;
    max-width: 100%; 
    height: auto;
    image-rendering: pixelated;
    filter: brightness(0.8) contrast(1.1) grayscale(0.2);
    transition: 0.4s ease;
}

/* =========================
   6. PRISM HUD (CLOCK & AUDIO) - FIXED
========================= */
#clock-hud, #music-hud {
    position: fixed;
    bottom: 25px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(15px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    z-index: 10000;
}

#clock-hud { 
    left: 25px; 
    color: #a8e6cf; 
    border-left: 4px solid #a8e6cf;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 15% 100%, 0 85%);
}

#music-hud {
    right: 25px;
    width: 320px;
    border-right: 4px solid #a8e6cf;
    border-bottom: 4px solid #d291bc;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 92% 100%, 0 100%);
}

/* =========================
   7. SHARD BUTTONS & INPUTS (LITERAL FIX)
========================= */
.music-btn, 
button#send-comment {
    all: unset;
    display: inline-block;
    cursor: crosshair !important;
    pointer-events: auto !important;
    position: relative;
    z-index: 10001; /* Interaction priority */
    
    padding: 12px 18px;
    font-family: "Press Start 2P", monospace !important;
    font-size: 6px !important;
    text-align: center;
    color: #a8e6cf;
    
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(168, 230, 207, 0.3);
    clip-path: polygon(10% 0%, 100% 0%, 90% 100%, 0% 100%);
    transition: 0.3s ease;
}

.music-btn:hover, button#send-comment:hover {
    background: rgba(168, 230, 207, 0.15);
    color: #fff !important;
    border-color: #a8e6cf;
    transform: translateY(-2px);
}

.music-controls { display: flex; gap: 8px; margin-top: 10px; }

input, textarea {
    background: rgba(0, 0, 0, 0.8) !important;
    color: #ffd3b6 !important; 
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 12px;
    font-size: 7px;
    width: 100%;
    position: relative;
    z-index: 10001;
}

/* =========================
   8. CHARACTER CLASSES
========================= */
.corrupted {
    color: #888;
    text-shadow: 2px 0 rgba(255,0,0,0.4), -2px 0 rgba(0,255,255,0.4);
}

.angelic {
    color: #fff;
    text-shadow: 0 0 12px rgba(255,255,255,0.4);
}

/* SCROLLBARS */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: linear-gradient(#a8e6cf, #d291bc); }