:root {
    --card-bg: rgba(255,255,255,0.04);
    --accent1: #4fd1c5;
    --accent2: #9f7aea;
    --accent3: #63b3ed;
    --text: #e2e8f0;
    --muted: #94a3b8;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(-45deg, #0a0e1a, #101a2e, #0e1f2b, #1a1030);
    background-size: 400% 400%;
    animation: aurora 20s ease infinite;
    color: var(--text);
    min-height: 100vh;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

@keyframes aurora {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero {
    text-align: center;
    padding: 60px 20px 30px;
}
.hero h1 {
    font-size: 2.4rem;
    background: linear-gradient(90deg, var(--accent1), var(--accent2), var(--accent3));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 8px;
}
.hero p { color: var(--muted); margin: 0; }

section {
    max-width: 700px;
    margin: 0 auto;
    padding: 30px 20px;
}

.range-picker {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}
.range-picker a {
    padding: 8px 16px;
    border-radius: 20px;
    color: var(--muted);
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.2s;
}
.range-picker a.active, .range-picker a:hover {
    color: var(--text);
    border-color: var(--accent1);
    background: rgba(79,209,197,0.1);
}

.stat-cards {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 15px;
}
.stat-cards.small .card { padding: 14px 18px; min-width: 110px; border-top: 3px solid var(--accent1); }
.stat-cards.small .c1 { border-top-color: #fc8181; }
.stat-cards.small .c2 { border-top-color: #f6ad55; }
.stat-cards.small .c3 { border-top-color: #63b3ed; }
.stat-cards.small .c4 { border-top-color: #9f7aea; }
.stat-cards.small .c5 { border-top-color: #4fd1c5; }
.stat-cards.small .value { font-size: 1.25rem; }
.card {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 20px 30px;
    text-align: center;
    flex: 1;
    min-width: 140px;
    backdrop-filter: blur(6px);
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover {
    transform: translateY(-3px);
    border-color: rgba(255,255,255,0.2);
}
.card .label { display: block; color: var(--muted); font-size: 0.85rem; margin-bottom: 6px; }
.card .value { font-size: 1.6rem; font-weight: 700; }
.card.won .value { color: #68d391; }
.card.lost .value { color: #fc8181; }
.card.net .value { color: var(--accent3); }

.note { text-align: center; color: var(--muted); font-size: 0.8rem; margin-top: 16px; }

h2 { text-align: center; font-size: 1.3rem; margin-bottom: 20px; }

.group-label {
    text-align: center;
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 22px 0 10px;
}
.group-label:first-of-type { margin-top: 4px; }

.chart-wrap {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 16px;
    margin-top: 20px;
}

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.timeline .dot {
    width: 8px; height: 8px; border-radius: 50%;
    flex-shrink: 0;
    animation: pulse-dot 2.4s ease-in-out infinite;
}
.feed-mine .dot { background: #b794f4; box-shadow: 0 0 0 0 rgba(183,148,244,0.5); }
.feed-against .dot { background: #f6ad55; box-shadow: 0 0 0 0 rgba(246,173,85,0.5); }
.feed-mine .text { color: #d6bcfa; }
.feed-against .text { color: #fbd38d; }
.anon-tag {
    background: rgba(255,255,255,0.1);
    color: #a0aec0;
    border-radius: 5px;
    padding: 1px 7px;
    font-style: italic;
    font-size: 0.85em;
    white-space: nowrap;
}
@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(79,209,197,0.5); }
    50% { box-shadow: 0 0 0 5px rgba(79,209,197,0); }
}
.timeline li {
    transition: background 0.2s ease;
}
.timeline li:hover { background: rgba(255,255,255,0.03); }
.timeline .text { flex: 1; }

.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 16px;
}
.filter-bar button {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--muted);
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}
.filter-bar button:hover { color: var(--text); border-color: var(--accent2); }
.filter-bar button.active {
    background: linear-gradient(90deg, var(--accent1), var(--accent2));
    color: #0a0e1a;
    border-color: transparent;
    font-weight: 600;
}
.timeline .time { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }
.timeline .empty { color: var(--muted); justify-content: center; }

form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--card-bg);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    position: relative;
}
form input[type=text], form textarea {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
}
form textarea { min-height: 100px; }
.honeypot { position: absolute; left: -9999px; opacity: 0; width: 1px; height: 1px; }
form button {
    background: linear-gradient(90deg, var(--accent1), var(--accent2));
    border: none;
    border-radius: 8px;
    padding: 12px;
    color: #0a0e1a;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.2s;
}
form button:hover { opacity: 0.85; }
#form-status { text-align: center; color: var(--muted); font-size: 0.85rem; min-height: 1.2em; margin: 0; }

@media (max-width: 500px) {
    .hero h1 { font-size: 1.8rem; }
    .stat-cards { flex-direction: column; }
}
