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

:root {
    /* Background colors */
    --bg-primary: #0a0e27;
    --bg-dark: #0a0e27;
    --bg-darker: #070b1f;
    --bg-card: #1e293b;

    /* Accent colors */
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);

    /* Text colors */
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;

    /* Border and utility colors */
    --border-color: #334155;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Shadows */
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

.bg-circle-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.bg-circle-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: 10%;
    animation-delay: 3s;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

/* Container */
.session-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(26, 31, 58, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.session-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.back-button {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.25rem;
}

.back-button:hover {
    border-color: var(--accent-primary);
    transform: translateX(-2px);
}

.session-title-group h1 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.session-id {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.top-actions {
    display: flex;
    gap: 0.75rem;
}

/* Common Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--accent-primary);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-darker);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s;
    box-sizing: border-box;
}

input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Logo Styles */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Error Message */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

/* Spinner */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Main Layout */
.session-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
    flex: 1;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.card-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.card-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Phase Progress */
.phase-progress {
    margin-bottom: 1.5rem;
}

.phase-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    position: relative;
}

.phase-steps::before {
    content: "";
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    height: 2px;
    background: var(--border-color);
    z-index: 0;
}

.phase-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.phase-step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-darker);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.phase-step.completed .phase-step-circle {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.phase-step.active .phase-step-circle {
    background: var(--accent-gradient);
    border-color: var(--accent-primary);
    color: white;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%,
    100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
    }
    50% {
        box-shadow: 0 0 30px rgba(99, 102, 241, 0.8);
    }
}

.phase-step-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
}

.phase-step.active .phase-step-label {
    color: var(--accent-primary);
    font-weight: 600;
}

.current-phase-info {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    padding: 1rem;
}

.current-phase-info h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--accent-primary);
}

.current-phase-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Participants */
.participants-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.participant {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-darker);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.participant:hover {
    border-color: var(--accent-primary);
}

.participant.ready {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
}

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

.participant-info {
    flex: 1;
}

.participant-name {
    font-weight: 600;
    font-size: 0.875rem;
}

.participant-status {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.participant.ready .participant-status {
    color: var(--success);
}

.ready-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--success);
    color: white;
}

/* Session Stats */
.session-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-box {
    text-align: center;
    padding: 1rem;
    background: var(--bg-darker);
    border-radius: 8px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 0.25rem;
}

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

/* Main Content Area */
.main-content {
    display: flex;
    flex-direction: column;
}

.phase-header {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.phase-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent-primary);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.phase-header h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.phase-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* Games Grid */
.games-container {
    flex: 1;
}

.games-grid {
    display: grid;
    gap: 1rem;
}

.game-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-gradient);
    transform: scaleY(0);
    transition: transform 0.3s;
}

.game-card:hover {
    border-color: var(--accent-primary);
    transform: translateX(4px);
}

.game-card:hover::before {
    transform: scaleY(1);
}

.game-card.selected {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
}

.game-card.selected::before {
    transform: scaleY(1);
}

.game-card.vetoed {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
    opacity: 0.6;
}

.game-card.vetoed::before {
    background: var(--danger);
    transform: scaleY(1);
}

.game-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.game-card.selected .game-checkbox {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.game-checkbox::after {
    content: "✓";
    color: white;
    font-weight: bold;
    font-size: 1rem;
    opacity: 0;
}

.game-card.selected .game-checkbox::after {
    opacity: 1;
}

.game-card.vetoed .game-checkbox {
    background: var(--danger);
    border-color: var(--danger);
}

.game-card.vetoed .game-checkbox::after {
    content: "✕";
}

.game-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
}

.game-info {
    flex: 1;
}

.game-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.game-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.game-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.game-votes {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vote-avatars {
    display: flex;
    margin-left: 0.5rem;
}

.vote-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-gradient);
    border: 2px solid var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 600;
    margin-left: -8px;
}

.vote-avatar:first-child {
    margin-left: 0;
}

/* Star Rating */
.star-rating {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.star {
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--border-color);
}

.star:hover,
.star.active {
    color: var(--warning);
    transform: scale(1.2);
}

.star.active {
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.5));
}

