/* ===== CSS Variables — Dual Theme ===== */
:root {
    --font-display: 'SF Pro Display', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --font-body: 'SF Pro Text', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --nav-height: 56px;
    --max-width: 960px;
    --transition: 0.3s ease;
}

[data-theme="dark"] {
    --bg: #050505;
    --bg-card: #0a0f0a;
    --bg-surface: #111111;
    --bg-card-hover: #0e130e;
    --border: #111111;
    --border-hover: #00ff4133;
    --accent: #00ff41;
    --accent-rgb: 0, 255, 65;
    --accent2: #00e5cc;
    --accent2-rgb: 0, 229, 204;
    --accent3: #ffb300;
    --accent3-rgb: 255, 179, 0;
    --text: #e0e0e0;
    --text-secondary: #888888;
    --text-muted: #555555;
    --nav-bg: #050505;
    --nav-border: #0a0f0a;
    --footer-border: #111111;
    --btn-primary-bg: #00ff41;
    --btn-primary-text: #050505;
    --btn-secondary-border: #222222;
    --btn-secondary-text: #888888;
    --tag-bg: #111111;
    --highlight-bg: #0a1a0a;
    --highlight-border: #00ff4133;
}

[data-theme="light"] {
    --bg: #fdf6e3;
    --bg-card: #eee8d5;
    --bg-surface: #f5eedc;
    --bg-card-hover: #e8e2cf;
    --border: #e0dac8;
    --border-hover: #268bd266;
    --accent: #268bd2;
    --accent-rgb: 38, 139, 210;
    --accent2: #859900;
    --accent2-rgb: 133, 153, 0;
    --accent3: #6c71c4;
    --accent3-rgb: 108, 113, 196;
    --text: #073642;
    --text-secondary: #586e75;
    --text-muted: #93a1a1;
    --nav-bg: #fdf6e3;
    --nav-border: #e0dac8;
    --footer-border: #e0dac8;
    --btn-primary-bg: #268bd2;
    --btn-primary-text: #ffffff;
    --btn-secondary-border: #c8c2b0;
    --btn-secondary-text: #586e75;
    --tag-bg: #e0dac8;
    --highlight-bg: #eee8d5;
    --highlight-border: #268bd233;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background var(--transition), color var(--transition);
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { opacity: 0.85; }

img { max-width: 100%; height: auto; }

/* ===== Navigation ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    transition: background var(--transition), border-color var(--transition);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.nav-logo-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    object-fit: contain;
}

.nav-logo-text {
    font-weight: 600;
    font-size: 16px;
    font-family: var(--font-display);
}

.nav-links {
    display: flex;
    gap: 28px;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 14px;
    transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-lang {
    color: var(--text-muted);
    font-size: 12px;
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    transition: border-color var(--transition), color var(--transition);
}

.nav-lang:hover { border-color: var(--accent); color: var(--text-secondary); }

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color var(--transition), color var(--transition);
}

.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* Mobile hamburger */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
}

/* ===== Main Content ===== */
.main-content {
    margin-top: var(--nav-height);
}

/* ===== Hero Section ===== */
.hero {
    text-align: center;
    padding: 80px 32px 60px;
    position: relative;
    overflow: hidden;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-label {
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 16px;
    font-family: var(--font-mono);
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.2;
    position: relative;
}

.hero-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 32px;
    line-height: 1.7;
    position: relative;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    position: relative;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
}

.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-secondary {
    background: transparent;
    border: 1px solid var(--btn-secondary-border);
    color: var(--btn-secondary-text);
}

.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Section ===== */
.section {
    padding: 48px 32px;
    border-top: 1px solid var(--border);
    max-width: var(--max-width);
    margin: 0 auto;
    transition: border-color var(--transition);
}

.section-label {
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 24px;
    text-align: center;
    font-family: var(--font-mono);
}

.section-title {
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--text);
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
    margin-bottom: 32px;
}

/* ===== Code Rain ===== */
.code-rain {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.rain-column {
    position: absolute;
    top: -100%;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.4;
    color: var(--accent);
    opacity: 0.06;
    white-space: pre;
    animation: rain-fall linear infinite;
}

[data-theme="light"] .rain-column { opacity: 0.08; }

@keyframes rain-fall {
    0% { transform: translateY(0); }
    100% { transform: translateY(200%); }
}

/* ===== SSH Diagram ===== */
.diagram {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.diagram-node {
    text-align: center;
    flex-shrink: 0;
}

.diagram-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 8px;
    transition: background var(--transition), border-color var(--transition);
}

.diagram-label {
    color: var(--text);
    font-size: 12px;
}

.diagram-line {
    flex: 1;
    height: 2px;
    margin: 0 12px;
    position: relative;
    border-radius: 1px;
    overflow: hidden;
}

.diagram-line-inner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-radius: 1px;
}

