/* Ultra Minimalist Design */
:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #0f0f0f;
    
    --text-primary: #ffffff;
    --text-secondary: #707070;
    --text-tertiary: #404040;
    
    --accent: #ffffff;
    --accent-hover: #d0d0d0;
    
    --border: #1a1a1a;
    --border-hover: #2a2a2a;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

/* Authentication Screen */
.auth-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}

.auth-container-inner {
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.auth-brand {
    margin-bottom: 3rem;
}

.brand-logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

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

.auth-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1.5rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.auth-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.twitch-btn {
    width: 100%;
    background: var(--accent);
    color: #000000;
    border: none;
    padding: 0.625rem 1rem;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.twitch-btn:hover {
    opacity: 0.9;
}

.icon-twitch {
    width: 20px;
    height: 20px;
}

.auth-divider {
    margin: 1.5rem 0;
    color: var(--text-tertiary);
    font-size: 0.75rem;
    text-transform: uppercase;
    position: relative;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--border);
}

.auth-divider::before {
    left: 0;
}

.auth-divider::after {
    right: 0;
}

.admin-btn-link {
    width: 100%;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-btn-link:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.auth-footer-links {
    margin-top: 2rem;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.auth-footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.auth-footer-links a:hover {
    color: var(--accent);
}

.auth-footer-links .dot {
    margin: 0 0.75rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 800;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 36px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
    line-height: 1;
}

.close-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: 32px;
}

.admin-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.admin-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.admin-section h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.admin-section label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    margin-top: 16px;
}

.admin-section label:first-of-type {
    margin-top: 0;
}

.admin-section input[type="text"],
.admin-section input[type="password"],
.admin-section textarea {
    width: 100%;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s;
    margin-bottom: 12px;
}

.admin-section input:focus,
.admin-section textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.admin-section textarea {
    resize: vertical;
    min-height: 80px;
}

.admin-section button {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 12px;
    margin-top: 8px;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
    box-shadow: var(--glow-purple);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success);
    color: var(--bg-primary);
}

.btn-success:hover {
    background: #00d66a;
    transform: translateY(-2px);
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-warning:hover {
    background: #ff9800;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #f44336;
    transform: translateY(-2px);
}

.help-text {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 12px;
}

.help-text a {
    color: var(--accent-primary);
    text-decoration: none;
}

.help-text a:hover {
    text-decoration: underline;
}

/* Main Application */
#main-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.navbar-brand {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #c471ed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-title {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 600;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 50px;
    transition: all 0.2s;
}

.user-badge:hover {
    border-color: var(--border-hover);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    box-shadow: var(--glow-purple);
}

.user-name {
    font-weight: 700;
    font-size: 14px;
}

.btn-logout {
    padding: 10px 20px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
}

.btn-admin {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-admin:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
}

/* App Container */
.app-container {
    flex: 1;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    padding: 40px;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: var(--shadow-md);
}

