* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-0: #000304;
    --bg-1: #020810;
    --bg-panel: #040e18;
    --bg-card: #071420;
    --bg-card-hover: #0a1a28;
    --bg-card-active: #0d2030;
    --border: rgba(0, 255, 255, 0.10);
    --border-cyan: rgba(0, 255, 255, 0.20);
    --border-glow: rgba(0, 255, 255, 0.40);
    --border-strong: rgba(0, 255, 255, 0.60);
    --accent: #00FFFF;
    --accent-secondary: #00DDDD;
    --accent-dim: rgba(0, 255, 255, 0.5);
    --glow-soft: rgba(0, 255, 255, 0.10);
    --glow-strong: rgba(0, 255, 255, 0.22);
    --text-primary: #eaf4ff;
    --text-muted: #9ab8d4;
    --text-dim: #4a6a88;
    --mono: 'Share Tech Mono', 'Courier New', 'Consolas', monospace;
    --display: 'Orbitron', 'Share Tech Mono', monospace;
    --sans: 'Segoe UI', 'Inter', -apple-system, sans-serif;
    --neon-primary: #00FFFF;
    --neon-soft: rgba(0,255,255,0.25);
    --neon-glow: rgba(0,255,255,0.65);
    --neon-strong: rgba(0,255,255,0.9);
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(0,255,255,0.025), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(0,255,255,0.015), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.scanline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 1px,
        rgba(0, 0, 0, 0.025) 1px,
        rgba(0, 0, 0, 0.025) 2px
    );
    animation: scanlineDrift 8s linear infinite;
}

@keyframes scanlineDrift {
    from { background-position: 0 0; }
    to { background-position: 0 4px; }
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.015;
    background-image:
        linear-gradient(rgba(0, 255, 255, 0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.2) 1px, transparent 1px);
    background-size: 60px 60px;
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9997;
    background: radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, 0.65) 100%);
}

.ambient-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(0, 255, 255, 0.012) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 30%, rgba(0, 255, 255, 0.008) 0%, transparent 40%);
    animation: ambientShift 20s ease-in-out infinite alternate;
}

@keyframes ambientShift {
    0% {
        background:
            radial-gradient(ellipse at 20% 50%, rgba(0, 255, 255, 0.012) 0%, transparent 50%),
            radial-gradient(ellipse at 80% 30%, rgba(0, 255, 255, 0.008) 0%, transparent 40%);
    }
    100% {
        background:
            radial-gradient(ellipse at 30% 40%, rgba(0, 255, 255, 0.01) 0%, transparent 45%),
            radial-gradient(ellipse at 70% 60%, rgba(0, 255, 255, 0.01) 0%, transparent 45%);
    }
}

.top-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 44px;
    background: var(--bg-1);
    border-bottom: 1px solid rgba(0,255,255,0.18);
    border-radius: 0;
    box-shadow:
        0 0 12px rgba(0,255,255,0.06),
        0 3px 12px rgba(0, 0, 0, 0.5),
        inset 0 0 6px rgba(0,255,255,0.04);
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--text-dim);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar-icon {
    color: var(--neon-primary);
    font-size: 13px;
    text-shadow:
        0 0 4px var(--neon-soft),
        0 0 12px rgba(0,255,255,0.35),
        0 0 24px rgba(0,255,255,0.15);
    margin-right: 3px;
    animation: iconPulse 4s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        text-shadow:
            0 0 4px var(--neon-soft),
            0 0 12px rgba(0,255,255,0.35),
            0 0 24px rgba(0,255,255,0.15);
    }
    50% {
        text-shadow:
            0 0 6px var(--neon-soft),
            0 0 18px rgba(0,255,255,0.45),
            0 0 30px rgba(0,255,255,0.2);
    }
}

