:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --border-color: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --accent-primary: #3b82f6;
    --accent-hover: #2563eb;
}

body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 70px;
}

.hero *, .stats-section *, .runners-section *, .games-section *, footer * {
    box-sizing: border-box;
}

.beta-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    margin-left: 8px;
    vertical-align: middle;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    animation: pulse 2s ease-in-out infinite;
    cursor: default;
    overflow: hidden;
    max-width: 32px;
    transition: max-width 0.35s ease, width 0.35s ease;
    white-space: nowrap;
}
.beta-badge:hover {
    max-width: 240px;
    width: auto;
    padding: 6px 14px;
}
.beta-badge-text {
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    margin-left: 0;
    transition: opacity 0.25s ease 0.1s, max-width 0.35s ease, margin-left 0.25s ease;
}
.beta-badge:hover .beta-badge-text {
    opacity: 1;
    max-width: 200px;
    margin-left: 6px;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4); }
    50% { box-shadow: 0 4px 20px rgba(245, 158, 11, 0.6); }
}

.hero {
    padding: 50px 20px 40px; text-align: center;
    max-width: 900px; margin: 0 auto;
}
.hero h1 {
    font-size: 56px; font-weight: 800; line-height: 1.1; margin-bottom: 24px;
    background: linear-gradient(to right, #fff, #94a3b8); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero h1 span { color: var(--accent-primary); -webkit-text-fill-color: var(--accent-primary); }
.hero p { font-size: 18px; color: var(--text-secondary); margin-bottom: 40px; }

/* CTA Button */
.hero-cta {
    display: inline-flex; align-items: center; gap: 10px;
    background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff;
    padding: 14px 32px; border-radius: 12px; font-size: 17px; font-weight: 700;
    text-decoration: none; transition: all 0.25s ease;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(59, 130, 246, 0.5); }
.hero-cta-secondary { background: linear-gradient(135deg, #334155, #1e293b); box-shadow: 0 4px 20px rgba(51, 65, 85, 0.4); }
.hero-cta-secondary:hover { box-shadow: 0 6px 28px rgba(59, 130, 246, 0.3); border-color: var(--accent-primary); }

/* How It Works */
.how-it-works { max-width: 900px; margin: 0 auto 60px; padding: 0 20px; }
.how-it-works-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.how-step {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 16px; padding: 28px 20px; text-align: center; position: relative;
    transition: all 0.3s ease;
}
.how-step:hover { transform: translateY(-4px); border-color: var(--accent-primary); box-shadow: 0 8px 30px rgba(59, 130, 246, 0.15); }
.how-step-icon { font-size: 36px; margin-bottom: 8px; }
.how-step-num {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--accent-primary); color: #fff; width: 24px; height: 24px;
    border-radius: 50%; font-size: 13px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.how-step h3 { font-size: 16px; font-weight: 700; margin: 0 0 8px; color: var(--text-primary); }
.how-step p { font-size: 14px; color: var(--text-secondary); margin: 0; line-height: 1.5; }

.stats-section { max-width: 1200px; margin: 0 auto 60px; padding: 0 20px; }
.stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.stat-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid var(--border-color);
    padding: 32px 28px; border-radius: 20px; position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: center; height: 160px;
    transition: all 0.3s ease;
}
.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.2);
    border-color: var(--accent-primary);
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.stat-card:hover::before {
    opacity: 1;
}
.stat-value { font-size: 42px; font-weight: 800; color: white; line-height: 1; margin-bottom: 8px; z-index: 2; position: relative; }
.stat-label { font-size: 14px; color: var(--text-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; z-index: 2; position: relative; }

.stat-emoji {
    position: absolute; font-size: 80px; opacity: 0.08;
    right: 15px; bottom: 10px; transform: rotate(-10deg); pointer-events: none;
    filter: grayscale(100%); transition: all 0.3s;
}
.stat-card:hover .stat-emoji { opacity: 0.2; transform: rotate(0deg) scale(1.1); filter: grayscale(0%); }

.runners-section { max-width: 1200px; margin: 0 auto 60px; padding: 0 20px; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 32px; color: white; margin-bottom: 8px; font-weight: 700; }
.section-header p { color: var(--text-secondary); font-size: 16px; }

.runners-scroll-container {
    position: relative;
    overflow: hidden;
    width: 100%;
}
.runners-scroll {
    display: flex;
    gap: 16px;
    overflow: hidden;
    padding: 10px 0 20px;
    position: relative;
    width: 100%;
}
.runners-track {
    display: flex;
    gap: 16px;
    will-change: transform;
}
.runners-track.paused {
    animation-play-state: paused !important;
}
.runner-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 16px;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: all 0.2s;
    flex-shrink: 0;
}
.runner-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}
.runner-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
    margin-bottom: 12px;
    transition: border-color 0.2s;
}
.runner-card:hover .runner-avatar {
    border-color: var(--accent-primary);
}
.runner-name {
    font-size: 15px;
    font-weight: 600;
    color: white;
    text-align: center;
    margin-bottom: 4px;
}
.runner-games {
    font-size: 13px;
    color: var(--text-secondary);
}

