/* --- GLOBAL RESET --- */
* { margin: 0; padding: 0; box-sizing: border-box; border-radius: 0 !important; }
body { background-color: #000; color: #fff; font-family: 'Fira Code', monospace; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
body.modal-active { overflow: hidden; height: 100vh; }

/* --- INTERACTION THEME (RED) --- */
.chip:hover, .btn-main:hover, .close-x:hover, #reset-filters-btn:hover, .play-btn-sq:hover { color: #ff4444; border-color: #ff4444; }
.chip.active { background: #ff4444; color: #000; border-color: #ff4444; }
.play-btn-sq:hover { background: #ff4444; color: #fff; }
.filter-tag span:hover { color: #ff4444; }

/* --- DITHER EFFECT --- */
#content-wrapper { transition: filter 0.4s ease; }
body.modal-active #content-wrapper { filter: grayscale(1) contrast(300%) brightness(0.4); pointer-events: none; }
#dither-overlay { display: none; position: fixed; inset: 0; z-index: 9998; pointer-events: none; background-image: radial-gradient(#000 0.5px, transparent 0.5px); background-size: 3px 3px; opacity: 0.7; }
body.modal-active #dither-overlay { display: block; }

/* --- MODAL --- */
#warning-modal { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.85); display: flex; align-items: center; justify-content: center; z-index: 9999; padding: 1rem; }
.modal-content { background: #000; border: 1px solid #333; width: 100%; max-width: 500px; padding: clamp(1.5rem, 5vw, 2.5rem); position: relative; text-align: left; max-height: 95vh; overflow-y: auto; }
.warning-icon { color: #ff4444; font-size: clamp(48px, 12vw, 60px) !important; margin-bottom: 1.5rem; display: block; animation: iconFlash 1s step-end infinite; }
@keyframes iconFlash { 0% { font-variation-settings: 'FILL' 0; } 50% { font-variation-settings: 'FILL' 1; } }
.modal-content h1 { font-size: clamp(1.5rem, 8vw, 2.2rem); font-weight: 700; letter-spacing: -2px; text-transform: uppercase; }
.warning-text { color: #888; font-size: 0.8rem; margin-top: 0.5rem; line-height: 1.4; }
.scrolling-container { height: 120px; overflow: hidden; background: #000; border: 1px solid #222; margin: 1.5rem 0; }
.scrolling-content { animation: scrollLoop 2.5s linear infinite; }
@keyframes scrollLoop { 0% { transform: translateY(0); } 100% { transform: translateY(-50%); } }
.feature-item { font-size: 0.65rem; color: #ff4444; padding: 4px 10px; text-transform: uppercase; }
.button-row { display: flex; gap: 10px; }
.btn-main { background: #fff; color: #000; padding: 14px 10px; font-weight: 700; border: none; cursor: pointer; text-transform: uppercase; font-family: inherit; flex: 1; font-size: 0.8rem; }
.btn-decline { color: #444; background: none; border: none; font-size: 0.75rem; cursor: pointer; margin-top: 1.5rem; text-decoration: underline; display: block; padding: 10px 0; font-family: inherit; }
.close-x { position: absolute; top: 15px; right: 15px; cursor: pointer; color: #333; padding: 5px; }

/* --- DASHBOARD SECTIONS --- */
.feed-header { padding: clamp(2rem, 10vw, 5rem) 1.25rem 1.5rem 1.25rem; }
.feed-header h1 { font-size: clamp(2rem, 12vw, 4.5rem); letter-spacing: -3px; line-height: 0.9; text-transform: uppercase; }
.feed-header p { color: #444; margin-top: 0.5rem; font-size: 0.8rem; text-transform: uppercase; }

.filter-controls { padding: 0 1.25rem 2rem 1.25rem; }
.carousel-box { margin-bottom: 1.5rem; }
.carousel-box label { font-size: 0.6rem; color: #333; text-transform: uppercase; margin-bottom: 0.5rem; display: block; }
.carousel { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.carousel::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; border: 1px solid #222; padding: 10px 16px; font-size: 0.65rem; cursor: pointer; color: #555; text-transform: uppercase; }

.grid-title { padding: 2rem 1.25rem 1rem 1.25rem; font-size: 0.75rem; color: #fff; text-transform: uppercase; letter-spacing: 1px; }
.filter-status-bar { display: flex; justify-content: space-between; align-items: center; border: 1px solid #111; padding: 10px; margin: 0 1.25rem; flex-wrap: wrap; gap: 10px; }
#active-filter-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-tag { font-size: 0.55rem; color: #555; border: 1px solid #222; padding: 4px 8px; }
#reset-filters-btn { background: transparent; border: 1px solid #333; color: #555; font-family: inherit; font-size: 0.6rem; padding: 6px 12px; cursor: pointer; }

.stats-grid { display: grid; gap: 1rem; padding: 0 1.25rem 2rem 1.25rem; }
.grid-2x2, .grid-timeline { grid-template-columns: 1fr; }
@media (min-width: 850px) { .grid-2x2, .grid-timeline { grid-template-columns: repeat(2, 1fr); } }
.chart-container { background: #050505; border: 1px solid #111; padding: 0.75rem; height: 300px; width: 100%; }

/* --- MASTER LIBRARY (Marquee Logic) --- */
.library-interface { padding: 0 1.25rem 4rem 1.25rem; }
.library-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #222; padding-bottom: 10px; flex-wrap: wrap; gap: 10px; }
.library-header .grid-title { padding: 0; }
.search-box { width: 100%; }
.search-box input { background: #000; border: 1px solid #333; color: #fff; font-family: 'Fira Code', monospace; padding: 10px; font-size: 0.75rem; width: 100%; outline: none; }
@media (min-width: 600px) { .search-box { width: 300px; } }

.table-scroll-area { 
    height: 500px; overflow: auto; border: 1px solid #111; margin-top: 1rem; 
    scrollbar-width: thin; scrollbar-color: #333 #000;
}

table { width: 100%; border-collapse: collapse; font-size: 0.65rem; table-layout: fixed; min-width: 900px; }
th { position: sticky; top: 0; background: #0a0a0a; padding: 12px 8px; color: #444; text-transform: uppercase; text-align: left; z-index: 2; border-bottom: 1px solid #222; }

/* Fixed Row Height & No-Wrap Cell */
td { 
    height: 50px; 
    padding: 0 8px; 
    border-bottom: 1px solid #080808; 
    color: #666; 
    vertical-align: middle; 
    overflow: hidden; 
    white-space: nowrap; 
}

/* MARQUEE CELL SETUP */
.cell-marquee {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.cell-marquee span {
    display: inline-block;
    padding-right: 50px; /* Gap before restart */
}

/* Auto-scroll animation for long text */
.cell-marquee:hover span {
    animation: marqueeText 8s linear infinite;
}

@keyframes marqueeText {
    0% { transform: translateX(0); }
    10% { transform: translateX(0); } /* Obvious pause at start */
    90% { transform: translateX(-40%); } /* Slide left */
    100% { transform: translateX(0); } /* Jump back */
}

#music-table td:nth-child(2) { color: #fff; }
.play-btn-sq { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: #fff; color: #000; text-decoration: none; }

/* --- IG GRID --- */
.masonry-grid { display: flex; gap: 1.25rem; padding: 0 1.25rem 5rem 1.25rem; align-items: flex-start; }
.masonry-col { flex: 1; display: flex; flex-direction: column; gap: 1.25rem; }
.feed-item { width: 100%; border: 1px solid #111; background: #050505; break-inside: avoid; }
.feed-img-container { width: 100%; background: #0a0a0a; }
.feed-img { width: 100%; height: auto; display: block; }
.feed-meta { padding: 10px; font-size: 0.55rem; color: #444; text-transform: uppercase; line-height: 1.4; }