.top-bar-brand {
    color: var(--neon-primary);
    font-family: var(--display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    text-shadow:
        0 0 4px var(--neon-soft),
        0 0 12px rgba(0,255,255,0.35),
        0 0 24px rgba(0,255,255,0.15);
}

.top-bar-sep {
    color: var(--accent-dim);
    font-size: 8px;
    margin: 0 3px;
}

.top-bar-module {
    color: var(--text-muted);
    font-size: 10px;
    letter-spacing: 2px;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar-mode {
    color: var(--text-dim);
    font-size: 10px;
    letter-spacing: 1px;
}

.top-bar-divider {
    color: rgba(0, 255, 255, 0.12);
    font-size: 10px;
}

.status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--neon-primary);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--neon-primary), 0 0 14px rgba(0,255,255,0.4);
    animation: dotPulse 2.5s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--neon-primary), 0 0 14px rgba(0,255,255,0.4); }
    50% { opacity: 0.35; box-shadow: 0 0 3px var(--neon-primary); }
}

.top-bar-status {
    color: var(--text-muted);
    font-size: 10px;
    letter-spacing: 1.5px;
}

.top-bar-tag {
    color: var(--neon-primary);
    font-size: 10px;
    letter-spacing: 2px;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
    border: 1px solid rgba(0,255,255,0.25);
    padding: 2px 8px;
    box-shadow: 0 0 6px rgba(0,255,255,0.1), inset 0 0 4px rgba(0,255,255,0.05);
}

.container {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 24px 40px;
    position: relative;
    z-index: 10;
}

.micro-status-bar {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 8px 0;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 1.8px;
    color: rgba(0, 255, 255, 0.55);
    text-transform: uppercase;
    border-bottom: 1px solid rgba(0, 255, 255, 0.06);
    margin-bottom: 14px;
}

.micro-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.micro-dot {
    display: inline-block;
    width: 4px;
    height: 4px;
    background: var(--text-dim);
    border-radius: 50%;
    opacity: 0.6;
}

.micro-dot-live {
    background: var(--neon-primary);
    opacity: 1;
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.4);
    animation: microBlink 3s ease-in-out infinite;
}

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

.hero-section {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0,255,255,0.25);
}

.hero-title {
    font-family: var(--display);
    font-size: 22px;
    font-weight: 500;
    color: var(--neon-primary);
    margin-bottom: 5px;
    letter-spacing: 1.5px;
    line-height: 1.3;
    text-shadow:
        0 0 4px var(--neon-soft),
        0 0 12px rgba(0,255,255,0.35),
        0 0 24px rgba(0,255,255,0.15);
}

.hero-sub {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-dim);
    line-height: 1.6;
    max-width: 580px;
    letter-spacing: 0.3px;
}

.control-bar {
    margin-bottom: 16px;
}

.generate-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 255, 0.06);
    color: var(--neon-primary);
    border: 1px solid rgba(0,255,255,0.45);
    border-radius: 0;
    padding: 0;
    cursor: pointer;
    transition: all 0.25s ease;
    overflow: hidden;
    font-size: inherit;
    letter-spacing: inherit;
    text-transform: none;
    box-shadow:
        0 0 10px rgba(0,255,255,0.08),
        inset 0 0 8px rgba(0,255,255,0.06);
    animation: btnIdle 4s ease-in-out infinite;
}

@keyframes btnIdle {
    0%, 100% {
        box-shadow:
            0 0 10px rgba(0,255,255,0.08),
            inset 0 0 8px rgba(0,255,255,0.06);
    }
    50% {
        box-shadow:
            0 0 14px rgba(0,255,255,0.1),
            inset 0 0 10px rgba(0,255,255,0.08);
    }
}

.btn-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 30px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
    text-shadow: 0 0 6px rgba(0,255,255,0.3);
}

.btn-icon {
    font-size: 10px;
    transition: transform 0.25s ease, text-shadow 0.25s ease;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
}

.btn-glow-edge {
    position: absolute;
    background: var(--neon-primary);
    opacity: 0.5;
    transition: opacity 0.25s ease, box-shadow 0.25s ease;
    z-index: 1;
}

.btn-glow-left,
.btn-glow-right {
    top: 0;
    bottom: 0;
    width: 2px;
}

.btn-glow-top,
.btn-glow-bottom {
    left: 0;
    right: 0;
    height: 1px;
}

