/* ==========================================================================
   DNS Sinkhole Codex — page styling
   Layers a "year 3020" holographic look on top of the shared enchanted theme
   (theme.css). Reuses --violet / --pink / --cyan / --gold tokens.
   ========================================================================== */

:root {
    --panel: rgba(20, 12, 48, 0.55);
    --panel-border: rgba(34, 211, 238, 0.28);
    --neon-cyan: #22d3ee;
    --neon-line: rgba(34, 211, 238, 0.35);
    --mono: 'JetBrains Mono', 'Courier New', monospace;
    --tech: 'Orbitron', var(--font-display);
}

/* Holographic scanline overlay -------------------------------------------- */
.scanlines {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(34, 211, 238, 0.035) 0px,
        rgba(34, 211, 238, 0.035) 1px,
        transparent 2px,
        transparent 4px
    );
    mix-blend-mode: screen;
    opacity: 0.6;
}

/* Header ------------------------------------------------------------------- */
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
}

.stardate {
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 2px;
    color: var(--neon-cyan);
    padding: 6px 14px;
    border: 1px solid var(--neon-line);
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.06);
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.6);
    white-space: nowrap;
}

/* Hero --------------------------------------------------------------------- */
.hero {
    text-align: center;
    padding: 68px 0 40px;
}