.diagram-line-pulse {
    position: absolute;
    top: -1px;
    left: -30%;
    width: 30%;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
    filter: blur(2px);
    animation: pulse-move 2.5s linear infinite;
}

@keyframes pulse-move {
    0% { left: -30%; }
    100% { left: 100%; }
}

.diagram-line-label {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--accent);
    font-size: 10px;
    font-family: var(--font-mono);
    white-space: nowrap;
}

/* ===== Feature Cards ===== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all var(--transition);
}

.feature-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.05);
}

.feature-card-icon {
    font-size: 28px;
    margin-bottom: 12px;
}

.feature-card h3 {
    color: var(--text);
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 15px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

/* ===== Feature Detail Grid (Features page) ===== */
.feature-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.feature-detail {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all var(--transition);
}

.feature-detail:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.feature-detail-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.feature-detail-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.feature-detail h3 {
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
}

.feature-detail p {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.6;
}

.feature-code {
    margin-top: 10px;
    padding: 8px 10px;
    background: var(--bg-surface);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent);
    overflow-x: auto;
}

.feature-tags {
    margin-top: 10px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--tag-bg);
    color: var(--text-secondary);
    transition: background var(--transition);
}

.tag-accent { color: var(--accent); }
.tag-accent2 { color: var(--accent2); }
.tag-accent3 { color: var(--accent3); }

/* Feature row (full-width) */
.feature-row {
    display: flex;
    gap: 20px;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
    transition: all var(--transition);
}

.feature-row:hover {
    border-color: var(--border-hover);
}

.feature-row-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.feature-row h3 {
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.feature-row p {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.5;
}

/* ===== Zero Data Highlight ===== */
.highlight-box {
    background: var(--highlight-bg);
    border: 1px solid var(--highlight-border);
    border-radius: 14px;
    padding: 32px;
    text-align: center;
    transition: all var(--transition);
}

.highlight-box .highlight-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.highlight-box h3 {
    color: var(--accent);
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 8px;
}

.highlight-box p {
    color: var(--text-secondary);
    font-size: 14px;
    max-width: 440px;
    margin: 0 auto;
    line-height: 1.6;
}

.highlight-tags {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.highlight-tag {
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 20px;
    background: var(--bg-surface);
}

/* ===== Download Page ===== */
.download-hero {
    text-align: center;
    padding: 48px 32px 24px;
}

.download-icon {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    object-fit: contain;
    margin: 0 auto 20px;
}

.download-hero h1 {
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--text);
    font-weight: 700;
    margin-bottom: 8px;
}

.download-hero .subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 28px;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all var(--transition);
}

.info-card-label {
    font-size: 10px;
    color: var(--accent);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 14px;
    font-family: var(--font-mono);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.info-item-label {
    color: var(--text-secondary);
    font-size: 11px;
}

.info-item-value {
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px 16px;
    text-align: center;
    transition: all var(--transition);
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ===== Support Page ===== */
.support-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
    transition: all var(--transition);
}

.support-card .card-icon {
    font-size: 32px;
    margin-bottom: 16px;
}

.support-card h2 {
    font-size: 18px;
    color: var(--text);
    margin-bottom: 8px;
}

.support-card p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

.support-card .btn {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.support-card .btn:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Footer ===== */
.footer {
    padding: 24px 32px;
    border-top: 1px solid var(--footer-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color var(--transition);
}

.footer-copy {
    color: var(--text-muted);
    font-size: 12px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 12px;
}

.footer-links a:hover { color: var(--accent); }

/* ===== Connection Status ===== */
.status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    margin-right: 6px;
}

.status-text {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--accent);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav { padding: 0 16px; }
    .nav-links { display: none; }
    .nav-hamburger { display: block; }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--nav-bg);
        border-bottom: 1px solid var(--nav-border);
        padding: 16px;
        gap: 12px;
    }

    .hero { padding: 60px 20px 40px; min-height: auto; }
    .hero h1 { font-size: 32px; }
    .hero-subtitle { font-size: 15px; }
    .hero-buttons { flex-direction: column; align-items: center; }

    .section { padding: 32px 20px; }

    .feature-grid { grid-template-columns: 1fr; }
    .feature-detail-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }

    .diagram { flex-wrap: wrap; gap: 12px; }
    .diagram-line { display: none; }
    .diagram-node { flex: 0 0 auto; }

    .footer { flex-direction: column; gap: 12px; text-align: center; }
}