.btn-glow-left { left: 0; box-shadow: 0 0 6px var(--neon-primary); }
.btn-glow-right { right: 0; box-shadow: 0 0 6px var(--neon-primary); }
.btn-glow-top { top: 0; }
.btn-glow-bottom { bottom: 0; }

.btn-scanline {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 255, 0.015) 2px,
        rgba(0, 255, 255, 0.015) 4px
    );
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 1;
    pointer-events: none;
}

.generate-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), transparent 50%);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 0;
}

.generate-btn:hover {
    border-color: var(--neon-primary);
    background: rgba(0, 255, 255, 0.1);
    animation: none;
    box-shadow:
        0 0 16px rgba(0,255,255,0.2),
        0 0 30px rgba(0,255,255,0.08);
}

.generate-btn:hover::before {
    opacity: 1;
}

.generate-btn:hover .btn-glow-edge {
    opacity: 1;
    box-shadow: 0 0 12px var(--neon-primary);
}

.generate-btn:hover .btn-scanline {
    opacity: 1;
}

.generate-btn:hover .btn-icon {
    transform: rotate(90deg);
    text-shadow: 0 0 12px var(--neon-primary);
}

.generate-btn:active {
    transform: translateY(1px) scale(0.99);
    animation: none;
    box-shadow:
        0 0 6px rgba(0, 255, 255, 0.15),
        inset 0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 0 12px rgba(0, 255, 255, 0.06);
}

.generate-btn:active .btn-glow-edge {
    opacity: 0.4;
    box-shadow: 0 0 3px var(--neon-primary);
}

.generate-btn.loading {
    opacity: 0.2;
    pointer-events: none;
    border-color: var(--border);
    box-shadow: none;
    animation: none;
}

.generate-btn.loading .btn-glow-edge {
    opacity: 0;
}

.sys-panel {
    position: relative;
    background: var(--bg-panel);
    border: 1px solid rgba(0,255,255,0.18);
    border-radius: 0;
    margin-bottom: 14px;
    box-shadow:
        0 0 12px rgba(0,255,255,0.06),
        inset 0 0 6px rgba(0,255,255,0.04);
    padding: 0;
}

.sys-panel-border-inner {
    position: absolute;
    inset: 2px;
    border: 1px solid rgba(0, 255, 255, 0.07);
    pointer-events: none;
    z-index: 2;
}

.sys-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: rgba(2, 6, 10, 0.6);
    border-bottom: 1px solid rgba(0,255,255,0.25);
    position: relative;
    z-index: 3;
}

.sys-panel-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 5%, rgba(0, 255, 255, 0.12) 30%, rgba(0, 255, 255, 0.12) 70%, transparent 95%);
}

.sys-panel-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,255,255,0.15), transparent);
}

.sys-panel-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sys-panel-header-right {
    display: flex;
    align-items: center;
}

.sys-panel-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    background: var(--neon-primary);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--neon-primary), 0 0 12px rgba(0, 255, 255, 0.35);
    flex-shrink: 0;
    animation: panelDotPulse 3s ease-in-out infinite;
}

@keyframes panelDotPulse {
    0%, 100% { box-shadow: 0 0 5px var(--neon-primary), 0 0 12px rgba(0, 255, 255, 0.35); }
    50% { box-shadow: 0 0 8px var(--neon-primary), 0 0 18px rgba(0, 255, 255, 0.45); }
}

.sys-panel-label {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 2.5px;
    color: var(--neon-primary);
    text-transform: uppercase;
    text-shadow:
        0 0 4px var(--neon-soft),
        0 0 12px rgba(0,255,255,0.35),
        0 0 24px rgba(0,255,255,0.15);
}

.sys-panel-tag {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 1px;
    color: var(--neon-primary);
    text-transform: uppercase;
    background: rgba(0, 255, 255, 0.06);
    padding: 2px 8px;
    border: 1px solid rgba(0, 255, 255, 0.25);
    text-shadow: 0 0 6px rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 6px rgba(0,255,255,0.08), inset 0 0 4px rgba(0,255,255,0.05);
}

.sys-panel-count {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    text-transform: uppercase;
}

.sys-panel-body {
    padding: 18px 18px;
    position: relative;
    z-index: 3;
    background: linear-gradient(180deg, rgba(7, 17, 25, 0.25), transparent 40%);
}