.eyebrow {
    font-family: var(--mono);
    letter-spacing: 4px;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.eyebrow span { color: var(--gold); }

.hero-title {
    font-family: var(--tech);
    font-weight: 900;
    font-size: clamp(2.4rem, 7vw, 4.6rem);
    line-height: 1.02;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.glow {
    background: var(--spell);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 8s linear infinite;
    filter: drop-shadow(0 0 22px rgba(168, 85, 247, 0.45));
}

.hero-sub {
    max-width: 680px;
    margin: 22px auto 30px;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.hero-sub strong { color: var(--text); }

.hero-cta {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Glass panels (quick start / files) -------------------------------------- */
.panel-section .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 22px;
    margin-bottom: 20px;
}

.glass-panel {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 26px 26px 22px;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: var(--shadow), inset 0 0 40px rgba(34, 211, 238, 0.04);
    overflow: hidden;
}

/* Sci-fi corner brackets */
.glass-panel::before,
.glass-panel::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border: 2px solid var(--neon-cyan);
    opacity: 0.7;
}

.glass-panel::before {
    top: 12px;
    left: 12px;
    border-right: none;
    border-bottom: none;
}

.glass-panel::after {
    bottom: 12px;
    right: 12px;
    border-left: none;
    border-top: none;
}

.panel-title {
    font-family: var(--tech);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 16px;
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.panel-title .idx {
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--neon-cyan);
    border: 1px solid var(--neon-line);
    border-radius: 6px;
    padding: 2px 8px;
    text-shadow: 0 0 8px rgba(34, 211, 238, 0.5);
}

.steps {
    list-style: none;
    counter-reset: step;
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.steps li {
    position: relative;
    padding-left: 40px;
    color: var(--text-muted);
    counter-increment: step;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--night-0);
    background: var(--cyan);
    border-radius: 50%;
    box-shadow: 0 0 14px rgba(34, 211, 238, 0.6);
}

.steps .step-k {
    color: var(--text);
    font-weight: 700;
}

.steps em {
    color: var(--gold);
    font-style: normal;
}

.guide-note {
    font-size: 0.92rem;
    color: var(--text-muted);
    padding: 12px 14px;
    border-left: 3px solid var(--violet);
    background: rgba(168, 85, 247, 0.08);
    border-radius: 0 10px 10px 0;
}

.guide-note strong,
.guide-note b { color: var(--text); }

/* File cards --------------------------------------------------------------- */
.file-links {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.file-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.file-card:hover {
    transform: translateY(-3px);
    border-color: var(--cyan);
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.2);
}

.file-icon {
    font-size: 1.3rem;
    line-height: 1;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.6);
}

.file-body { display: grid; gap: 4px; }

.file-name {
    font-family: var(--mono);
    font-weight: 600;
    color: var(--text);
}

.file-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.file-desc b { color: var(--pink); }

/* Codex / registry --------------------------------------------------------- */
.codex-section { padding: 30px 0 10px; }

.section-head {
    text-align: center;
    margin-bottom: 26px;
}

.section-title {
    font-family: var(--tech);
    font-weight: 900;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.section-sub {
    color: var(--text-muted);
    margin-top: 8px;
}

/* Controls ----------------------------------------------------------------- */
.controls {
    display: flex;
    gap: 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.search-wrap {
    position: relative;
    flex: 1;
    min-width: 240px;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 16px;
    font-size: 0.95rem;
    opacity: 0.7;
    pointer-events: none;
}

.filter-input {
    width: 100%;
    padding: 14px 44px 14px 44px;
    font-family: var(--mono);
    font-size: 0.95rem;
    color: var(--text);
    background: rgba(6, 3, 15, 0.5);
    border: 1px solid var(--panel-border);
    border-radius: 999px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-input::placeholder { color: var(--text-muted); }

.filter-input:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
}

.filter-clear {
    position: absolute;
    right: 12px;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    cursor: pointer;
    transition: background 0.2s;
}

.filter-clear:hover { background: var(--pink); }

/* Category chips ----------------------------------------------------------- */
.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.chip {
    font-family: var(--mono);
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 7px 14px;
    border: 1px solid var(--card-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: all 0.2s var(--ease);
    white-space: nowrap;
}

.chip:hover {
    color: var(--text);
    border-color: var(--cyan);
}

.chip[aria-pressed="true"] {
    color: var(--night-0);
    font-weight: 600;
    background: var(--spell);
    background-size: 200% auto;
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(168, 85, 247, 0.4);
}

.chip .chip-count { opacity: 0.7; }

/* Stats -------------------------------------------------------------------- */
.stats {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.stat-pill {
    font-family: var(--mono);
    font-size: 0.82rem;
    letter-spacing: 1px;
    color: var(--neon-cyan);
    padding: 5px 12px;
    border: 1px solid var(--neon-line);
    border-radius: 999px;
    text-shadow: 0 0 8px rgba(34, 211, 238, 0.5);
}

.stat-muted {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Blocklist cards ---------------------------------------------------------- */
.blocklist-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 14px;
}

.blocklist-item {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 16px 16px 14px;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.blocklist-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 3px;
    border-radius: 3px;
    background: var(--spell);
    background-size: 100% 200%;
    opacity: 0.85;
}

.blocklist-item:hover {
    transform: translateY(-4px);
    border-color: var(--cyan);
    box-shadow: 0 16px 40px rgba(34, 211, 238, 0.18);
}

.blocklist-item.hidden { display: none; }

.blocklist-name {
    font-family: var(--tech);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
    color: var(--text);
    margin-bottom: 6px;
    padding-left: 10px;
}

.blocklist-description {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 10px;
    padding-left: 10px;
}

.blocklist-category {
    display: inline-block;
    margin-left: 10px;
    margin-bottom: 12px;
    padding: 3px 12px;
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid var(--neon-line);
    border-radius: 999px;
}

.blocklist-url {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(6, 3, 15, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    font-family: var(--mono);
    font-size: 0.78rem;
}

.url-text {
    flex: 1;
    min-width: 0;
    color: var(--text-muted);
    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-copy {
    flex-shrink: 0;
    padding: 7px 14px;
    font-family: var(--mono);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-copy:hover {
    color: var(--night-0);
    background: var(--cyan);
    border-color: var(--cyan);
}

.btn-copy.copied {
    color: var(--night-0);
    background: var(--gold);
    border-color: var(--gold);
}

/* Empty state -------------------------------------------------------------- */
.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
    font-size: 1rem;
}

.link-btn {
    background: none;
    border: none;
    color: var(--cyan);
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
}

.link-btn:hover { color: var(--gold); }

/* Back-to-top -------------------------------------------------------------- */
.to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 900;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
    color: var(--night-0);
    background: var(--spell);
    background-size: 200% auto;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(168, 85, 247, 0.45);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s, transform 0.3s;
}

.to-top.show {
    opacity: 1;
    transform: none;
}

/* Toast -------------------------------------------------------------------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%) translateY(20px);
    z-index: 1200;
    padding: 12px 22px;
    font-family: var(--mono);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    color: var(--night-0);
    background: var(--cyan);
    border-radius: 999px;
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Footer bottom (uses theme .site-footer) --------------------------------- */
.site-footer .footer-bottom a { color: var(--cyan); }
.site-footer .footer-bottom a:hover { color: var(--gold); }

/* Responsive --------------------------------------------------------------- */
@media (max-width: 640px) {
    .controls { flex-direction: column; }
    .controls .btn-primary { width: 100%; justify-content: center; }
    .blocklist-container { grid-template-columns: 1fr; }
    .stardate { font-size: 0.68rem; letter-spacing: 1px; }
}

