/* ===== nav.sync.yun — Terminal Style ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #0a0e14;
    --bg-card: #0d1117;
    --green: #00ff41;
    --green-dim: #00cc33;
    --green-dark: #0a3d1a;
    --amber: #ffb000;
    --cyan: #00d4ff;
    --red: #ff4444;
    --white: #c0c0c0;
    --dim: #4a5568;
    --font: "JetBrains Mono", "Fira Code", "SF Mono", Menlo, Consolas, "Courier New", monospace;
    --glow: 0 0 8px rgba(0, 255, 65, 0.3), 0 0 20px rgba(0, 255, 65, 0.1);
}

html { font-size: 14px; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--green);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scanline overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 65, 0.015) 2px,
        rgba(0, 255, 65, 0.015) 4px
    );
    pointer-events: none;
    z-index: 9999;
}

/* CRT flicker */
@keyframes flicker {
    0%, 100% { opacity: 1; }
    92% { opacity: 1; }
    93% { opacity: 0.8; }
    94% { opacity: 1; }
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 24px 48px;
    animation: flicker 8s infinite;
}

/* ===== Header ASCII Art ===== */
.header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--green-dark);
}
.header .ascii {
    color: var(--green);
    font-size: 0.72rem;
    line-height: 1.2;
    letter-spacing: 0.05em;
    white-space: pre;
    margin-bottom: 16px;
    text-shadow: var(--glow);
}
.header .subtitle {
    color: var(--dim);
    font-size: 0.78rem;
}
.header .subtitle .cursor {
    display: inline-block;
    width: 8px;
    height: 14px;
    background: var(--green);
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
    margin-left: 4px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ===== Search ===== */
.search-section {
    margin-bottom: 32px;
}
.search-prompt {
    color: var(--amber);
    margin-bottom: 8px;
    font-size: 0.82rem;
}
.search-prompt .cursor {
    display: inline-block;
    width: 7px;
    height: 13px;
    background: var(--green);
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
    margin-left: 2px;
}
.search-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--green);
    font-family: var(--font);
    font-size: 0.88rem;
    caret-color: var(--green);
    padding: 4px 0;
    border-bottom: 1px dashed var(--green-dark);
}
.search-input::placeholder {
    color: var(--dim);
}
.search-input:focus {
    border-bottom-color: var(--green-dim);
    text-shadow: var(--glow);
}

/* ===== Stats ===== */
.stats-line {
    color: var(--dim);
    font-size: 0.75rem;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 255, 65, 0.08);
}
.stats-line span { color: var(--cyan); }

/* ===== Link List ===== */
.link-list {
    list-style: none;
    padding: 0;
}
.link-item {
    display: flex;
    align-items: baseline;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background 0.12s;
    text-decoration: none;
    gap: 12px;
    border-left: 2px solid transparent;
}
.link-item:hover {
    background: rgba(0, 255, 65, 0.04);
    border-left-color: var(--green);
}
.link-item:active {
    background: rgba(0, 255, 65, 0.08);
}

.link-idx {
    color: var(--dim);
    font-size: 0.72rem;
    min-width: 28px;
    text-align: right;
    user-select: none;
    flex-shrink: 0;
}
.link-name {
    color: var(--green);
    font-size: 0.85rem;
    white-space: nowrap;
    text-shadow: 0 0 6px rgba(0, 255, 65, 0.2);
    transition: color 0.12s;
    flex-shrink: 0;
}
.link-item:hover .link-name {
    color: #66ff88;
}
.link-url {
    color: var(--dim);
    font-size: 0.7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.link-desc {
    color: var(--dim);
    font-size: 0.72rem;
    margin-left: auto;
    flex-shrink: 0;
    max-width: 200px;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== Section Header ===== */
.section-header {
    color: var(--amber);
    font-size: 0.78rem;
    padding: 16px 12px 6px;
    user-select: none;
}
.section-header::before {
    content: '// ';
    color: var(--dim);
}

/* ===== Empty ===== */
.empty-msg {
    color: var(--dim);
    padding: 40px 12px;
    text-align: center;
    font-size: 0.82rem;
}

/* ===== Footer ===== */
.footer {
    margin-top: 40px;
    padding-top: 16px;
    border-top: 1px solid var(--green-dark);
    text-align: center;
    font-size: 0.7rem;
    color: var(--dim);
}
.footer a {
    color: var(--green-dim);
    text-decoration: none;
}
.footer a:hover { color: var(--green); }

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .link-desc { display: none; }
    .link-url { display: none; }
    .link-item { gap: 10px; }
    .header .ascii { font-size: 0.55rem; }
    html { font-size: 13px; }
}
