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

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #222240;
    --text-primary: #e8e8f0;
    --text-secondary: #9a9ab0;
    --text-muted: #6a6a80;
    --accent: #7c5cfc;
    --accent-glow: rgba(124, 92, 252, 0.3);
    --accent-light: #a78bfa;
    --accent-gradient: linear-gradient(135deg, #7c5cfc, #a78bfa, #c084fc);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(124, 92, 252, 0.15);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== Background Glow ===== */
.background-glow {
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(124, 92, 252, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ===== Header ===== */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.header-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.logo svg {
    color: var(--accent);
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-card);
    border-color: var(--border-hover);
}

/* ===== Main ===== */
main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 80px;
    position: relative;
    z-index: 1;
}

/* ===== Hero ===== */
.hero {
    text-align: center;
    padding: 80px 0 40px;
}

.hero h2 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ===== Stats ===== */
.stats {
    display: flex;
    justify-content: center;
    margin-bottom: 48px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 48px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ===== Participants Grid ===== */
.participants {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 64px;
    min-height: 100px;
}

.participant-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: var(--transition);
    cursor: default;
    animation: fadeInUp 0.4s ease both;
}

.participant-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.participant-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    flex-shrink: 0;
}

.participant-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.participant-number {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
    font-weight: 500;
    flex-shrink: 0;
}

/* ===== Loading ===== */
.loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 48px;
    color: var(--text-muted);
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ===== Error ===== */
.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px;
    color: var(--text-secondary);
}

.error-message p {
    margin-bottom: 8px;
}

.error-message .error-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

/* ===== CTA ===== */
.cta {
    text-align: center;
    padding: 56px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.cta h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.cta p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--accent-gradient);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius);
    transition: var(--transition);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--accent-glow);
}

/* ===== Footer ===== */
footer {
    text-align: center;
    padding: 40px 24px;
    color: var(--text-muted);
    font-size: 0.875rem;
    border-top: 1px solid var(--border);
}

.auto-refresh-note {
    margin-top: 8px;
    font-size: 0.75rem;
    opacity: 0.6;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .hero {
        padding: 48px 0 32px;
    }

    .hero h2 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .participants {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 20px 36px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .cta {
        padding: 40px 24px;
    }

    .cta h3 {
        font-size: 1.25rem;
    }

    .nav-link span {
        display: none;
    }
}
