/* ============================================================
   DASHBOARD — Hero card, progress, stats, recent sessions
   ============================================================ */

/* ── Hero Card ── */
.hero-card {
    background: var(--bg-card);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-xl);
    padding: var(--space-xl) var(--space-2xl);
    margin-bottom: var(--space-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .hero-card {
    box-shadow: var(--glow-cyan);
}

.hero-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(0, 229, 255, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-label {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.hero-name {
    font-size: var(--text-3xl);
    font-weight: 800;
    margin-bottom: var(--space-md);
    position: relative;
}

.hero-next {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-top: var(--space-md);
}

.hero-next strong {
    color: var(--text-primary);
}

/* ── Progress Bar ── */
.progress-container {
    margin: var(--space-lg) auto;
    max-width: 400px;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-xs);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.progress-labels .hours-left {
    font-weight: 700;
}

.progress-bar {
    height: 12px;
    background: var(--bg-input);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 6px;
    transition: width var(--transition-slow);
    position: relative;
}

[data-theme="dark"] .progress-fill {
    box-shadow: 0 0 12px currentColor;
}

/* ── Rotation Ring ── */
.rotation-ring {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    padding: var(--space-md) 0;
    overflow-x: auto;
}

.rotation-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    min-width: 80px;
    position: relative;
}

.rotation-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--text-lg);
    border: 2px solid var(--border-subtle);
    transition: all var(--transition-base);
}

.rotation-player.current .rotation-avatar {
    border-width: 3px;
    transform: scale(1.15);
}

[data-theme="dark"] .rotation-player.current .rotation-avatar {
    box-shadow: 0 0 20px currentColor;
}

.rotation-player-name {
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-secondary);
}

.rotation-player.current .rotation-player-name {
    color: var(--text-primary);
    font-weight: 700;
}

/* Arrow between rotation players */
.rotation-arrow {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

/* ── Stats Row ── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    text-align: center;
}

.stat-card.clickable {
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.stat-card.clickable:hover {
    border-color: var(--accent);
    box-shadow: var(--glow-sm);
}

.stat-value {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--accent);
}

.stat-label {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

/* ── Most Played Games ── */
.most-played-scroll {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-xl);
    -webkit-overflow-scrolling: touch;
}

.most-played-card {
    flex: 0 0 160px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-fast);
}

.most-played-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.most-played-card img {
    width: 100%;
    height: 75px;
    object-fit: cover;
}

.most-played-card .game-placeholder {
    width: 100%;
    height: 75px;
    background: linear-gradient(135deg, var(--bg-input), var(--bg-card));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
}

.most-played-info {
    padding: var(--space-sm);
}

.most-played-info .game-name {
    font-size: var(--text-xs);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.most-played-info .play-count {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* ── Recent Sessions (dashboard preview) ── */
.recent-sessions-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.recent-session-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast);
}

.recent-session-item:hover {
    border-color: var(--border-medium);
}

.recent-session-item.casual {
    border-style: dashed;
    border-color: var(--border-medium);
    opacity: 0.85;
}

.recent-session-date {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 90px;
}

.recent-session-detail {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    min-width: 0;
}

.recent-session-pickers {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: var(--text-sm);
}

.recent-session-games {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.recent-session-hours {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
}

/* ── Dashboard events row (polls + upcoming side by side) ── */
.dashboard-events-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-auto-rows: 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.dashboard-events-row > * {
    min-width: 0;
    margin-bottom: 0;
    height: 100%;
    box-sizing: border-box;
}

/* ── Upcoming Session Card ── */
.upcoming-card {
    background: var(--bg-card);
    border: 1px solid var(--yellow);
    border-radius: var(--radius-xl);
    padding: var(--space-xl) var(--space-2xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .upcoming-card {
    box-shadow: var(--glow-yellow);
}

.upcoming-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(255, 230, 0, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.upcoming-card-label {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--yellow);
    margin-bottom: var(--space-sm);
    font-weight: 700;
}

.upcoming-card-date {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.upcoming-card-checkins {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.upcoming-card-players {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}