.latest-panel {
    border-left: 2px solid var(--neon-primary);
    box-shadow:
        0 0 12px rgba(0,255,255,0.06),
        inset 0 0 6px rgba(0,255,255,0.04),
        inset 4px 0 12px rgba(0, 255, 255, 0.03);
}

.latest-panel .sys-panel-border-inner {
    border-color: rgba(0, 255, 255, 0.1);
}

.latest-body {
    min-height: 56px;
    display: flex;
    align-items: center;
}

.latest-text {
    font-size: 17px;
    font-weight: 300;
    line-height: 1.5;
    letter-spacing: -0.15px;
    color: var(--text-primary);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.text-exit {
    opacity: 0;
    transform: translateY(4px);
}

.text-enter {
    animation: textEnter 0.4s ease forwards;
}

@keyframes textEnter {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.panel-pulse {
    animation: panelPulse 0.7s ease;
}

@keyframes panelPulse {
    0% {
        border-color: var(--neon-primary);
        box-shadow:
            0 0 18px rgba(0, 255, 255, 0.12),
            inset 4px 0 14px rgba(0, 255, 255, 0.05);
    }
    100% {
        border-color: rgba(0,255,255,0.18);
        border-left-color: var(--neon-primary);
        box-shadow:
            0 0 12px rgba(0,255,255,0.06),
            inset 0 0 6px rgba(0,255,255,0.04),
            inset 4px 0 12px rgba(0, 255, 255, 0.03);
    }
}

.archive-panel {
    background: var(--bg-panel);
    overflow: hidden;
}

.archive-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.015), transparent);
    animation: logSweep 14s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes logSweep {
    0% { left: -50%; }
    100% { left: 150%; }
}

.archive-body {
    padding: 0;
    background: none;
}

.archive-list {
    list-style: none;
}

.archive-item {
    display: flex;
    align-items: flex-start;
    gap: 0;
    padding: 8px 16px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.06);
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-muted);
    transition: all 0.15s ease;
    position: relative;
    opacity: 0.95;
}

.archive-item:nth-child(even) {
    background: rgba(0, 255, 255, 0.012);
}

.archive-item:last-child {
    border-bottom: none;
}

.archive-item:hover {
    background: rgba(0,255,255,.03);
    opacity: 1;
}

.archive-item:hover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--neon-primary);
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
}

.archive-index {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--text-dim);
    min-width: 34px;
    padding-top: 1px;
    flex-shrink: 0;
}

.archive-cat {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.8px;
    color: var(--neon-primary);
    min-width: 38px;
    flex-shrink: 0;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.18);
    text-align: center;
    padding: 1px 5px;
    margin-right: 12px;
    line-height: 1.5;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.15);
    box-shadow: 0 0 4px rgba(0,255,255,0.06);
}

.archive-text {
    flex: 1;
}

.sys-footer {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 255, 255, 0.08);
    text-align: center;
}

.sys-footer-text {
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 2.5px;
    color: rgba(0, 255, 255, 0.3);
    text-transform: uppercase;
    text-shadow: 0 0 4px rgba(0,255,255,0.1);
}

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
    .top-bar {
        font-size: 9px;
        letter-spacing: 1px;
        padding: 0 10px;
        height: 38px;
        flex-wrap: nowrap;
    }
    .top-bar-module,
    .top-bar-tag,
    .top-bar-mode,
    .top-bar-divider {
        display: none;
    }
    .top-bar-brand {
        font-size: 10px;
    }
    .micro-status-bar {
        gap: 10px;
        font-size: 9px;
        flex-wrap: wrap;
    }
    .container {
        padding: 0 12px 30px;
    }
    .hero-title {
        font-size: 18px;
    }
    .hero-sub {
        font-size: 10px;
    }
    .latest-text {
        font-size: 15px;
    }
    .sys-panel-body {
        padding: 14px 12px;
    }
    .archive-item {
        padding: 7px 12px;
        font-size: 11px;
    }
    .btn-content {
        padding: 10px 22px;
        font-size: 11px;
        letter-spacing: 2px;
    }
}
