/* ============================================
   LAN-Network Statistics – Dark Theme
   ============================================ */

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

:root {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-card: #252525;
    --accent: #fb8c00;
    --accent-dim: rgba(251, 140, 0, 0.15);
    --text-primary: #ffffff;
    --text-secondary: #ffffff;
    --text-muted: #666666;
    --success: #4caf50;
    --danger: #ef5350;
    --border: rgba(255, 255, 255, 0.08);
    --radius: 8px;
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, monospace, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ---------- Header ---------- */

.site-header {
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--accent);
    padding: 1rem 2rem;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.header-logo img {
    height: 48px;
    width: auto;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.5px;
    text-decoration: none;
}

.header-subtitle {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.header-title a {
    color: inherit;
    text-decoration: none;
}

.header-title a:hover {
    text-decoration: underline;
}

.sponsor-bar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    justify-content: center;
}

.sponsor-logo img {
    height: 32px;
    width: auto;
    opacity: 0.8;
}

.sponsor-message {
    font-size: 2.0rem;
    color: var(--text-muted);
    font-style: normal;
    color: var(--text-secondary);
}

/* ---------- Content ---------- */

.content {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* ---------- Index page ---------- */

.index-container {
    text-align: center;
}

.section-title {
    color: var(--accent);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.graphic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.graphic-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.graphic-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.graphic-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.graphic-card-link {
    color: var(--accent);
    font-size: 0.9rem;
}

.no-data {
    color: var(--text-muted);
    font-style: normal;
}

/* ---------- Graphic page ---------- */

.graphic-container {
    max-width: 960px;
    margin: 0 auto;
}

.graphic-title {
    color: var(--accent);
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.stat-primary .stat-value {
    color: var(--accent);
}

.stat-delta-up .stat-value {
    color: var(--success);
}

.stat-delta-down .stat-value {
    color: var(--danger);
}

.delta-arrow {
    font-size: 1.5rem;
}

.delta-arrow.up {
    color: var(--success);
}

.delta-arrow.down {
    color: var(--danger);
}

.chart-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    height: 400px;
}

.timestamp-bar {
    text-align: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.timestamp-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.timestamp-value {
    color: var(--accent);
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

/* ---------- Footer ---------- */

.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 1rem 2rem;
    text-align: center;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
    .content {
        padding: 1rem;
    }

    .header-title {
        font-size: 1.1rem;
    }

    .stat-value {
        font-size: 1.8rem;
    }

    .chart-wrapper {
        height: 280px;
    }
}