.rating-label {
    margin-left: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Action Bar */
.action-bar {
    position: sticky;
    bottom: 0;
    background: rgba(26, 31, 58, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.action-info {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.selection-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.selection-count strong {
    color: var(--accent-primary);
    font-size: 1.25rem;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary:disabled:hover {
    transform: none;
}

/* Results View */
.results-podium {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
    align-items: flex-end;
}

.podium-place {
    text-align: center;
    position: relative;
}

.podium-place.first {
    order: 2;
}

.podium-place.second {
    order: 1;
}

.podium-place.third {
    order: 3;
}

.podium-game {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.podium-place.first .podium-game {
    border-color: var(--warning);
    background: rgba(245, 158, 11, 0.1);
}

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

.podium-game-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.podium-score {
    font-size: 2rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.podium-platform {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem 1rem;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.podium-place.first .podium-platform {
    height: 180px;
    background: var(--accent-gradient);
    color: white;
}

.podium-place.second .podium-platform {
    height: 140px;
}

.score-breakdown {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.score-breakdown h3 {
    margin-bottom: 1rem;
}

.score-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-darker);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.score-row-name {
    flex: 1;
    font-weight: 600;
}

.score-stars {
    display: flex;
    gap: 0.25rem;
}

.score-star {
    font-size: 1rem;
    color: var(--warning);
}

.score-value {
    font-weight: 700;
    color: var(--accent-primary);
    min-width: 40px;
    text-align: right;
}

/* Responsive */
@media (max-width: 1024px) {
    .session-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
    }

    .main-content {
        order: 1;
        overflow-y: auto;
    }

    .results-podium {
        grid-template-columns: 1fr;
    }

    .podium-place {
        order: unset !important;
    }

    .podium-place.first .podium-platform,
    .podium-place.second .podium-platform,
    .podium-place.third .podium-platform {
        height: 120px;
    }
}

@media (max-width: 640px) {
    .session-container {
        padding: 1rem;
    }

    .top-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .top-actions {
        justify-content: stretch;
    }

    .top-actions .btn {
        flex: 1;
    }

    .action-bar {
        flex-direction: column;
        gap: 1rem;
    }

    .action-info {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .btn-primary {
        width: 100%;
    }

    .game-card {
        flex-direction: column;
        text-align: center;
    }

    .session-stats {
        grid-template-columns: 1fr;
    }

    .controls-bar {
        flex-direction: column;
    }

    .view-toggle {
        width: 100%;
        justify-content: center;
    }

    .live-selections-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .game-selection-status {
        align-items: flex-start;
        width: 100%;
    }

    .star-rating {
        gap: 0.25rem;
    }

    .star-rating .star {
        font-size: 2rem;
    }

    .rating-guide {
        display: none;
    }

    .winner-announcement {
        padding: 2rem 1rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .action-bar.results-actions {
        flex-direction: column;
    }

    .action-bar.results-actions > div:last-child {
        width: 100%;
    }

    .action-bar.results-actions .btn {
        flex: 1;
    }
}

/* Controls Bar */
.controls-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.search-box-large {
    position: relative;
    flex: 1;
}

.search-box-large input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.875rem 1rem 0.875rem 3rem;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.search-box-large input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-box-large .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
}

.sort-dropdown {
    flex-shrink: 0;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.25rem;
}

.view-btn {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.25rem;
}

.view-btn:hover {
    color: var(--text-primary);
}

.view-btn.active {
    background: var(--accent-gradient);
    color: white;
}

/* Live Selections */
.live-selections {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.live-selections-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--danger);
    font-size: 0.875rem;
    font-weight: 600;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.live-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.live-games-scroll {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.live-games-scroll::-webkit-scrollbar {
    height: 6px;
}

.live-games-scroll::-webkit-scrollbar-track {
    background: var(--bg-darker);
    border-radius: 3px;
}

.live-games-scroll::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.live-games-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

.live-game-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    white-space: nowrap;
}

.live-game-name {
    font-size: 0.875rem;
    font-weight: 500;
}

.live-game-avatars {
    display: flex;
    gap: 0.25rem;
}

.mini-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 600;
    border: 1px solid var(--bg-card);
}

/* Game Selection Status */
.game-selection-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.selection-avatars {
    display: flex;
    margin-left: 0.5rem;
}

.selection-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-gradient);
    border: 2px solid var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: -10px;
}

.selection-avatar:first-child {
    margin-left: 0;
}

.selection-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.selection-text.no-selection {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    width: 100%;
}

.filter-btn:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.filter-btn.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.filter-btn span:first-child {
    font-size: 1rem;
}

.filter-btn span:nth-child(2) {
    flex: 1;
    text-align: left;
}

.filter-count {
    background: var(--bg-card);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.filter-btn.active .filter-count {
    background: var(--accent-primary);
    color: white;
}

/* Rating Progress */
.rating-progress-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rating-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-darker);
    border-radius: 4px;
    overflow: hidden;
}

.rating-progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.rating-progress-text {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.rating-progress-current {
    font-size: 2rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rating-progress-separator {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.rating-progress-total {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.rating-progress-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Rating Guide */
.rating-guide {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rating-guide-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem;
    background: var(--bg-darker);
    border-radius: 6px;
}

.rating-guide-stars {
    min-width: 80px;
}

.guide-star {
    color: var(--warning);
    font-size: 0.875rem;
}

.rating-guide-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Rating Instructions */
.rating-instructions {
    display: flex;
    gap: 1.5rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.rating-instruction-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.instruction-icon {
    font-size: 1.25rem;
}

.instruction-text {
    color: var(--text-secondary);
}

/* Games Grid - Rating View */
.games-grid-rating {
    display: grid;
    gap: 1.5rem;
}

.game-card-rating {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.75rem;
    transition: all 0.3s;
    position: relative;
}

.game-card-rating.unrated {
    border-color: var(--warning);
    background: rgba(245, 158, 11, 0.05);
}

.game-card-rating.unrated::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--warning);
    border-radius: 12px 0 0 12px;
}

.game-card-rating.rated {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.03);
}

.game-card-rating:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.game-rating-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.game-image-small {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.game-info-rating {
    flex: 1;
}

.game-info-rating .game-name {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.unrated-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--warning);
    font-weight: 600;
}

.game-rating-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.star-rating {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.star-rating .star {
    font-size: 3rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--border-color);
    user-select: none;
}

.star-rating .star:hover,
.star-rating .star.active {
    color: var(--warning);
    transform: scale(1.15);
}

.star-rating .star.active {
    filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.6));
}

.star-rating .star:hover ~ .star {
    color: var(--border-color);
    transform: scale(1);
    filter: none;
}

.rating-label {
    font-size: 1.125rem;
    color: var(--text-primary);
    text-align: center;
}

.rating-value {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rating-descriptor {
    color: var(--text-secondary);
    font-size: 1rem;
}

.rating-placeholder {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.875rem;
}

/* Hover effect for stars */
.star-rating:hover .star {
    color: var(--border-color);
}

.star-rating .star:hover,
.star-rating .star:hover ~ .star {
    color: var(--border-color);
}

.star-rating .star:hover {
    color: var(--warning);
}

/* Active stars remain colored */
.star-rating .star.active {
    color: var(--warning);
}

/* Responsive adjustments for Phase 3 */
@media (max-width: 768px) {
    .rating-instructions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .game-rating-header {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .game-image-small {
        align-self: center;
    }

    .unrated-badge {
        align-self: flex-start;
    }

    .star-rating .star {
        font-size: 2.5rem;
        gap: 0.5rem;
    }

    .rating-label {
        font-size: 1rem;
    }

    .rating-value {
        font-size: 1.25rem;
    }
}

/* Add these new styles to the existing session.css file */

/* Results Complete Info */
.current-phase-info.results-complete {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

.current-phase-info.results-complete h3 {
    color: var(--success);
}

/* Participant Completed State */
.participant.completed {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    font-weight: 500;
}

.quick-action-btn:hover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
    transform: translateX(4px);
}

.quick-action-btn span:first-child {
    font-size: 1.25rem;
}

/* Winner Announcement */
.winner-announcement {
    background: var(--bg-card);
    border: 2px solid var(--warning);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.winner-announcement::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--warning), var(--accent-primary), var(--warning));
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
}

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

.confetti {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: confetti-fall 2s ease-in-out infinite;
}

@keyframes confetti-fall {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(5deg);
    }
    75% {
        transform: translateY(-10px) rotate(-5deg);
    }
}

.winner-badge {
    display: inline-block;
    background: var(--accent-gradient);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.winner-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.winner-score {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.score-number {
    font-size: 4rem;
    font-weight: 700;
    color: var(--warning);
}

.score-label {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.winner-meta {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.winner-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: var(--text-secondary);
}

.winner-meta-item span:first-child {
    font-size: 1.5rem;
}

.winner-game-image {
    font-size: 6rem;
    margin: 1rem 0;
    filter: drop-shadow(0 10px 30px rgba(245, 158, 11, 0.3));
}

/* Podium Updates for Results */
.podium-game-image {
    font-size: 3rem;
    margin: 0.75rem 0;
}

.podium-avg {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.podium-place.first .podium-avg {
    color: rgba(255, 255, 255, 0.8);
}

/* Full Rankings */
.full-rankings {
    margin-bottom: 3rem;
}

.section {
    margin-bottom: 3rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    background: var(--bg-card);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.section-title span:first-child {
    font-size: 2rem;
}

.section-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ranking-item {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    transition: all 0.3s;
}

.ranking-item:hover {
    transform: translateX(4px);
    border-color: var(--accent-primary);
}

.ranking-item.rank-1 {
    border-color: var(--warning);
    background: rgba(245, 158, 11, 0.05);
}

.ranking-item.rank-2 {
    border-color: #94a3b8;
    background: rgba(148, 163, 184, 0.05);
}

.ranking-item.rank-3 {
    border-color: #cd7f32;
    background: rgba(205, 127, 50, 0.05);
}

.ranking-position {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 60px;
}

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

.ranking-item.rank-1 .position-number {
    background: linear-gradient(135deg, var(--warning), #f59e0b);
}

.ranking-item.rank-2 .position-number {
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

.ranking-item.rank-3 .position-number {
    background: linear-gradient(135deg, #cd7f32, #b86f28);
}

.position-medal {
    font-size: 2rem;
}

.ranking-game-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.ranking-game-image {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.ranking-game-details {
    flex: 1;
}

.ranking-game-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.ranking-game-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.ranking-scores {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

.ranking-total-score {
    font-size: 2rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ranking-item.rank-1 .ranking-total-score {
    background: linear-gradient(135deg, var(--warning), #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ranking-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.score-participant {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: var(--bg-darker);
    border-radius: 6px;
}

.score-participant-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.score-participant-stars {
    font-size: 0.875rem;
    color: var(--warning);
    min-width: 80px;
}

.score-participant-value {
    font-weight: 700;
    color: var(--accent-primary);
    min-width: 20px;
    text-align: right;
}

/* Vetoed Section */
.vetoed-section {
    margin-bottom: 2rem;
}

.vetoed-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.vetoed-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--danger);
    border-radius: 8px;
    opacity: 0.7;
}

.vetoed-game-image {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.vetoed-game-info {
    flex: 1;
}

.vetoed-game-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.vetoed-by {
    font-size: 0.875rem;
    color: var(--danger);
}

/* Results Action Bar */
.action-bar.results-actions {
    background: rgba(26, 31, 58, 0.95);
}

/* Responsive for Results */
@media (max-width: 1024px) {
    .results-podium {
        grid-template-columns: 1fr;
    }

    .podium-place.first,
    .podium-place.second,
    .podium-place.third {
        order: unset;
    }

    .podium-platform {
        height: 100px !important;
    }
}

@media (max-width: 768px) {
    .winner-title {
        font-size: 2rem;
    }

    .score-number {
        font-size: 3rem;
    }

    .winner-game-image {
        font-size: 4rem;
    }

    .winner-meta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .ranking-item {
        flex-direction: column;
    }

    .ranking-position {
        flex-direction: row;
        width: 100%;
        justify-content: flex-start;
    }

    .ranking-game-info {
        width: 100%;
    }

    .ranking-scores {
        width: 100%;
        align-items: flex-start;
    }

    .ranking-breakdown {
        width: 100%;
    }

    .score-participant {
        justify-content: space-between;
    }
}

.header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.dev-notice {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--warning);
}

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

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: auto;
}

.badge-primary {
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent-primary);
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.footer {
    text-align: center;
    padding-top: 2rem;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Common Component Styles */
.section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.section-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.games-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.game-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s;
}

.game-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.game-image {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.game-info {
    flex: 1;
}

.game-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

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

.proposer-count {
    color: var(--text-tertiary);
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

/* Layout */
.dashboard {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

/* Content */
.content {
    padding: 2rem;
    max-width: 1200px;
}

/* Games List */
.games-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Back Navigation */
.back-nav {
    margin-bottom: 1.5rem;
}

.session-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
}

.session-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.session-meta > div {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.session-meta strong {
    color: var(--text-primary);
    font-weight: 500;
    min-width: 80px;
}

.session-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.session-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.empty-icon {
    font-size: 4rem;
    opacity: 0.5;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin: 0;
}

.empty-hint {
    font-size: 0.875rem !important;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-bottom: 0.5rem !important;
}

.empty-state .btn {
    margin-top: 0.5rem;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-state p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}