.feed-section { max-width: 1200px; margin: 0 auto 60px; padding: 0 20px; }

.activity-grid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px;
}
.activity-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    padding: 16px; border-radius: 16px; display: flex; align-items: center; gap: 16px;
    text-decoration: none; transition: transform 0.2s, border-color 0.2s; position: relative;
}
.activity-card:hover { transform: translateY(-3px); border-color: var(--accent-primary); }
.activity-card-no-link { cursor: default; }
.activity-card-no-link:hover { transform: none; border-color: var(--border-color); }

.game-poster {
    width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
    object-fit: cover; border: 2px solid var(--border-color); background: #000;
}
.activity-content { flex: 1; min-width: 0; }
.game-title { 
    font-weight: 700; color: white; font-size: 14px; 
    white-space: nowrap !important; 
    overflow: hidden !important; 
    text-overflow: ellipsis !important;
    max-width: 100%;
}
.runner-name-act { 
    font-size: 13px; color: var(--text-secondary); margin-bottom: 2px;
    white-space: nowrap !important; 
    overflow: hidden !important; 
    text-overflow: ellipsis !important;
}

.status-row { display: flex; align-items: center; gap: 6px; font-size: 12px; margin-top: 4px; min-width: 0; }
.status-text { 
    font-weight: 600; 
    white-space: nowrap !important; 
    overflow: hidden !important; 
    text-overflow: ellipsis !important; 
}

.text-pb { color: #10b981; }
.text-finish { color: #3b82f6; }
.text-reset { color: #ef4444; }
.text-manual { color: #94a3b8; }
.text-manual-run { color: #8b5cf6; }
.text-planned { color: #f59e0b; }

.time-badge { 
    position: absolute; bottom: 12px; right: 12px; 
    font-size: 11px; color: var(--text-secondary); opacity: 0.7;
    display: flex; align-items: center; gap: 4px;
}
.activity-count-badge {
    position: absolute; top: 8px; right: 8px;
    background: #3b82f6; color: #fff;
    font-size: 11px; font-weight: 700;
    padding: 2px 7px; border-radius: 10px;
    line-height: 1.3;
}

footer {
    border-top: 1px solid var(--border-color); padding: 40px 20px; text-align: center;
    color: var(--text-secondary); font-size: 14px; background: #020617;
}

@media (max-width: 900px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .activity-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 40px; }
    .runner-card { min-width: 160px; }
    .how-it-works-grid { grid-template-columns: 1fr; max-width: 360px; margin: 0 auto; }
}
@media (max-width: 600px) {
    .hero h1 { font-size: 32px; }
    .stat-value { font-size: 32px; }
    .section-header h2 { font-size: 24px; }
    .runner-card { min-width: 140px; padding: 16px; }
    .runner-avatar { width: 56px; height: 56px; }
    .beta-badge { max-width: 240px; width: auto; padding: 6px 14px; }
    .beta-badge .beta-badge-text { opacity: 1; max-width: 200px; margin-left: 6px; }
    .hero-cta { font-size: 15px; padding: 12px 24px; }
}

@media (prefers-reduced-motion: reduce) {
    .runners-track { animation: none !important; transform: none !important; }
    .beta-badge { animation: none; }
    .stat-emoji { animation: none; }
}
