/* Alfinator Dashboard Styles */

:root {
    --primary: #9147FF;
    --primary-dark: #772CE8;
    --bg-dark: #0E0E10;
    --bg-card: #18181B;
    --bg-hover: #1F1F23;
    --text: #EFEFF1;
    --text-dim: #ADADB8;
    --gold: #FFD700;
    --silver: #C0C0C0;
    --bronze: #CD7F32;
    --green: #00F593;
    --red: #FF4545;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: var(--bg-card);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo {
    font-size: 2rem;
}

.version {
    font-size: 0.7rem;
    background: var(--primary);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: normal;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
}

.hero-enhanced {
    text-align: center;
    padding: 2rem 0 3rem;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.session-status-large {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.status-badge-large {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: var(--bg-card);
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    min-width: 300px;
    transition: all 0.3s;
}

.status-badge-large.active {
    background: rgba(0, 245, 147, 0.1);
    border-color: var(--green);
}

.pulse-large {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-dim);
    flex-shrink: 0;
}

.status-badge-large.active .pulse-large {
    background: var(--green);
    animation: pulse 2s infinite;
}

.status-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.status-label {
    font-size: 0.85rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.status-badge-large.active .status-value {
    color: var(--green);
}

/* Quick Stats Bar */
.quick-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.quick-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border-radius: 12px;
}

.qs-icon {
    font-size: 2rem;
}

.qs-content {
    display: flex;
    flex-direction: column;
}

.qs-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

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

.session-status {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border-radius: 50px;
    font-size: 0.9rem;
}

.status-badge.active {
    background: rgba(0, 245, 147, 0.1);
    color: var(--green);
}

.pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-dim);
}

.pulse.active {
    background: var(--green);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, #FF4545 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-dim);
    font-size: 1.1rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(145, 71, 255, 0.2);
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Sections */
.section {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* Current Session */
.current-session {
    background: linear-gradient(135deg, rgba(145, 71, 255, 0.1) 0%, rgba(255, 69, 69, 0.1) 100%);
}

/* Session Meta */
.session-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dim);
}

.meta-icon {
    font-size: 1.1rem;
}

/* Podium */
.podium {
    margin-top: 2rem;
}

.podium-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 1rem;
    height: 300px;
}

.podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 1.5rem 1rem;
    background: var(--bg-hover);
    border-radius: 12px;
    width: 150px;
    transition: transform 0.3s;
}

.podium-place:hover {
    transform: translateY(-8px);
}

.podium-place.first {
    height: 250px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.05));
    border: 2px solid var(--gold);
}

.podium-place.second {
    height: 200px;
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.2), rgba(192, 192, 192, 0.05));
    border: 2px solid var(--silver);
}

.podium-place.third {
    height: 150px;
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.2), rgba(205, 127, 50, 0.05));
    border: 2px solid var(--bronze);
}

.podium-medal {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.podium-player {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: center;
}

.podium-points {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary);
}

/* Featured Grid */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.featured-card {
    margin: 0;
}

.featured-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.featured-player {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.featured-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), #FF4545);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    flex-shrink: 0;
}

.featured-info {
    flex: 1;
}

.featured-name {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.featured-points {
    font-size: 1.5rem;
    color: var(--gold);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.featured-meta {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Activity Feed Compact */
.activity-feed-compact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.activity-item-compact {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-hover);
    border-radius: 8px;
    transition: transform 0.2s;
}

.activity-item-compact:hover {
    transform: translateX(4px);
}

.activity-icon-compact {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.activity-text-compact {
    flex: 1;
    font-size: 0.95rem;
}

.activity-time-compact {
    font-size: 0.8rem;
    color: var(--text-dim);
    flex-shrink: 0;
}

/* Leaderboards Grid */
.leaderboards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.lb-card {
    margin: 0;
}

.lb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.view-all {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: transform 0.2s;
}

.view-all:hover {
    transform: translateX(4px);
}

/* Enhanced Leaderboard Items */
.leaderboard-enhanced {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.lb-item-enhanced {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-hover);
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.lb-item-enhanced:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(145, 71, 255, 0.2);
}

.lb-rank-enhanced {
    font-size: 1.5rem;
    min-width: 50px;
    text-align: center;
    font-weight: bold;
}

.lb-rank-enhanced.gold { color: var(--gold); }
.lb-rank-enhanced.silver { color: var(--silver); }
.lb-rank-enhanced.bronze { color: var(--bronze); }

.lb-info {
    flex: 1;
}

.lb-username {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.lb-points-enhanced {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Quick Actions */
.quick-actions {
    margin-top: 3rem;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1rem;
    background: var(--bg-hover);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.3s, box-shadow 0.3s;
    gap: 0.75rem;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(145, 71, 255, 0.3);
}

.action-icon {
    font-size: 2.5rem;
}

.action-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.action-desc {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Leaderboard */
.leaderboard {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.lb-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-hover);
    border-radius: 8px;
    transition: transform 0.2s;
}

.lb-item:hover {
    transform: translateX(4px);
}

.lb-rank {
    font-size: 1.5rem;
    min-width: 50px;
    text-align: center;
}

.lb-rank.gold { color: var(--gold); }
.lb-rank.silver { color: var(--silver); }
.lb-rank.bronze { color: var(--bronze); }

.lb-username {
    flex: 1;
    font-weight: 600;
}

.lb-points {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary);
}

/* Activity Feed */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.activity-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-hover);
    border-radius: 8px;
}

.activity-icon {
    font-size: 1.5rem;
}

.activity-content {
    flex: 1;
}

.activity-text {
    margin-bottom: 0.25rem;
}

.activity-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.points-positive {
    color: var(--green);
    font-weight: bold;
}

.points-negative {
    color: var(--red);
    font-weight: bold;
}

/* Leaderboards Preview */
.leaderboards-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-dim);
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer p {
    margin: 0.25rem 0;
}

footer a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: var(--primary-dark);
}

/* Loading & Empty States */
.loading, .empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-dim);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .version {
        display: none;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .quick-stats {
        gap: 1rem;
    }
    
    .quick-stat {
        padding: 0.75rem 1rem;
    }
    
    .status-badge-large {
        min-width: auto;
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .podium-container {
        height: 250px;
    }
    
    .podium-place {
        width: 100px;
        padding: 1rem 0.5rem;
    }
    
    .podium-place.first { height: 200px; }
    .podium-place.second { height: 160px; }
    .podium-place.third { height: 120px; }
    
    .podium-medal {
        font-size: 2rem;
    }
    
    .podium-player {
        font-size: 0.9rem;
    }
    
    .podium-points {
        font-size: 1.1rem;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .leaderboards-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}