.sidebar-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.countdown-display {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.countdown-display .time-unit {
    background: linear-gradient(135deg, var(--accent-primary) 0%, #c471ed 100%);
    color: white;
    padding: 16px 8px;
    border-radius: 12px;
    text-align: center;
    font-size: 24px;
    font-weight: 900;
    box-shadow: var(--glow-purple);
}

.countdown-labels {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    text-align: center;
}

.countdown-labels span {
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 600;
    text-transform: uppercase;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.stat-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.stat-row:first-child {
    padding-top: 0;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

.stat-value {
    font-size: 20px;
    font-weight: 900;
    color: var(--text-primary);
}

.status-badge {
    font-size: 13px !important;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 700 !important;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.status-badge.active {
    background: var(--success);
    color: var(--bg-primary);
    border-color: var(--success);
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.3);
}

.status-badge.ended {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

/* Main Content */
.main-content {
    min-height: 600px;
}

.content-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.section-header {
    margin-bottom: 32px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

/* Candidates Grid */
.candidates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.candidate-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1rem;
    transition: border-color 0.2s;
    cursor: pointer;
}

.candidate-card:hover {
    border-color: var(--border-hover);
}

.candidate-card.voted {
    border-color: #00ff80;
}

.candidate-header h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.candidate-description {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.vote-btn,
.delete-btn {
    width: 100%;
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.vote-btn {
    background: var(--accent);
    color: white;
}

.vote-btn:hover:not(:disabled) {
    opacity: 0.9;
}

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

.delete-btn {
    background: var(--danger);
    color: white;
    margin-top: 8px;
}

.delete-btn:hover {
    background: #f44336;
    transform: translateY(-2px);
}

.voted-message {
    text-align: center;
    color: var(--success);
    font-weight: 700;
    margin-top: 12px;
    font-size: 14px;
}

/* Results Grid */
.results-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-card {
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    transition: all 0.3s;
}

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

.result-position {
    font-size: 32px;
    font-weight: 900;
    color: var(--text-tertiary);
    min-width: 60px;
    text-align: center;
}

.result-card.winner {
    background: linear-gradient(135deg, rgba(145, 70, 255, 0.1) 0%, rgba(196, 113, 237, 0.1) 100%);
    border-color: var(--accent-primary);
    box-shadow: var(--glow-purple);
}

.result-card.winner .result-position {
    background: linear-gradient(135deg, var(--accent-primary) 0%, #c471ed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-info {
    flex: 1;
}

.result-info h3 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
}

.result-description {
    font-size: 14px;
    color: var(--text-secondary);
}

.result-stats {
    text-align: right;
}

.result-votes {
    font-size: 36px;
    font-weight: 900;
    color: var(--accent-primary);
    display: block;
    line-height: 1;
}

.result-percentage {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 700;
    margin-top: 4px;
}

.winner-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #c471ed 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--glow-purple);
}

/* Status Bar */
.status-bar {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px var(--success);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.9);
    }
}

#status-message {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

.status-credits {
    font-size: 13px;
    color: var(--text-tertiary);
}

.status-credits a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
}

.status-credits a:hover {
    text-decoration: underline;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-tertiary);
}

.empty-state h3 {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 15px;
}

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

    .sidebar {
        flex-direction: row;
    }

    .sidebar-card {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .navbar-content {
        flex-direction: column;
        gap: 16px;
        padding: 16px 20px;
    }

    .navbar-left {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .app-container {
        padding: 20px;
        gap: 20px;
    }

    .sidebar {
        flex-direction: column;
    }

    .content-section {
        padding: 24px 20px;
    }

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

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

    .result-stats {
        text-align: center;
    }

    .countdown-display .time-unit {
        font-size: 20px;
        padding: 12px 4px;
    }

    .status-bar {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .auth-box {
        padding: 32px 24px;
    }

    .brand-logo {
        font-size: 36px;
    }

    .user-name {
        display: none;
    }

    .modal-body {
        padding: 24px 20px;
    }
}

/* ============= NEW STYLES FOR TEAM VOTING ============= */

/* Role Tabs */
.role-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 4px;
    border: 1px solid var(--border);
    overflow-x: auto;
}

.role-tab {
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.role-tab:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.role-tab.active {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

/* Selected Players Card */
#selection-card {
    background: var(--bg-secondary);
}

.selected-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    min-height: 120px;
}

.empty-selection {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 14px;
    padding: 32px 0;
}

.selected-player-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.selected-player-item:hover {
    border-color: var(--border-hover);
    background: var(--bg-elevated);
}

.selected-player-name {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.selected-player-role {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.remove-selection {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--danger);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-selection:hover {
    background: #ff6b6b;
    transform: scale(1.1);
}

.selection-counter {
    text-align: center;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.selection-counter span {
    color: var(--accent-primary);
}

.btn-submit {
    width: 100%;
    padding: 0.625rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-submit:hover:not(:disabled) {
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
}

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

/* Updated Candidate Cards */
.candidate-card {
    position: relative;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.candidate-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 8px 24px rgba(145, 70, 255, 0.2);
    transform: translateY(-4px);
}

.candidate-card.selected {
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, rgba(145, 70, 255, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    box-shadow: 0 0 30px rgba(145, 70, 255, 0.3);
}

.candidate-card.voted {
    border-color: var(--success);
}

.card-role-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

/* Clip Preview Box */
.clip-preview-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    margin: 16px 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.clip-preview-box:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
}

.clip-icon-wrapper {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-primary);
    border-radius: 50%;
    color: white;
}

.clip-preview-box:hover .clip-icon-wrapper {
    background: var(--accent-hover);
    transform: scale(1.1);
}

.clip-play-icon {
    width: 28px;
    height: 28px;
}

.clip-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.clip-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clip-platform {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Old styles - remove or keep as fallback */
.clip-preview-container {
    position: relative;
    width: 100%;
    margin: 12px 0;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--accent-primary);
}

.clip-preview-container:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(145, 70, 255, 0.6);
    border-color: var(--accent-hover);
}

.clip-thumbnail {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.clip-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: white;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0;
    transition: all 0.3s ease;
}

.clip-preview-container:hover .clip-overlay {
    opacity: 1;
}

.clip-overlay .play-icon {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Old clip preview style - keep as fallback */
.clip-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    margin: 16px 0;
    background: linear-gradient(135deg, rgba(145, 70, 255, 0.15) 0%, rgba(124, 58, 237, 0.15) 100%);
    border: 2px solid var(--accent-primary);
    border-radius: 10px;
    color: var(--accent-primary);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clip-preview:hover {
    background: linear-gradient(135deg, rgba(145, 70, 255, 0.3) 0%, rgba(124, 58, 237, 0.3) 100%);
    border-color: var(--accent-hover);
    box-shadow: 0 0 25px rgba(145, 70, 255, 0.5);
    transform: scale(1.02);
}

.clip-preview .play-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.card-select-btn {
    width: 100%;
    padding: 12px;
    margin-top: 16px;
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.card-select-btn.selected {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.voted-badge {
    width: 100%;
    padding: 12px;
    margin-top: 16px;
    background: var(--success);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

/* Role Select in Admin */
.role-select {
    width: 100%;
    padding: 12px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
    cursor: pointer;
}

.role-select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* Team Results */
.team-result-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    gap: 24px;
    align-items: center;
    transition: all 0.3s ease;
}

.team-result-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.result-rank {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.rank-number {
    font-size: 32px;
    font-weight: 900;
    color: var(--text-primary);
}

.winner-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #000;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.result-team {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-player {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.result-player-name {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.result-player-role {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-votes {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    min-width: 100px;
}

.vote-count {
    font-size: 32px;
    font-weight: 900;
    color: var(--accent-primary);
    line-height: 1;
}

.vote-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.no-results {
    text-align: center;
    padding: 64px 32px;
    color: var(--text-secondary);
    font-size: 18px;
}

/* Responsive for team voting */
@media (max-width: 768px) {
    .role-tabs {
        gap: 8px;
    }
    
    .role-tab {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .team-result-card {
        flex-direction: column;
        text-align: center;
    }
    
    .result-team {
        width: 100%;
    }
}

/* ============= ADMIN MONITOR ============= */
.role-results {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.role-monitor {
    background: var(--bg-tertiary);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.role-monitor-header {
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.role-monitor-list {
    padding: 8px;
}

.monitor-player {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    margin-bottom: 4px;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.monitor-player:last-child {
    margin-bottom: 0;
}

.monitor-player.leading {
    border-color: var(--accent-primary);
    background: rgba(145, 70, 255, 0.1);
    box-shadow: 0 0 10px rgba(145, 70, 255, 0.2);
}

.monitor-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.monitor-votes {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-primary);
    background: var(--bg-elevated);
    padding: 4px 10px;
    border-radius: 6px;
}

.monitor-player.leading .monitor-votes {
    background: var(--accent-primary);
    color: white;
}

.empty-monitor {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 13px;
    padding: 24px;
}
