:root {
    --bg-main: #090d16;
    --bg-card: #111827;
    --bg-card-hover: #172135;
    --border-subtle: #1f2937;
    --border-accent: #374151;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --accent-blue: #38bdf8;
    --accent-amber: #f59e0b;
    --status-online: #10b981;
    --status-warn: #f59e0b;
}

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

body {
    background-color: var(--bg-main);
    background-image:
        radial-gradient(circle at 15% 15%, rgba(56, 189, 248, 0.07) 0%, transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(245, 158, 11, 0.05) 0%, transparent 45%);
    color: var(--text-primary);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header & Navigation */
.site-header {
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(9, 13, 22, 0.85);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 0.8px;
}

.brand img {
    width: 32px;
    height: 32px;
}

.brand span {
    color: var(--accent-blue);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

.badge-live {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.28);
    color: var(--status-online);
    font-size: 0.78rem;
    font-weight: 600;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}

/* Hero Section */
.hero {
    padding: 4.5rem 0 3rem;
    text-align: center;
}

.eyebrow {
    display: inline-block;
    color: var(--accent-amber);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.85rem;
}

.hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.1rem);
    line-height: 1.18;
    font-weight: 800;
    margin-bottom: 1.1rem;
    letter-spacing: -0.5px;
}

.hero p {
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 2rem;
    font-size: 1.05rem;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.4rem;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--accent-blue);
    color: #06101b;
}

.btn-primary:hover {
    background: #7dd3fc;
}

.btn-outline {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-accent);
}

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

/* Metrics Bar */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin-bottom: 3.5rem;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 1.35rem;
}

.metric-label {
    color: var(--text-secondary);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.metric-value {
    font-size: 1.65rem;
    font-weight: 800;
    margin-top: 0.35rem;
    color: var(--text-primary);
}

.metric-sub {
    font-size: 0.8rem;
    color: var(--status-online);
    margin-top: 0.25rem;
}

/* Feature Cards & Server Table */
.section-block {
    margin-bottom: 3.75rem;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.section-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
}

.section-header span {
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1.25rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.6rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}

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

.card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.55rem;
    color: var(--text-primary);
}

.card p {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.tag {
    display: inline-block;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    background: rgba(56, 189, 248, 0.12);
    color: var(--accent-blue);
    margin-bottom: 0.8rem;
}

/* Table */
.table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

th, td {
    padding: 0.95rem 1.2rem;
    border-bottom: 1px solid var(--border-subtle);
}

th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.015);
}

tr:last-child td {
    border-bottom: none;
}

code.cmd {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: #090d16;
    border: 1px solid var(--border-subtle);
    padding: 0.25rem 0.55rem;
    border-radius: 5px;
    color: #93c5fd;
    font-size: 0.82rem;
    cursor: pointer;
}

.pill-ok {
    color: var(--status-online);
    font-weight: 600;
}

.pill-warn {
    color: var(--status-warn);
    font-weight: 600;
}

/* Rules List */
.rules-list {
    display: grid;
    gap: 1rem;
}

.rule-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--accent-blue);
    border-radius: 8px;
    padding: 1.25rem 1.4rem;
}

.rule-item h3 {
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.rule-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1e293b;
    color: var(--text-primary);
    border: 1px solid var(--accent-blue);
    padding: 0.7rem 1.1rem;
    border-radius: 8px;
    font-size: 0.86rem;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--border-subtle);
    padding: 2rem 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.25rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
}

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

@media (max-width: 640px) {
    .nav-bar {
        height: auto;
        padding: 0.9rem 0;
        flex-direction: column;
        gap: 0.75rem;
    }
    .hero {
        padding: 3rem 0 2rem;
    }
}
