/* ========================================
   NAKAMA WAVES - Design System
   ======================================== */

/* --- CSS Variables --- */
:root {
    /* Colors */
    --bg-primary: #07070d;
    --bg-secondary: #0e0e18;
    --bg-tertiary: #161625;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --bg-input: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --border-focus: rgba(124, 92, 252, 0.5);
    
    --text-primary: #e8e8f0;
    --text-secondary: #9898b0;
    --text-muted: #5a5a78;
    
    --accent-primary: #7c5cfc;
    --accent-secondary: #00d4ff;
    --accent-gradient: linear-gradient(135deg, #7c5cfc, #00d4ff);
    --accent-glow: rgba(124, 92, 252, 0.4);
    
    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.1);
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.1);
    --error: #f87171;
    --error-bg: rgba(248, 113, 113, 0.1);
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    
    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(124, 92, 252, 0.2);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

/* --- Light Mode CSS Variables --- */
:root[data-theme="light"] {
    --bg-primary: #f4f4f9;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e9eaf2;
    --bg-card: rgba(255, 255, 255, 0.75);
    --bg-card-hover: rgba(255, 255, 255, 0.9);
    --bg-input: rgba(0, 0, 0, 0.04);
    --border-color: rgba(124, 92, 252, 0.15);
    --border-hover: rgba(124, 92, 252, 0.3);
    --border-focus: rgba(124, 92, 252, 0.6);
    
    --text-primary: #11111b;
    --text-secondary: #4a4a65;
    --text-muted: #757590;
    
    --accent-glow: rgba(124, 92, 252, 0.15);
    
    --success: #059669;
    --success-bg: rgba(5, 150, 105, 0.12);
    --warning: #d97706;
    --warning-bg: rgba(217, 119, 6, 0.12);
    --error: #dc2626;
    --error-bg: rgba(220, 38, 38, 0.12);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Particle Canvas */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

/* --- Views / SPA --- */
.view {
    display: none;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    animation: fadeIn 0.4s ease;
}
.view.active {
    display: block;
}

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

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

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

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(124, 92, 252, 0.2); }
    50% { box-shadow: 0 0 40px rgba(124, 92, 252, 0.4); }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: var(--space-md) var(--space-xl);
    background: rgba(7, 7, 13, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    cursor: pointer;
}

.nav-logo {
    font-size: 1.5rem;
}

.nav-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.nav-user {
    color: var(--text-secondary);
    font-size: 0.875rem;
    padding: var(--space-xs) var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
}

.nav-link {
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}
.nav-link:hover {
    color: var(--text-primary);
}

.nav-logout {
    font-size: 0.875rem;
    color: #ff4d4d !important;
    border: 1px solid rgba(255, 77, 77, 0.2) !important;
    padding: 6px 16px !important;
    border-radius: var(--radius-sm) !important;
    transition: all var(--transition-fast) !important;
    background: transparent !important;
}
.nav-logout:hover {
    color: #fff !important;
    background: #ff4d4d !important;
    border-color: #ff4d4d !important;
    box-shadow: 0 0 15px rgba(255, 77, 77, 0.4) !important;
}

#nav-admin-btn {
    font-size: 0.875rem;
    color: #fbbf24 !important;
    border: 1px solid rgba(251, 191, 36, 0.25) !important;
    padding: 6px 16px !important;
    border-radius: var(--radius-sm) !important;
    transition: all var(--transition-fast) !important;
    background: transparent !important;
    margin-right: 8px;
}
#nav-admin-btn:hover {
    color: #07070d !important;
    background: #fbbf24 !important;
    border-color: #fbbf24 !important;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.4) !important;
}

/* Light Mode override for Admin button */
:root[data-theme="light"] #nav-admin-btn {
    color: #b45309 !important;
    border: 1px solid rgba(180, 83, 9, 0.25) !important;
}
:root[data-theme="light"] #nav-admin-btn:hover {
    color: #ffffff !important;
    background: #b45309 !important;
    border-color: #b45309 !important;
    box-shadow: 0 2px 8px rgba(180, 83, 9, 0.2) !important;
}

/* --- Buttons --- */
button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}
.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(124, 92, 252, 0.4);
}
.btn-primary:hover::before {
    opacity: 1;
}
.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    font-weight: 600;
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}
.btn-outline:hover {
    border-color: var(--accent-primary);
    background: rgba(124, 92, 252, 0.08);
    transform: translateY(-2px);
}

.btn-ghost {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    cursor: pointer;
}
.btn-ghost:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.btn-link {
    background: none;
    border: none;
    color: var(--accent-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: color var(--transition-fast);
}
.btn-link:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

.btn-large {
    padding: var(--space-md) var(--space-2xl);
    font-size: 1.05rem;
}

.btn-small {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.85rem;
}

.btn-full {
    width: 100%;
}

.btn-icon {
    font-size: 1.1em;
}

.btn-arrow {
    transition: transform var(--transition-fast);
}
.btn-primary:hover .btn-arrow,
.btn-outline:hover .btn-arrow {
    transform: translateX(4px);
}

.btn-back {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.875rem;
    cursor: pointer;
    padding: var(--space-sm) 0;
    margin-bottom: var(--space-lg);
    transition: color var(--transition-fast);
}
.btn-back:hover {
    color: var(--text-primary);
}

.btn-danger {
    background: var(--error);
    color: #fff;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.85rem;
    transition: all var(--transition-fast);
}
.btn-danger:hover {
    background: #ef4444;
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success);
    color: #0a0a12;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.85rem;
    transition: all var(--transition-fast);
}
.btn-success:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* --- Glass Card --- */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    transition: all var(--transition-base);
}
.glass-card:hover {
    border-color: var(--border-hover);
}

/* --- Input Fields --- */
.input-group {
    position: relative;
    margin-bottom: var(--space-lg);
}

.input-icon {
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    z-index: 1;
    pointer-events: none;
}

.input-field {
    width: 100%;
    padding: var(--space-md) var(--space-md) var(--space-md) 44px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    outline: none;
}
.input-field:focus {
    border-color: var(--border-focus);
    background: rgba(124, 92, 252, 0.05);
    box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.1);
}
.input-field::placeholder {
    color: var(--text-muted);
}

.textarea {
    resize: vertical;
    min-height: 80px;
    padding-top: var(--space-md);
}

/* Input without icon */
.input-group:not(:has(.input-icon)) .input-field {
    padding-left: var(--space-md);
}

/* --- Error & Success Messages --- */
.error-message {
    color: var(--error);
    font-size: 0.85rem;
    padding: var(--space-sm) var(--space-md);
    background: var(--error-bg);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

.success-message {
    color: var(--success);
    font-size: 0.85rem;
    padding: var(--space-sm) var(--space-md);
    background: var(--success-bg);
    border-radius: var(--radius-sm);
    margin-top: var(--space-md);
    border: 1px solid rgba(52, 211, 153, 0.2);
    text-align: center;
}

/* --- Badges --- */
.badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-active {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(52, 211, 153, 0.2);
}
.badge-closed {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

/* ===== LANDING PAGE ===== */
.landing-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
}

.hero-section {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.hero-content {
    animation: slideUp 0.8s ease;
}

.hero-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: rgba(124, 92, 252, 0.1);
    border: 1px solid rgba(124, 92, 252, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: var(--accent-primary);
    font-weight: 500;
    margin-bottom: var(--space-lg);
    letter-spacing: 0.5px;
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: var(--space-lg);
}

.title-line {
    display: block;
}

.gradient-text {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradient-shift 4s ease infinite;
}

.glow-text {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 0 40px rgba(124, 92, 252, 0.3), 0 0 80px rgba(0, 212, 255, 0.15);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-xl);
    max-width: 500px;
}

.hero-stats {
    display: flex;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.hero-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 92, 252, 0.15), transparent 70%);
    filter: blur(40px);
    animation: pulse-glow 4s ease infinite;
}

.floating-cards {
    position: relative;
    width: 300px;
    height: 300px;
}

.floating-card {
    position: absolute;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    animation: float 6s ease infinite;
}

.fc-1 { top: 0; left: 50%; transform: translateX(-50%); animation-delay: 0s; }
.fc-2 { top: 50%; right: 0; transform: translateY(-50%); animation-delay: 1.5s; }
.fc-3 { bottom: 0; left: 50%; transform: translateX(-50%); animation-delay: 3s; }
.fc-4 { top: 50%; left: 0; transform: translateY(-50%); animation-delay: 4.5s; }

/* ===== AUTH PAGES ===== */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.5s ease;
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.auth-icon-wrapper {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 92, 252, 0.1);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(124, 92, 252, 0.2);
}

.auth-icon {
    font-size: 1.8rem;
}

.auth-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
}

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

.auth-footer {
    text-align: center;
    margin-top: var(--space-md);
}

/* ===== DASHBOARD / HOME ===== */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: calc(80px + var(--space-2xl)) var(--space-xl) var(--space-2xl);
}

.dashboard-header {
    margin-bottom: var(--space-2xl);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.page-title {
    font-size: 1.8rem;
    margin-bottom: var(--space-sm);
}

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

.section-title {
    font-size: 1.3rem;
    margin-bottom: var(--space-lg);
}

/* Sessions Grid */
.sessions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-lg);
}

.session-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    animation: slideUp 0.5s ease;
}
.session-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.session-card-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--space-md);
    background: var(--bg-secondary);
}

.session-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.session-card-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

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

.session-card-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: var(--space-md);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.session-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.empty-state h3 {
    font-size: 1.2rem;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-muted);
}

/* ===== MINIGAME / VOTING PAGE ===== */
.minigame-container {
    max-width: 900px;
    margin: 0 auto;
    padding: calc(80px + var(--space-2xl)) var(--space-xl) var(--space-2xl);
}

.minigame-header {
    margin-bottom: var(--space-xl);
}

.video-section {
    margin-bottom: var(--space-xl);
    padding: var(--space-md);
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-secondary);
}

.video-wrapper iframe,
.video-wrapper div {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Voting Section */
.voting-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    margin-bottom: var(--space-xl);
}

.rating-categories {
    margin-bottom: var(--space-xl);
}

.rating-category {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
}
.rating-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.rating-category-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

/* Star Rating */
.star-rating {
    display: flex;
    gap: var(--space-sm);
}

.star-btn {
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    filter: grayscale(1) opacity(0.3);
    padding: 2px;
    color: var(--warning);
}
.star-btn:hover {
    transform: scale(1.2);
}
.star-btn.active {
    filter: none;
    transform: scale(1.1);
}

/* Slider Rating */
.slider-rating {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.slider-rating input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-input);
    outline: none;
}

.slider-rating input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-gradient);
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.slider-rating input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider-value {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    color: var(--accent-primary);
    font-size: 1.1rem;
}

/* Emoji Rating */
.emoji-rating {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.emoji-btn {
    font-size: 1.8rem;
    padding: var(--space-sm);
    background: var(--bg-input);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    opacity: 0.5;
}
.emoji-btn:hover {
    opacity: 0.8;
    transform: scale(1.1);
}
.emoji-btn.active {
    opacity: 1;
    border-color: var(--accent-primary);
    background: rgba(124, 92, 252, 0.1);
    transform: scale(1.15);
}

/* Results Section */
.results-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
}

.results-grid {
    display: grid;
    gap: var(--space-lg);
}

.result-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-input);
    border-radius: var(--radius-md);
}

.result-name {
    flex: 1;
    font-weight: 500;
}

.result-bar-container {
    flex: 2;
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
}

.result-bar {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 4px;
    transition: width 0.8s ease;
}

.result-value {
    min-width: 50px;
    text-align: right;
    font-weight: 600;
    color: var(--accent-primary);
    font-size: 0.95rem;
}

.total-votes {
    text-align: center;
    margin-top: var(--space-lg);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== ADMIN PANEL ===== */
.admin-container {
    max-width: 900px;
    margin: 0 auto;
    padding: calc(80px + var(--space-2xl)) var(--space-xl) var(--space-2xl);
}

.admin-header {
    margin-bottom: var(--space-xl);
}

/* Custom Admin Tabs Dropdown */
.admin-tabs-wrapper {
    position: relative;
    width: 100%;
    max-width: 320px;
    margin-bottom: var(--space-xl);
}

.admin-dropdown-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
}

.admin-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-secondary);
}

.admin-dropdown-toggle .dropdown-chevron {
    transition: transform var(--transition-base);
}

.admin-tabs-wrapper.open .admin-dropdown-toggle .dropdown-chevron {
    transform: rotate(180deg);
}

.admin-tabs-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 4px;
    background: rgba(18, 18, 29, 0.95);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-xs);
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(15px);
}

.admin-tabs-wrapper.open .admin-tabs-dropdown-menu {
    display: flex;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    font-size: 0.85rem;
    white-space: nowrap;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    cursor: pointer;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--accent-gradient) !important;
    color: #fff !important;
    font-weight: 600;
}

.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Create Form */
.create-form {
    animation: slideUp 0.4s ease;
}

.form-section {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--border-color);
}
.form-section:last-of-type {
    border-bottom: none;
}

.form-section-title {
    font-size: 1.1rem;
    margin-bottom: var(--space-sm);
}

.form-section-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: var(--space-lg);
}

/* Video Preview */
.video-preview {
    margin-top: var(--space-md);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.video-preview-frame {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.video-preview-frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Categories Builder */
.categories-builder {
    margin-bottom: var(--space-md);
}

.category-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    animation: slideUp 0.3s ease;
}

.category-item .input-field {
    flex: 1;
    margin: 0;
    padding: var(--space-sm) var(--space-md);
    font-size: 0.9rem;
}

.category-item .input-group {
    margin: 0;
    flex: 1;
}

.category-type-select {
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
}
.category-type-select:focus {
    border-color: var(--border-focus);
}

.category-max-input {
    width: 70px;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    text-align: center;
    outline: none;
}
.category-max-input:focus {
    border-color: var(--border-focus);
}

.btn-remove-category {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: var(--space-xs);
    transition: color var(--transition-fast);
    flex-shrink: 0;
}
.btn-remove-category:hover {
    color: var(--error);
}

/* Manage List */
.manage-list {
    display: grid;
    gap: var(--space-md);
}

.manage-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    animation: slideUp 0.4s ease;
}
.manage-item:hover {
    border-color: var(--border-hover);
}

.manage-item-info {
    flex: 1;
}

.manage-item-title {
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.manage-item-meta {
    color: var(--text-muted);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.manage-item-actions {
    display: flex;
    gap: var(--space-sm);
    flex-shrink: 0;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    top: var(--space-xl);
    right: var(--space-xl);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(20px);
    border: 1px solid;
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s;
    max-width: 360px;
}

.toast-success {
    background: var(--success-bg);
    color: var(--success);
    border-color: rgba(52, 211, 153, 0.2);
}

.toast-error {
    background: var(--error-bg);
    color: var(--error);
    border-color: rgba(248, 113, 113, 0.2);
}

.toast-info {
    background: rgba(124, 92, 252, 0.1);
    color: var(--accent-primary);
    border-color: rgba(124, 92, 252, 0.2);
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ===== LOADING ===== */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(7, 7, 13, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-visual {
        display: none;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-buttons {
        justify-content: center;
    }

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

    .navbar {
        padding: var(--space-sm) var(--space-md);
    }

    .nav-right {
        gap: var(--space-sm);
    }

    .nav-user {
        display: none;
    }

    .glass-card {
        padding: var(--space-lg);
    }

    .voting-section,
    .results-section {
        padding: var(--space-lg);
    }

    .manage-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }

    .manage-item-actions {
        width: 100%;
    }

    .category-item {
        flex-wrap: wrap;
    }

    .btn-large {
        padding: var(--space-md) var(--space-lg);
        font-size: 0.95rem;
    }



    .result-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .result-bar-container {
        width: 100%;
    }

    .toast-container {
        left: var(--space-md);
        right: var(--space-md);
    }

    .toast {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .gradient-text,
    .glow-text {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn-large {
        width: 100%;
    }

    .star-btn {
        font-size: 1.6rem;
    }
}

/* ===== FEATURES GRID (HOME) ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl) var(--space-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    animation: slideUp 0.5s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
}
.feature-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow);
}
.feature-card.feature-disabled {
    cursor: default;
    opacity: 0.5;
}
.feature-card.feature-disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border-color);
}

.feature-icon-wrap {
    width: 72px;
    height: 72px;
    margin: 0 auto var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 92, 252, 0.08);
    border: 1px solid rgba(124, 92, 252, 0.15);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
}
.feature-card:hover .feature-icon-wrap {
    background: rgba(124, 92, 252, 0.15);
    transform: scale(1.05);
}

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

.feature-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.feature-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: var(--space-md);
}

.feature-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: var(--success-bg);
    color: var(--success);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(52, 211, 153, 0.2);
}

.feature-arrow {
    position: absolute;
    right: var(--space-lg);
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}
.feature-card:hover .feature-arrow {
    color: var(--accent-primary);
    transform: translateY(-50%) translateX(4px);
}

.badge-coming {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

/* ===== VIDEO NAVIGATION ===== */
.video-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.video-nav-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.video-nav-counter {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-primary);
    background: rgba(124, 92, 252, 0.1);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.current-video-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.admin-video-controls {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

/* ===== VIDEO LIST ===== */
.video-list-section {
    margin-top: var(--space-xl);
    padding: var(--space-lg);
}

.video-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.video-list-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-input);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.video-list-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}
.video-list-item.active {
    border-color: var(--accent-primary);
    background: rgba(124, 92, 252, 0.08);
}

.video-list-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}
.video-list-item.active .video-list-number {
    background: var(--accent-gradient);
    color: #fff;
}

.video-list-thumb {
    width: 64px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.video-list-info {
    flex: 1;
    min-width: 0;
}

.video-list-title {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: normal;
    word-break: break-word;
}

.video-list-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ===== VIDEO BUILDER (ADMIN) ===== */
.videos-builder {
    margin-bottom: var(--space-md);
}

.video-builder-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    animation: slideUp 0.3s ease;
}

.video-builder-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-primary);
    background: rgba(124, 92, 252, 0.1);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    margin-top: 4px;
}

.video-builder-fields {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.video-builder-fields .input-field {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.9rem;
    margin: 0;
}

.video-builder-preview {
    margin-top: var(--space-xs);
}

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

    .feature-arrow {
        display: none;
    }

    .video-nav {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .video-nav-info {
        justify-content: center;
    }

    .admin-video-controls {
        justify-content: center;
    }

    .video-list-thumb {
        display: none;
    }


    .video-builder-item {
        flex-wrap: wrap;
    }
}

/* ===== LANDING CLOCK ===== */
.hero-clock {
    font-size: 0.9rem;
    color: var(--accent-primary);
    font-weight: 500;
    margin-bottom: var(--space-xl);
    letter-spacing: 0.5px;
    opacity: 0.9;
    font-family: 'Space Grotesk', sans-serif;
}

/* ===== WELCOME BANNER ===== */
.welcome-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2xl) var(--space-xl);
    margin-bottom: var(--space-2xl);
    background: linear-gradient(135deg, rgba(124, 92, 252, 0.08), rgba(0, 212, 255, 0.05));
    border: 1px solid rgba(124, 92, 252, 0.15);
    border-radius: var(--radius-xl);
    animation: slideUp 0.6s ease;
    position: relative;
    overflow: hidden;
}
.welcome-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
}

.welcome-left {
    flex: 1;
}

.welcome-greeting {
    font-size: 0.85rem;
    color: var(--accent-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-xs);
}

.welcome-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 700;
    margin-bottom: var(--space-sm);
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
}

.welcome-name-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-emoji {
    font-size: 1.1em !important;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1 !important;
    vertical-align: middle !important;
    animation: wave-animation 2.5s infinite;
    transform-origin: 70% 70%;
    color: initial !important;
    -webkit-text-fill-color: initial !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    text-shadow: none !important;
}

@keyframes wave-animation {
    0% { transform: rotate( 0.0deg) }
    10% { transform: rotate(14.0deg) }
    20% { transform: rotate(-8.0deg) }
    30% { transform: rotate(14.0deg) }
    40% { transform: rotate(-4.0deg) }
    50% { transform: rotate(10.0deg) }
    60% { transform: rotate( 0.0deg) }
    100% { transform: rotate( 0.0deg) }
}

.welcome-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--space-sm);
}

.welcome-msg {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.welcome-right {
    flex-shrink: 0;
    margin-left: var(--space-xl);
}

.welcome-wave {
    font-size: 4rem;
    animation: float 6s ease infinite;
    filter: drop-shadow(0 0 20px rgba(124, 92, 252, 0.3));
}

/* ===== HOME SECTIONS ===== */
.home-section {
    margin-bottom: var(--space-3xl);
    animation: slideUp 0.5s ease;
}

.home-section-header {
    margin-bottom: var(--space-xl);
}

.section-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: var(--space-sm);
}

/* ===== ABOUT SECTION ===== */
.about-text {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    max-width: 700px;
    margin-bottom: var(--space-2xl);
}

/* ===== HIGHLIGHTS GRID ===== */
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.highlight-card {
    padding: var(--space-xl) var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}
.highlight-card:hover {
    border-color: rgba(124, 92, 252, 0.3);
    background: rgba(124, 92, 252, 0.04);
    transform: translateY(-2px);
}

.highlight-icon {
    font-size: 2rem;
    margin-bottom: var(--space-md);
}

.highlight-card h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.highlight-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
}

/* ===== SITE FOOTER ===== */
.site-footer {
    padding: var(--space-2xl) 0;
    margin-top: var(--space-xl);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-content {
    max-width: 500px;
    margin: 0 auto;
}

.footer-brand {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: var(--space-xs);
}

.footer-sub {
    color: var(--text-muted);
    font-size: 0.78rem;
}

/* ===== RESPONSIVE (HOME NEW) ===== */
@media (max-width: 768px) {
    .welcome-banner {
        flex-direction: column;
        text-align: center;
        padding: var(--space-xl);
    }

    .welcome-right {
        margin-left: 0;
        margin-top: var(--space-md);
    }

    .welcome-wave {
        font-size: 2.5rem;
    }

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

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

/* ===== LANDING FEATURES SECTION ===== */
.landing-features-section {
    padding: var(--space-3xl) 0;
    background: linear-gradient(180deg, transparent, rgba(124, 92, 252, 0.02), transparent);
}

.landing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

/* ===== LANDING CTA ===== */
.landing-cta-section {
    padding: var(--space-3xl) 0;
}

.cta-card {
    text-align: center;
    padding: var(--space-3xl);
    background: linear-gradient(135deg, rgba(124, 92, 252, 0.06), rgba(0, 212, 255, 0.04));
    border: 1px solid rgba(124, 92, 252, 0.15);
}

.cta-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.cta-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: var(--space-xl);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== LANDING FOOTER ===== */
.landing-footer {
    padding: var(--space-2xl) var(--space-xl);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

/* ===== ANNOUNCEMENT CARDS ===== */
.announcement-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.announcement-card {
    display: flex;
    gap: var(--space-lg);
    padding: var(--space-lg) var(--space-xl);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    animation: slideUp 0.5s ease;
    align-items: flex-start;
}
.announcement-card:hover {
    border-color: rgba(124, 92, 252, 0.2);
    background: rgba(255, 255, 255, 0.04);
}

.announcement-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 92, 252, 0.08);
    border-radius: var(--radius-md);
}

.announcement-content {
    flex: 1;
    min-width: 0;
}

.announcement-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

.announcement-text {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: var(--space-sm);
}

.announcement-date {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ===== FEATURE STATUS ===== */
.feature-status {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--success);
    margin-top: var(--space-xs);
}

/* Feature card text alignment */
.feature-card {
    text-align: left;
}

@media (max-width: 768px) {
    .announcement-card {
        flex-direction: column;
        gap: var(--space-md);
    }

    .cta-card {
        padding: var(--space-2xl) var(--space-lg);
    }

    .cta-title {
        font-size: 1.4rem;
    }

    .landing-features-section {
        padding: var(--space-2xl) 0;
    }
}
/* ===== GOOGLE SIGN-IN BUTTON ===== */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    background: #ffffff;
    color: #333333;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-google:hover {
    background: #f5f5f5;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

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

.btn-google svg {
    flex-shrink: 0;
}

.auth-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: var(--space-lg);
    line-height: 1.5;
}

/* ===== EDIT BUTTON ===== */
.btn-edit {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all var(--transition-base);
}

.btn-edit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* ===== RESET BUTTON ===== */
.btn-reset {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all var(--transition-base);
}

.btn-reset:hover {
    background: rgba(59, 130, 246, 0.25);
    border-color: #60a5fa;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

/* ===== ANNOUNCEMENT TICKER ===== */
.announcement-ticker {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: linear-gradient(90deg, #110f2c, #071520, #110f2c); /* Opaque solid gradient */
    border-bottom: 1px solid rgba(124, 92, 252, 0.2);
    overflow: hidden;
    height: 32px;
    display: flex;
    align-items: center;
}

.ticker-track {
    display: flex;
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.ticker-content {
    display: inline-block;
    white-space: nowrap;
    animation: tickerScroll 35s linear infinite;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.3px;
    padding-left: 100%;
}

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Adjust body when ticker is visible */
body:has(.announcement-ticker[style*="display: block"]) .navbar {
    top: 32px;
}
body:has(.announcement-ticker[style*="display: block"]) .landing-wrapper {
    padding-top: 32px;
}

/* ===== VIDEO SUMMARY (USER) ===== */
.video-summary-section {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg) var(--space-xl);
    margin-top: var(--space-lg);
}

.video-summary-icon {
    font-size: 1.5rem;
}

.video-summary-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ===== INDIVIDUAL VOTES (TRANSPARENCY) ===== */
.individual-votes {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

.iv-header {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.iv-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-xs);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}
.iv-row:hover {
    background: rgba(124, 92, 252, 0.04);
    border-color: rgba(124, 92, 252, 0.1);
}

.iv-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--accent-primary);
    min-width: 90px;
    flex-shrink: 0;
}

.iv-ratings {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm) var(--space-lg);
    flex: 1;
}

.iv-cat {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.iv-cat-name {
    color: var(--text-muted);
    font-size: 0.75rem;
}

@media (max-width: 768px) {
    .iv-row {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xs);
    }

    .iv-ratings {
        gap: var(--space-xs) var(--space-md);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Selection */
::selection {
    background: rgba(124, 92, 252, 0.3);
    color: #fff;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    background: var(--bg-input);
    padding: var(--space-xs);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xl);
    border: 1px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: var(--space-sm) var(--space-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.auth-tab.active {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.auth-section-content {
    animation: fadeIn 0.3s ease;
}

/* ========================================
   NAKAMA WAVES - Customized Design Overrides
   ======================================== */

/* Center-aligned minimal hero layout (before login) */
.hero-section {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    max-width: 800px !important;
    margin: 0 auto !important;
    gap: var(--space-xl) !important;
}

.hero-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.hero-subtitle {
    margin-left: auto !important;
    margin-right: auto !important;
}

.hero-buttons {
    justify-content: center !important;
}

.hero-visual {
    display: none !important;
}

/* Softer card borders and glassmorphism glow for top-level pages and sections */
.glass-card, .voting-section, .results-section, .video-section, .video-nav, .auth-card {
    background: rgba(14, 14, 24, 0.75) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 16px 45px 0 rgba(0, 0, 0, 0.55), 0 0 25px rgba(124, 92, 252, 0.04), inset 0 1px 0 0 rgba(255, 255, 255, 0.1) !important;
    transition: all var(--transition-base) !important;
}

/* Nested cards inside containers: NO backdrop-blur to prevent rendering stack limits, just nice solid colors with transparency */
.session-card, .announcement-card, .highlight-card, .feature-card, .manage-item {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(124, 92, 252, 0.03)) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(0, 212, 255, 0.25) !important;
    box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.35), 0 0 15px rgba(0, 212, 255, 0.05), inset 0 1px 0 0 rgba(255, 255, 255, 0.05) !important;
    transition: all var(--transition-base) !important;
}

/* Hover effects for interactive cards */
.glass-card:hover {
    border-color: rgba(124, 92, 252, 0.4) !important;
    box-shadow: 0 16px 45px 0 rgba(0, 0, 0, 0.55), 0 0 25px rgba(124, 92, 252, 0.04), inset 0 1px 0 0 rgba(255, 255, 255, 0.1) !important;
    transform: translateY(-4px) !important;
}
.session-card:hover, .announcement-card:hover, .highlight-card:hover, .feature-card:hover, .manage-item:hover {
    border-color: rgba(0, 212, 255, 0.5) !important;
    box-shadow: 0 16px 40px 0 rgba(0, 0, 0, 0.65), 0 0 25px rgba(0, 212, 255, 0.25), inset 0 1px 0 0 rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-4px) !important;
}

/* Welcome banner styling to preserve gradient color and borders while adding glass blur & shadow */
.welcome-banner {
    background: linear-gradient(135deg, rgba(124, 92, 252, 0.12), rgba(0, 212, 255, 0.08)) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(124, 92, 252, 0.25) !important;
    box-shadow: 0 12px 35px 0 rgba(0, 0, 0, 0.5), 0 0 20px rgba(124, 92, 252, 0.05), inset 0 1px 0 0 rgba(255, 255, 255, 0.1) !important;
}

/* Clearer premium back button style */
.btn-back {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: var(--text-secondary) !important;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 18px !important;
    border-radius: var(--radius-md) !important;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    margin-bottom: var(--space-lg);
    transition: all var(--transition-fast) !important;
}
.btn-back:hover {
    color: var(--text-primary) !important;
    border-color: var(--accent-primary) !important;
    background: rgba(124, 92, 252, 0.08) !important;
    box-shadow: 0 0 15px rgba(124, 92, 252, 0.2) !important;
}

/* About section custom background and styling - no backdrop blur to optimize performance */
#about-section {
    background: linear-gradient(135deg, rgba(124, 92, 252, 0.04), rgba(0, 212, 255, 0.04)) !important;
    border: 1px solid rgba(124, 92, 252, 0.15) !important;
    border-radius: var(--radius-lg) !important;
    padding: var(--space-xl) !important;
    margin-top: var(--space-2xl) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25) !important;
}

/* Emojis default coloring fix */
.emoji-normal {
    color: initial !important;
    -webkit-text-fill-color: initial !important;
    text-shadow: none !important;
    display: inline-block !important;
}

/* ========================================
   NAKAMA WAVES - Light Mode Design Overrides
   ======================================== */
:root[data-theme="light"] .glass-card, 
:root[data-theme="light"] .voting-section, 
:root[data-theme="light"] .results-section, 
:root[data-theme="light"] .video-section, 
:root[data-theme="light"] .video-nav, 
:root[data-theme="light"] .auth-card {
    background: rgba(255, 255, 255, 0.65) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 12px 35px 0 rgba(31, 31, 47, 0.08), 0 0 20px rgba(124, 92, 252, 0.02), inset 0 1px 0 0 rgba(255, 255, 255, 0.6) !important;
}

:root[data-theme="light"] .session-card, 
:root[data-theme="light"] .announcement-card, 
:root[data-theme="light"] .highlight-card, 
:root[data-theme="light"] .feature-card, 
:root[data-theme="light"] .manage-item {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.12), rgba(124, 92, 252, 0.04)) !important;
    border: 1px solid rgba(0, 212, 255, 0.3) !important;
    box-shadow: 0 12px 35px 0 rgba(31, 31, 47, 0.08), 0 0 15px rgba(0, 212, 255, 0.08), inset 0 1px 0 0 rgba(255, 255, 255, 0.6) !important;
}

:root[data-theme="light"] .glass-card:hover {
    border-color: rgba(124, 92, 252, 0.4) !important;
    box-shadow: 0 16px 40px 0 rgba(31, 31, 47, 0.12), 0 0 25px rgba(124, 92, 252, 0.15), inset 0 1px 0 0 rgba(255, 255, 255, 0.8) !important;
}

:root[data-theme="light"] .session-card:hover, 
:root[data-theme="light"] .announcement-card:hover, 
:root[data-theme="light"] .highlight-card:hover, 
:root[data-theme="light"] .feature-card:hover, 
:root[data-theme="light"] .manage-item:hover {
    border-color: rgba(0, 212, 255, 0.55) !important;
    box-shadow: 0 16px 40px 0 rgba(31, 31, 47, 0.12), 0 0 25px rgba(0, 212, 255, 0.25), inset 0 1px 0 0 rgba(255, 255, 255, 0.8) !important;
}

:root[data-theme="light"] .welcome-banner {
    background: linear-gradient(135deg, rgba(124, 92, 252, 0.12), rgba(0, 212, 255, 0.08)) !important;
    border: 1px solid rgba(124, 92, 252, 0.2) !important;
    box-shadow: 0 12px 35px 0 rgba(31, 31, 47, 0.08), inset 0 1px 0 0 rgba(255, 255, 255, 0.5) !important;
}

:root[data-theme="light"] #about-section {
    background: linear-gradient(135deg, rgba(124, 92, 252, 0.04), rgba(0, 212, 255, 0.04)) !important;
    border: 1px solid rgba(124, 92, 252, 0.15) !important;
    box-shadow: 0 8px 32px 0 rgba(31, 31, 47, 0.05) !important;
}

:root[data-theme="light"] .navbar {
    background: rgba(244, 244, 249, 0.8) !important;
}

:root[data-theme="light"] .input-field {
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #1e1e2f !important;
}
:root[data-theme="light"] .input-field:focus {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: var(--accent-primary) !important;
}
:root[data-theme="light"] .btn-google {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    color: #1e1e2f !important;
}
:root[data-theme="light"] .btn-google:hover {
    background: #f8f9fa !important;
}
:root[data-theme="light"] .auth-tabs {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.06) !important;
}
:root[data-theme="light"] .auth-tab:not(.active) {
    color: var(--text-secondary) !important;
}
:root[data-theme="light"] .btn-outline {
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: var(--text-primary) !important;
}
:root[data-theme="light"] .btn-outline:hover {
    background: rgba(124, 92, 252, 0.06) !important;
    border-color: var(--accent-primary) !important;
}
:root[data-theme="light"] .btn-back {
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
}
:root[data-theme="light"] .btn-back:hover {
    background: rgba(124, 92, 252, 0.06) !important;
}
:root[data-theme="light"] .video-list-item {
    background: rgba(0, 0, 0, 0.03) !important;
}
:root[data-theme="light"] .video-list-item:hover {
    background: rgba(0, 0, 0, 0.05) !important;
}
:root[data-theme="light"] .video-list-item.active {
    background: rgba(124, 92, 252, 0.06) !important;
    border-color: var(--accent-primary) !important;
}
:root[data-theme="light"] .result-item {
    background: rgba(0, 0, 0, 0.02) !important;
}
:root[data-theme="light"] .result-bar-container {
    background: rgba(0, 0, 0, 0.05) !important;
}
:root[data-theme="light"] .video-list-number {
    background: rgba(0, 0, 0, 0.03) !important;
}
:root[data-theme="light"] .video-list-item.active .video-list-number {
    background: var(--accent-gradient) !important;
}
:root[data-theme="light"] .announcement-ticker {
    background: linear-gradient(90deg, #eae8f7, #e1edf2, #eae8f7) !important; /* Opaque solid gradient */
    border-bottom-color: rgba(124, 92, 252, 0.12) !important;
}
:root[data-theme="light"] .ticker-content {
    color: var(--text-primary) !important;
}

/* Smooth Transitions for Theme Swapping */
body, .navbar, .glass-card, .session-card, .announcement-card, .highlight-card, .welcome-banner, .feature-card, .voting-section, .results-section, .video-section, .video-nav, .auth-card, .manage-item, .input-field, .btn-outline, .btn-google, .btn-back, .video-list-item {
    transition: background-color var(--transition-base), background var(--transition-base), border-color var(--transition-base), border var(--transition-base), color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base) !important;
}

/* Floating Theme Toggle Style */
.floating-theme-toggle {
    position: fixed;
    top: var(--space-md);
    right: var(--space-md);
    z-index: 101;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all var(--transition-fast) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.floating-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
    transform: scale(1.05);
}
:root[data-theme="light"] .floating-theme-toggle {
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
    color: #1e1e2f !important;
}
:root[data-theme="light"] .floating-theme-toggle:hover {
    background: #ffffff !important;
    border-color: var(--accent-primary) !important;
}

/* ==========================================================================
   PERFORMANCE OPTIMIZATIONS (Smooth Scrolling & Lag Reduction)
   ========================================================================== */

/* 1. On Tablets & Mobile: Disable heavy backdrop-filters completely to guarantee buttery-smooth 60fps scrolling.
      We also make the card background slightly more solid so elements remain readable and distinct. */
@media (max-width: 1024px) {
    .glass-card, 
    .navbar, 
    .floating-card, 
    .video-nav,
    .highlight-card,
    .auth-card,
    .create-form,
    [class*="glass"], 
    [class*="card"] {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    
    :root {
        --bg-card: rgba(22, 22, 37, 0.96) !important;
        --bg-card-hover: rgba(30, 30, 50, 0.98) !important;
    }
    
    :root[data-theme="light"] {
        --bg-card: rgba(255, 255, 255, 0.96) !important;
        --bg-card-hover: rgba(245, 245, 250, 0.98) !important;
    }
    
    .navbar {
        background: var(--bg-secondary) !important;
    }
}

/* 2. On Desktops: Reduce the blur radius from 20px/30px to a lightweight 10px to reduce GPU shader workloads by 60%. */
@media (min-width: 1025px) {
    .glass-card, 
    .navbar, 
    .video-nav,
    .highlight-card,
    .auth-card,
    .create-form,
    [class*="glass"] {
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
    }
}

/* ========================================
   NAKAMA WAVES - Tournament Styles
   ======================================== */

.tourney-setup-grid {
    animation: fadeIn 0.4s ease;
    position: relative;
    padding-left: 482px; /* 450px width + 32px gap */
    min-height: 500px;
}

.tourney-player-stats-card {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 450px;
    display: flex;
    flex-direction: column;
    height: 100% !important;
}

.tourney-main-content {
    width: 100%;
}

.player-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.player-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--space-xs);
}

.player-idx {
    width: 36px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-primary);
    background: rgba(124, 92, 252, 0.1);
    border-right: 1px solid var(--border-color);
    flex-shrink: 0;
}

.player-name-inp {
    flex: 1;
    border: none !important;
    background: transparent !important;
    padding: 6px var(--space-md) !important;
    font-size: 0.9rem !important;
    box-shadow: none !important;
}

.player-del {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 0 var(--space-md);
    transition: color var(--transition-fast);
}
.player-del:hover:not(.disabled) {
    color: var(--error);
}
.player-del.disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

.slots-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px;
    margin-bottom: var(--space-md);
}

.slot-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 4px;
    transition: border-color var(--transition-fast);
}
.slot-row.filled {
    border-color: rgba(52, 211, 153, 0.4);
}

.slot-num {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-muted);
    min-width: 24px;
    text-align: center;
}

.slot-name-input {
    flex: 1;
    padding: 6px var(--space-md) !important;
    font-size: 0.85rem !important;
    margin: 0 !important;
}

.slot-url-input {
    flex: 2;
    padding: 6px var(--space-md) !important;
    font-size: 0.85rem !important;
    margin: 0 !important;
}

.slot-ok {
    color: var(--success);
    font-size: 1.1rem;
    padding-right: 8px;
    display: flex;
    align-items: center;
}

/* VS Matchup Layout */
.vs-wrap {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--space-md);
    align-items: start;
    margin-bottom: var(--space-xl);
}

.vs-badge {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--text-muted);
    text-align: center;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.competitor {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    overflow: hidden;
    transition: all var(--transition-base) !important;
}
.competitor.leader {
    border-color: rgba(52, 211, 153, 0.5) !important;
    box-shadow: 0 0 30px rgba(52, 211, 153, 0.15), inset 0 1px 0 0 rgba(255, 255, 255, 0.1) !important;
}

.comp-name {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255,255,255,0.01);
}

/* Tourney Match Section Width Limit Extension */
#tourney-sec-match {
    max-width: 1300px !important;
    width: 95%;
    margin: 0 auto;
}

.comp-video {
    background: #000 !important;
    aspect-ratio: 16/9;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.comp-video .iframe-wrap {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    background: #000 !important;
}

.comp-video .iframe-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    border: none;
    background: #000 !important;
}

.comp-video video {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    background: #000 !important;
    border: none;
}

.vote-count {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    padding: var(--space-sm) var(--space-md);
    color: var(--text-secondary);
    background: rgba(255,255,255,0.02);
}

/* Voters Grid */
.voters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-md);
}

.voter-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-sm);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}
.voter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    transition: background var(--transition-fast);
}
.voter-card.pending::before {
    background: var(--accent-primary);
}
.voter-card.voted-left::before {
    background: var(--accent-primary);
}
.voter-card.voted-right::before {
    background: var(--accent-secondary);
}

.voter-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
    text-transform: uppercase;
    margin-bottom: var(--space-sm);
    text-align: center;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.voter-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xs);
}

.voter-btn {
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 4px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.voter-btn:hover:not(:disabled) {
    border-color: var(--border-hover);
    color: var(--text-primary);
}
.voter-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.voter-btn.chose-left:hover:not(:disabled) {
    background: rgba(124, 92, 252, 0.15);
    border-color: var(--accent-primary);
    color: #a78bfa;
}
.voter-btn.chose-right:hover:not(:disabled) {
    background: rgba(0, 212, 255, 0.15);
    border-color: var(--accent-secondary);
    color: #22d3ee;
}
.voter-btn.sel-left {
    background: rgba(124, 92, 252, 0.25) !important;
    border-color: var(--accent-primary) !important;
    color: #c084fc !important;
    font-weight: 700;
}
.voter-btn.sel-right {
    background: rgba(0, 212, 255, 0.25) !important;
    border-color: var(--accent-secondary) !important;
    color: #67e8f9 !important;
    font-weight: 700;
}

.voter-arrow {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-primary);
    text-align: center;
    margin-top: 6px;
    opacity: 0;
    transition: opacity var(--transition-fast);
    line-height: 1;
}
.voter-card.voted-left .voter-arrow,
.voter-card.voted-right .voter-arrow {
    opacity: 1;
}

.vdot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-color);
    transition: background var(--transition-fast);
}
.vdot.active {
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
}

.voter-dots {
    display: flex;
    gap: var(--space-xs);
}

/* Bracket Panel styles */
.bracket-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    max-height: 450px;
    overflow-y: auto;
    padding: var(--space-lg);
}

.bracket-round-group {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-md);
    margin-bottom: var(--space-md);
}
.bracket-round-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.bracket-round-lbl {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-primary);
    letter-spacing: 1.5px;
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
}

.bracket-matches {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-sm);
}

.double-elim-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    width: 100%;
}
.bracket-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}
.bracket-section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: var(--space-xs);
    border-left: 3px solid var(--accent-primary);
    padding-left: 10px;
    color: var(--text-primary);
}
.bracket-section:nth-of-type(2) .bracket-section-title {
    border-left-color: var(--error);
}
.bracket-section:nth-of-type(3) .bracket-section-title {
    border-left-color: var(--warning);
}
.bracket-rounds-container {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    padding-bottom: 8px;
}
.bracket-rounds-container.justify-center {
    justify-content: center;
}
.bracket-column {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}
.bracket-column-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 4px;
    margin-bottom: 4px;
    text-align: center;
}
.bm {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    transition: all var(--transition-fast);
}
.bm.current {
    border-color: var(--accent-primary);
    box-shadow: 0 0 12px rgba(124, 92, 252, 0.2);
    background: rgba(124, 92, 252, 0.03);
}
.bm-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 4px;
    margin-bottom: 4px;
}
.bm-team {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
}
.bm-team.won {
    color: var(--success);
    font-weight: 700;
}
.bm-team.lost {
    color: var(--text-muted);
    text-decoration: line-through;
    opacity: 0.6;
}
.bm-team-name {
    white-space: normal;
    word-break: break-word;
    flex-grow: 1;
    margin-right: 8px;
}
.bm-team-score {
    font-weight: 700;
}

/* ===== PREMIUM PODIUM REDESIGN (MATCH-CARD STYLE) ===== */
.premium-podium-container {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
    justify-content: center;
    margin: var(--space-lg) auto 0 auto;
    width: 100%;
    max-width: 1000px;
    padding-top: 30px;
    padding-bottom: 20px;
}

.premium-podium-card {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 2px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: var(--radius-lg) !important;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    transition: all var(--transition-base) !important;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex: 1 1 0;
    min-width: 0;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 0 rgba(255, 255, 255, 0.05) !important;
    /* Prevent hardware accelerated layout shifts on children */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
}

.premium-podium-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    z-index: 1;
}

/* Rank 1: Gold - Shifted up and scaled slightly */
.premium-podium-card.rank-1 {
    order: 2;
    border-color: rgba(251, 191, 36, 0.5) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(251, 191, 36, 0.15), inset 0 1px 0 0 rgba(255, 255, 255, 0.1) !important;
    transform: translate3d(0, -20px, 0) scale(1.03);
    z-index: 2;
}
.premium-podium-card.rank-1::before {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}
.premium-podium-card.rank-1:hover {
    border-color: rgba(251, 191, 36, 0.8) !important;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.5), 0 0 35px rgba(251, 191, 36, 0.25), inset 0 1px 0 0 rgba(255, 255, 255, 0.1) !important;
    transform: translate3d(0, -24px, 0) scale(1.05) !important;
}

/* Rank 2: Silver - Slightly shifted up */
.premium-podium-card.rank-2 {
    order: 1;
    border-color: rgba(148, 163, 184, 0.3) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(148, 163, 184, 0.05), inset 0 1px 0 0 rgba(255, 255, 255, 0.05) !important;
    transform: translate3d(0, -5px, 0);
}
.premium-podium-card.rank-2::before {
    background: linear-gradient(90deg, #cbd5e1, #94a3b8);
}
.premium-podium-card.rank-2:hover {
    border-color: rgba(148, 163, 184, 0.6) !important;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.45), 0 0 25px rgba(148, 163, 184, 0.15), inset 0 1px 0 0 rgba(255, 255, 255, 0.05) !important;
    transform: translate3d(0, -9px, 0) !important;
}

/* Rank 3: Bronze - Slightly shifted down */
.premium-podium-card.rank-3 {
    order: 3;
    border-color: rgba(251, 146, 60, 0.3) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(251, 146, 60, 0.05), inset 0 1px 0 0 rgba(255, 255, 255, 0.05) !important;
    transform: translate3d(0, 10px, 0);
}
.premium-podium-card.rank-3::before {
    background: linear-gradient(90deg, #fdba74, #fb923c);
}
.premium-podium-card.rank-3:hover {
    border-color: rgba(251, 146, 60, 0.6) !important;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.45), 0 0 25px rgba(251, 146, 60, 0.15), inset 0 1px 0 0 rgba(255, 255, 255, 0.05) !important;
    transform: translate3d(0, 6px, 0) !important;
}

/* Card Role/Label */
.podium-card-role {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: var(--space-sm) var(--space-md);
    font-weight: 800;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.rank-1 .podium-card-role {
    color: #fbbf24;
    background: rgba(251,191,36,0.06);
}
.rank-2 .podium-card-role {
    color: #cbd5e1;
    background: rgba(203,213,225,0.06);
}
.rank-3 .podium-card-role {
    color: #fb923c;
    background: rgba(251,146,60,0.06);
}

/* Card Name */
.podium-card-name {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    padding: var(--space-sm) var(--space-md);
    white-space: normal;
    word-break: break-word;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

/* Card Video Wrap */
.podium-video-wrap {
    background: #000;
    aspect-ratio: 16/9;
    width: 100%;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    margin-top: auto;
}
.podium-video-wrap .iframe-wrap {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    background: #000;
}
.podium-video-wrap .iframe-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    border: none;
    background: #000 !important;
}
.podium-video-wrap video {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    background: #000 !important;
    border: none;
}

/* Rank Video in Full Bracket */
.rank-item {
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    overflow: hidden;
    padding: 0 !important;
}

.rank-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 8px var(--space-md);
}

.rank-badge {
    font-size: 0.85rem;
    border: 1px solid;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-weight: 700;
}

.rank-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    white-space: normal;
    word-break: break-word;
}

.rank-video-inner {
    position: relative;
    padding-bottom: 56.25%;
    background: #000;
}
.rank-video-inner iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ===== PREMIUM PLAYER STATS TIMELINE REDESIGN ===== */
.pstat-player {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    padding: 18px !important;
    margin-bottom: var(--space-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.pstat-name-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: border-color 0.2s ease, margin-bottom 0.2s ease, padding-bottom 0.2s ease;
}

.pstat-player.collapsed .pstat-name-header {
    border-bottom-color: transparent !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.pstat-chevron {
    transition: transform 0.2s ease;
    color: var(--text-muted);
}

.pstat-player.collapsed .pstat-chevron {
    transform: rotate(-90deg);
}

.pstat-timeline {
    position: relative;
    padding-left: 20px;
    border-left: 2px dashed rgba(255, 255, 255, 0.1);
    margin-left: 6px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pstat-timeline-node {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pstat-node-indicator {
    position: absolute;
    left: -28px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    border: 2px solid var(--border-color);
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.pstat-node-indicator.won {
    border-color: var(--success);
    color: var(--success);
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.3);
}

.pstat-node-indicator.lost {
    border-color: var(--error);
    color: var(--error);
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.3);
}

.pstat-node-content {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: all var(--transition-base);
}

.pstat-node-content.won {
    border-left: 3px solid var(--success);
    background: rgba(16, 185, 129, 0.02);
}

.pstat-node-content.lost {
    border-left: 3px solid rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.01);
    opacity: 0.75;
}

.pstat-node-content:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

.pstat-node-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    gap: 8px;
}

.pstat-node-meta span:first-child {
    word-break: break-all;
    white-space: normal;
}

.pstat-node-meta span:last-child {
    flex-shrink: 0;
}

.pstat-node-pick {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
}

.pstat-node-content.won .pstat-node-pick {
    color: #34d399;
}

.pstat-node-content.lost .pstat-node-pick {
    color: var(--text-secondary);
    text-decoration: line-through;
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .vs-wrap {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }
    .vs-badge {
        padding: 4px 0;
        font-size: 1.2rem;
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
        width: 100%;
    }
    .tourney-setup-grid {
        position: static !important;
        padding-left: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: var(--space-lg) !important;
    }
    .tourney-player-stats-card {
        position: static !important;
        width: 100% !important;
        height: auto !important;
    }
    .pstat-scroll-container {
        max-height: 400px !important;
        flex: none !important;
    }
    .tourney-main-content {
        width: 100% !important;
    }
}

/* ===== MODAL / OVERLAY ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 7, 13, 0.85);
    backdrop-filter: blur(10px);
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: var(--space-md);
}

.modal-overlay.open {
    display: flex; /* Shown when 'open' class is added */
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 450px;
    padding: var(--space-xl);
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    animation: modal-enter 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modal-enter {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* ===== CUSTOM CONFIRM DIALOG ===== */
.nw-confirm-overlay {
    z-index: 99990;
}

.nw-confirm-box {
    max-width: 400px;
    text-align: center;
    padding: var(--space-2xl);
}

.nw-confirm-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md) auto;
    font-size: 1.5rem;
    color: #f87171;
    transition: background var(--transition-base), border-color var(--transition-base);
}

.nw-confirm-icon-wrap.warn {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.nw-confirm-icon-wrap.danger {
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.3);
    color: #f87171;
}

.nw-confirm-icon-wrap.info {
    background: rgba(0, 212, 255, 0.12);
    border-color: rgba(0, 212, 255, 0.3);
    color: #00d4ff;
}

.nw-confirm-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    font-family: 'Space Grotesk', sans-serif;
}

.nw-confirm-msg {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    line-height: 1.6;
}

.nw-confirm-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
}

.nw-confirm-btn-cancel {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.nw-confirm-btn-cancel:hover {
    border-color: var(--text-muted) !important;
    background: rgba(255,255,255,0.05) !important;
}

.nw-confirm-btn-ok {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-md);
}

.nw-confirm-btn-ok.danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.nw-confirm-btn-ok.warn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #07070d;
}

.nw-confirm-btn-ok.info {
    background: linear-gradient(135deg, #00d4ff, #0088cc);
    color: #07070d;
}

:root[data-theme="light"] .nw-confirm-overlay {
    background: rgba(240, 240, 255, 0.8);
}

:root[data-theme="light"] .nw-confirm-icon-wrap.danger {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.25);
    color: #dc2626;
}

:root[data-theme="light"] .nw-confirm-icon-wrap.warn {
    background: rgba(217, 119, 6, 0.08);
    border-color: rgba(217, 119, 6, 0.25);
    color: #d97706;
}

:root[data-theme="light"] .nw-confirm-icon-wrap.info {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.25);
    color: #2563eb;
}

:root[data-theme="light"] .nw-confirm-btn-ok.info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
}

/* ===== AUTOMATIC PERFORMANCE OPTIMIZATIONS (GLOBAL ANTI-FLICKER) ===== */
/* Disable CPU-heavy backdrop blurs globally for ALL elements to prevent screen flickering/flashing during real-time updates */
.glass-card,
.announcement-card,
.session-card,
.feature-card,
.welcome-banner,
.highlight-card,
.auth-card,
.manage-item,
.voting-section,
.results-section,
.video-section,
.video-nav,
.bracket-column,
.bm,
.navbar,
.create-form,
[class*="glass"],
.floating-card,
.floating-theme-toggle,
.toast,
.loading-overlay,
.modal-content,
.nw-confirm {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Set solid dark backgrounds and clean shadows to cards/panels to prevent rendering lag on desktop */
.glass-card,
.announcement-card,
.session-card,
.feature-card,
.welcome-banner,
.highlight-card,
.auth-card,
.manage-item,
.voting-section,
.results-section,
.video-section,
.video-nav,
.bracket-column,
.bm {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
    background: #0f0f18 !important; /* Rich solid dark background instead of heavy transparent blur */
    border-color: rgba(255, 255, 255, 0.1) !important;
}

:root[data-theme="light"] .glass-card,
:root[data-theme="light"] .announcement-card,
:root[data-theme="light"] .session-card,
:root[data-theme="light"] .feature-card,
:root[data-theme="light"] .welcome-banner,
:root[data-theme="light"] .highlight-card,
:root[data-theme="light"] .auth-card,
:root[data-theme="light"] .manage-item,
:root[data-theme="light"] .voting-section,
:root[data-theme="light"] .results-section,
:root[data-theme="light"] .video-section,
:root[data-theme="light"] .video-nav,
:root[data-theme="light"] .bracket-column,
:root[data-theme="light"] .bm {
    background: #ffffff !important; /* Solid light background */
    border-color: rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
}

/* Auth Subview Switch Animations */
#email-login-subview, 
#email-register-subview, 
#email-forgot-subview {
    animation: authSubFade 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes authSubFade {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* ========================================
   BLIND RANKING — Styles
   ======================================== */

/* Session Header */
.br-session-header {
    margin-bottom: var(--space-lg);
}
.br-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
    margin-top: var(--space-xs);
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.br-meta-row i { color: var(--accent-primary); }

/* Progress Section */
.br-progress-section {
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-lg);
    border-radius: var(--radius-lg);
}
.br-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Player Card */
.br-player-section {
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-lg);
}
.br-video-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}
.br-video-name {
    margin: 0;
    font-size: 1.05rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* Admin Navigation Controls */
.br-admin-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-top: 1px solid var(--border-color);
    margin-top: var(--space-md);
    flex-wrap: wrap;
}
.br-admin-label {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Rank Selection Section */
.br-rank-section {
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
    margin-top: var(--space-md);
}
.br-rank-title {
    margin: 0 0 var(--space-md) 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Rank Buttons Grid */
.rank-buttons-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}
.rank-btn {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    font-family: var(--font-mono, 'Inter', sans-serif);
}
.rank-btn:hover:not([disabled]) {
    border-color: var(--accent-primary);
    background: rgba(124, 92, 252, 0.15);
    transform: scale(1.12);
    box-shadow: 0 0 16px var(--accent-glow);
}
.rank-btn.selected {
    background: var(--accent-gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 0 20px var(--accent-glow);
    transform: scale(1.08);
}
.rank-btn.used {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-muted);
    opacity: 0.45;
    cursor: not-allowed;
    text-decoration: line-through;
    transform: none;
}
.rank-btn.disabled,
.rank-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}
.rank-num { line-height: 1; }

/* Status Messages */
.rank-chosen-msg {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: var(--success-bg);
    border: 1px solid rgba(52, 211, 153, 0.3);
    border-radius: var(--radius-md);
    color: var(--success);
    font-size: 0.9rem;
    font-weight: 500;
}
.rank-hint {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Results List */
.br-results-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}
.blind-result-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
}
.blind-result-item:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}
.blind-result-rank {
    font-size: 1.7rem;
    min-width: 48px;
    text-align: center;
    font-weight: 800;
    color: var(--text-muted);
    flex-shrink: 0;
    line-height: 1;
    padding-top: 2px;
}
.blind-result-rank.medal-gold   { color: #fbbf24; }
.blind-result-rank.medal-silver { color: #9ca3af; }
.blind-result-rank.medal-bronze { color: #d97706; }
.blind-result-info {
    flex: 1;
    min-width: 0;
}
.blind-result-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}
.blind-result-meta {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Voter Chips */
.br-voter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: var(--space-sm);
}
.br-voter-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.br-voter-chip strong { color: var(--accent-primary); }

/* Results header */
.results-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

/* Responsive */
@media (max-width: 600px) {
    .rank-btn { width: 44px; height: 44px; font-size: 1rem; }
    .br-player-section { padding: var(--space-md); }
    .br-admin-controls { gap: var(--space-sm); }
    .blind-result-rank { font-size: 1.3rem; min-width: 36px; }
}

/* Blind Ranking Voter Cards styles */
.br-voter-rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: rgba(124, 92, 252, 0.1);
    border: 1px dashed rgba(124, 92, 252, 0.3);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}
.br-voter-rank-badge.voted {
    background: var(--accent-gradient);
    border: 1px solid transparent;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 800;
    box-shadow: 0 0 12px var(--accent-glow);
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.br-voter-rank-badge.pending {
    background: var(--bg-secondary);
    border: 1px dashed var(--border-color);
    color: var(--text-muted);
    font-style: italic;
    font-weight: 400;
}

@keyframes scaleIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Styling for Select and option elements in dark mode */
select.voter-btn {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath fill='%239ca3af' d='M0 2l4 4 4-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 24px;
}
select.voter-btn option {
    background-color: var(--bg-tertiary, #1f2937);
    color: var(--text-primary, #ffffff);
}

/* Progressive Reveal Video List Styles */
.video-list-thumb-placeholder {
    width: 64px;
    height: 36px;
    border-radius: 4px;
    background: var(--bg-tertiary);
    border: 1px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    flex-shrink: 0;
}
.video-list-item.locked {
    cursor: default;
    opacity: 0.7;
}
.video-list-item.locked:hover {
    background: var(--bg-input) !important;
    border-color: var(--border-color) !important;
}

/* Blind Ranking Results Statistics Styling (Circular Medals & Gradient Bars) */
.blind-result-rank {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-muted);
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.blind-result-rank.medal-gold {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.25);
    font-size: 1.8rem;
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.3));
}
.blind-result-rank.medal-silver {
    color: #cbd5e1;
    background: rgba(203, 213, 225, 0.1);
    border: 1px solid rgba(203, 213, 225, 0.25);
    font-size: 1.8rem;
    filter: drop-shadow(0 0 8px rgba(203, 213, 225, 0.25));
}
.blind-result-rank.medal-bronze {
    color: #d97706;
    background: rgba(217, 119, 6, 0.1);
    border: 1px solid rgba(217, 119, 6, 0.25);
    font-size: 1.8rem;
    filter: drop-shadow(0 0 8px rgba(217, 119, 6, 0.3));
}
.result-bar-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
    margin: var(--space-xs) 0;
}
.result-bar {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #38bdf8, #06b6d4) !important;
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.br-voter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}
.br-voter-chip:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}
.br-voter-chip i {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.br-voter-chip strong {
    color: #a855f7;
    margin-left: 2px;
}

/* Champion Podium Layout */
.br-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    padding: var(--space-md) 0;
    width: 100%;
}
.podium-card {
    flex: 1;
    min-width: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg) var(--space-md);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.podium-card:hover {
    transform: translateY(-8px);
}
.podium-badge {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: var(--space-md);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.podium-thumb-container {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--space-md);
    background: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.podium-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.podium-card:hover .podium-thumb {
    transform: scale(1.05);
}
.podium-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    width: 100%;
    white-space: normal;
    word-break: break-word;
}
.podium-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}
.podium-meta strong {
    color: var(--accent-primary);
    font-size: 0.95rem;
}

/* Gold Podium (1st Place) */
.podium-gold {
    order: 2; /* Center in flexbox ordering */
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.03), rgba(251, 191, 36, 0.07));
    border-color: rgba(251, 191, 36, 0.25);
    box-shadow: 0 10px 30px -10px rgba(251, 191, 36, 0.15);
    padding: var(--space-xl) var(--space-md); /* Elevate height visually */
}
.podium-gold:hover {
    box-shadow: 0 15px 35px -5px rgba(251, 191, 36, 0.25);
    border-color: rgba(251, 191, 36, 0.45);
}
.podium-gold .podium-badge {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

/* Silver Podium (2nd Place) */
.podium-silver {
    order: 1; /* Left side */
    background: linear-gradient(135deg, rgba(203, 213, 225, 0.03), rgba(203, 213, 225, 0.07));
    border-color: rgba(203, 213, 225, 0.2);
    box-shadow: 0 8px 25px -10px rgba(203, 213, 225, 0.1);
}
.podium-silver:hover {
    box-shadow: 0 12px 30px -5px rgba(203, 213, 225, 0.2);
    border-color: rgba(203, 213, 225, 0.4);
}
.podium-silver .podium-badge {
    background: rgba(203, 213, 225, 0.15);
    color: #cbd5e1;
    border: 1px solid rgba(203, 213, 225, 0.3);
}

/* Bronze Podium (3rd Place) */
.podium-bronze {
    order: 3; /* Right side */
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.03), rgba(217, 119, 6, 0.07));
    border-color: rgba(217, 119, 6, 0.2);
    box-shadow: 0 8px 25px -10px rgba(217, 119, 6, 0.1);
}
.podium-bronze:hover {
    box-shadow: 0 12px 30px -5px rgba(217, 119, 6, 0.2);
    border-color: rgba(217, 119, 6, 0.4);
}
.podium-bronze .podium-badge {
    background: rgba(217, 119, 6, 0.15);
    color: #d97706;
    border: 1px solid rgba(217, 119, 6, 0.3);
}

/* Mobile responsive styling for podium */
@media (max-width: 768px) {
    .br-podium {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-md);
    }
    .podium-card {
        order: unset !important; /* Stack vertically */
        padding: var(--space-lg) !important;
    }
    .podium-card:hover {
        transform: translateY(-4px);
    }
}


/* ========================================
   KING OF THE HILL – DOUBLE LIFE
   KOTH Arena Styles
   ======================================== */

/* Phase Banner */
.koth-phase-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-xl);
    background: linear-gradient(135deg, rgba(124,92,252,0.15), rgba(0,212,255,0.15));
    border: 1px solid rgba(124,92,252,0.3);
    border-radius: var(--radius-full);
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--accent-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: var(--space-lg);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    animation: fadeIn 0.4s ease;
}
.koth-phase-banner.phase-losers {
    background: linear-gradient(135deg, rgba(248,113,113,0.15), rgba(251,191,36,0.15));
    border-color: rgba(248,113,113,0.3);
    color: #f87171;
}
.koth-phase-banner.phase-final {
    background: linear-gradient(135deg, rgba(251,191,36,0.2), rgba(124,92,252,0.2));
    border-color: rgba(251,191,36,0.5);
    color: #fbbf24;
    font-size: 1rem;
    animation: koth-pulse 2s ease infinite;
}
@keyframes koth-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(251,191,36,0); }
    50% { box-shadow: 0 0 20px 4px rgba(251,191,36,0.3); }
}

/* KOTH Arena Layout */
.koth-arena {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--space-md);
    align-items: stretch;
    margin-bottom: var(--space-xl);
}

/* KOTH Card Base */
.koth-king-card,
.koth-challenger-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow: hidden;
    transition: all var(--transition-base);
    position: relative;
}

/* King Card - gold border */
.koth-king-card {
    border: 2px solid rgba(251,191,36,0.5) !important;
    box-shadow: 0 0 25px rgba(251,191,36,0.15) !important;
}
.koth-king-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}
.koth-king-card:hover {
    border-color: rgba(251,191,36,0.8) !important;
    box-shadow: 0 0 35px rgba(251,191,36,0.25) !important;
}

/* Challenger Card - cyan border */
.koth-challenger-card {
    border: 2px solid rgba(0,212,255,0.35) !important;
    box-shadow: 0 0 20px rgba(0,212,255,0.1) !important;
}
.koth-challenger-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00d4ff, #7c5cfc);
}
.koth-challenger-card:hover {
    border-color: rgba(0,212,255,0.6) !important;
    box-shadow: 0 0 30px rgba(0,212,255,0.2) !important;
}

/* Card Role Label */
.koth-card-role {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: var(--space-sm) var(--space-md);
    font-weight: 800;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fbbf24;
    background: rgba(251,191,36,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Card Name */
.koth-card-name {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    padding: var(--space-sm) var(--space-md);
    white-space: normal;
    word-break: break-word;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

/* Lives Display */
.koth-lives {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: var(--space-xs) var(--space-md);
    font-size: 1rem;
}
.koth-lives .koth-heart-full { color: #f87171; font-size: 1rem; }
.koth-lives .koth-heart-empty { color: var(--text-muted); font-size: 1rem; opacity: 0.4; }

/* Streak Badge */
.koth-streak {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px var(--space-sm);
    margin: 0 var(--space-md);
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(52,211,153,0.1);
    border: 1px solid rgba(52,211,153,0.3);
    border-radius: var(--radius-full);
    color: var(--success);
    width: fit-content;
}

/* Video Wrap inside KOTH card */
.koth-video-wrap {
    background: #000;
    aspect-ratio: 16/9;
    width: 100%;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.koth-video-wrap .iframe-wrap {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    background: #000;
}
.koth-video-wrap .iframe-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    border: none;
}

/* Vote Count */
.koth-vote-count {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    padding: var(--space-xs) var(--space-md);
    color: var(--text-secondary);
    background: rgba(255,255,255,0.02);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

/* Vote Button */
.koth-vote-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    padding: var(--space-md);
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    border: none;
    border-top: 1px solid rgba(251,191,36,0.2);
    background: linear-gradient(135deg, rgba(251,191,36,0.15), rgba(245,158,11,0.1));
    color: #fbbf24;
    transition: all var(--transition-base);
}
.koth-vote-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(251,191,36,0.3), rgba(245,158,11,0.2));
    color: #fff;
}
.koth-vote-btn.voted {
    background: linear-gradient(135deg, rgba(251,191,36,0.5), rgba(245,158,11,0.4)) !important;
    color: #fff !important;
    box-shadow: inset 0 0 15px rgba(251,191,36,0.2);
}
.koth-vote-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.koth-vote-btn-challenger {
    border-top-color: rgba(0,212,255,0.2);
    background: linear-gradient(135deg, rgba(0,212,255,0.12), rgba(124,92,252,0.08));
    color: var(--accent-secondary);
}
.koth-vote-btn-challenger:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(0,212,255,0.25), rgba(124,92,252,0.15));
    color: #fff;
}
.koth-vote-btn-challenger.voted {
    background: linear-gradient(135deg, rgba(0,212,255,0.4), rgba(124,92,252,0.3)) !important;
    color: #fff !important;
}

/* VS Badge */
.koth-vs-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--space-sm);
    flex-shrink: 0;
}
.koth-vs-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 900;
    font-size: 1.8rem;
    color: var(--text-muted);
    text-shadow: 0 0 20px rgba(255,255,255,0.1);
}

/* Queue Track */
.koth-queue-track {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    min-height: 40px;
}
.koth-queue-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 4px var(--space-sm);
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid;
    transition: all var(--transition-fast);
    white-space: nowrap;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.koth-queue-item.queue-winners { background: rgba(124,92,252,0.1); border-color: rgba(124,92,252,0.3); color: var(--accent-primary); }
.koth-queue-item.queue-losers { background: rgba(248,113,113,0.1); border-color: rgba(248,113,113,0.3); color: #f87171; }
.koth-queue-item.queue-eliminated { background: rgba(90,90,120,0.1); border-color: rgba(90,90,120,0.3); color: var(--text-muted); text-decoration: line-through; opacity: 0.6; }

/* Battle Log Item */
.koth-log-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    margin-bottom: var(--space-xs);
    transition: all var(--transition-fast);
}
.koth-log-item:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }
.koth-log-num { font-size: 0.72rem; font-weight: 800; color: var(--text-muted); min-width: 28px; padding: 2px 4px; background: rgba(255,255,255,0.04); border-radius: var(--radius-sm); text-align: center; }
.koth-log-detail { flex: 1; font-size: 0.85rem; }
.koth-log-winner { font-weight: 700; color: var(--success); }
.koth-log-loser { color: var(--text-muted); text-decoration: line-through; font-size: 0.8rem; }
.koth-log-phase { font-size: 0.7rem; font-weight: 700; padding: 1px 6px; border-radius: var(--radius-full); text-transform: uppercase; letter-spacing: 1px; flex-shrink: 0; }
.koth-log-phase.ph-winners { background: rgba(124,92,252,0.15); color: var(--accent-primary); }
.koth-log-phase.ph-losers { background: rgba(248,113,113,0.15); color: #f87171; }
.koth-log-phase.ph-final { background: rgba(251,191,36,0.2); color: #fbbf24; }

/* Ranking Items */
.koth-rank-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    transition: all var(--transition-fast);
}
.koth-rank-item:hover { border-color: var(--border-hover); }
.koth-rank-badge {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.85rem; flex-shrink: 0;
}
.koth-rank-badge.rank-1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #000; box-shadow: 0 0 15px rgba(251,191,36,0.4); }
.koth-rank-badge.rank-2 { background: linear-gradient(135deg, #94a3b8, #64748b); color: #fff; }
.koth-rank-badge.rank-3 { background: linear-gradient(135deg, #cd7c3e, #a85d2a); color: #fff; }
.koth-rank-badge.rank-other { background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid var(--border-color); }

/* Responsive: mobile stacks KOTH arena vertically */
@media (max-width: 768px) {
    .koth-arena {
        grid-template-columns: 1fr;
    }
    .koth-vs-badge { padding: var(--space-sm) 0; }
    .koth-vs-text { font-size: 1.4rem; }
    .koth-card-name { font-size: 0.95rem; }
}

/* --- Tournament Arena Layout Options --- */

/* Enlarge Match Section Container to Make Videos Larger */
#tourney-sec-match.minigame-container {
    max-width: 1300px;
}

/* Center Voters Area */
.center-voters-list {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: var(--space-xs);
    width: 160px;
    max-height: 250px;
    overflow-y: auto;
    scrollbar-width: thin;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.3);
}

.center-voter-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-sm);
    padding: 6px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-xs);
    transition: background 0.2s;
}
.center-voter-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* Force VS Column Vertical Stacking in Center Mode */
.koth-vs-badge {
    flex-direction: column !important;
}

/* KOTH Arena Padding & Full-Width Video Overrides */
.koth-king-card,
.koth-challenger-card {
    padding: var(--space-lg) 0 !important;
}

.koth-card-role {
    border-bottom: none !important;
    border-radius: var(--radius-sm) !important;
    margin: 0 var(--space-lg) var(--space-sm) var(--space-lg) !important;
}

.koth-king-card .koth-card-role {
    color: #fbbf24 !important;
    background: rgba(251, 191, 36, 0.08) !important;
    border: 1px solid rgba(251, 191, 36, 0.15) !important;
}

.koth-challenger-card .koth-card-role {
    color: #00d4ff !important;
    background: rgba(0, 212, 255, 0.08) !important;
    border: 1px solid rgba(0, 212, 255, 0.15) !important;
}

.koth-card-name {
    border-bottom: none !important;
    padding: var(--space-xs) 0 !important;
    margin: 0 var(--space-lg) var(--space-md) var(--space-lg) !important;
    display: flex !important;
    align-items: flex-start !important;
    text-align: left !important;
}

.koth-lives,
.koth-streak {
    margin-left: var(--space-lg) !important;
    margin-right: var(--space-lg) !important;
}

.koth-video-wrap {
    margin: 0 12px var(--space-md) 12px !important;
    border-radius: var(--radius-md) !important;
    width: auto !important;
}

.koth-vote-count {
    background: transparent !important;
    border-top: none !important;
    margin: auto var(--space-lg) var(--space-sm) var(--space-lg) !important;
}

.koth-vote-btn {
    width: auto !important;
    margin: 0 var(--space-lg) 0 var(--space-lg) !important;
    border-radius: var(--radius-md) !important;
    border: none !important;
}

/* ===== 3D COIN FLIP ANIMATION OPTIMIZATIONS ===== */
/* Remove box-shadows on coin faces during spin animation to achieve 60+ FPS */
.coin-wrapper.spinning .coin-side {
    box-shadow: none !important;
}

/* Remove heavy SVG/icon drop-shadow filter calculations during spin */
.coin-wrapper.spinning .coin-side .coin-icon {
    filter: none !important;
}

/* ===== SHIFT CONTAINERS DOWN WHEN TICKER IS ACTIVE ===== */
body:has(.announcement-ticker[style*="display: block"]) .dashboard-container,
body:has(.announcement-ticker[style*="display: block"]) .minigame-container {
    margin-top: 32px;
}

/* Responsive Podium Layout */
@media (max-width: 768px) {
    .premium-podium-container {
        flex-direction: column;
        align-items: center;
        gap: var(--space-md);
        padding-top: var(--space-md);
    }
    .premium-podium-card {
        max-width: 100%;
        width: 100%;
        min-height: auto !important;
        transform: none !important;
    }
    .premium-podium-card.rank-1 {
        order: 1 !important;
    }
    .premium-podium-card.rank-1:hover {
        transform: translateY(-4px) !important;
    }
    .premium-podium-card.rank-2 {
        order: 2 !important;
        transform: none !important;
    }
    .premium-podium-card.rank-2:hover {
        transform: translateY(-4px) !important;
    }
    .premium-podium-card.rank-3 {
        order: 3 !important;
        transform: none !important;
    }
    .premium-podium-card.rank-3:hover {
        transform: translateY(-4px) !important;
    }
}

/* Make tournament sections wider to allow larger video player sizes in podium */
#tourney-sec-bracket-full {
    max-width: 1400px !important;
}

#tourney-sec-winner {
    max-width: 1100px !important;
}

.pstat-scroll-container {
    flex: 1 1 0%;
    min-height: 0;
    overflow-y: auto;
    padding-right: var(--space-xs);
    margin-top: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}
.pstat-scroll-container::-webkit-scrollbar {
    width: 6px;
}
.pstat-scroll-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.01);
    border-radius: var(--radius-full);
}
.pstat-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
}
.pstat-scroll-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== TOURNAMENT MODE SELECT ===== */
.mode-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    transition: all var(--transition-base);
    min-height: 240px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.mode-card.active-mode {
    cursor: pointer;
    border-color: rgba(124, 92, 252, 0.2);
}

.mode-card.active-mode:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 12px 40px rgba(124, 92, 252, 0.15);
}

.mode-card.disabled-mode {
    opacity: 0.6;
    background: rgba(255, 255, 255, 0.01);
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.02);
}

.mode-card.disabled-mode::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(7, 7, 13, 0.2);
    border-radius: var(--radius-lg);
    pointer-events: none;
}

.mode-icon-wrap {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: rgba(124, 92, 252, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-primary);
    border: 1px solid rgba(124, 92, 252, 0.2);
    transition: all var(--transition-base);
}

.mode-card.active-mode:hover .mode-icon-wrap {
    background: var(--accent-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 0 15px rgba(124, 92, 252, 0.4);
}

.mode-card.disabled-mode .mode-icon-wrap {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    border-color: rgba(255, 255, 255, 0.05);
}

.mode-badge {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mode-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 0;
}

.mode-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    flex-grow: 1;
}

.mode-arrow {
    position: absolute;
    bottom: var(--space-md);
    right: var(--space-md);
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: transform 0.3s ease, color 0.3s ease;
}

.mode-card.active-mode:hover .mode-arrow {
    transform: translateX(5px);
    color: var(--accent-primary);
}

@media (max-width: 768px) {
    .mode-select-grid {
        grid-template-columns: 1fr !important;
        gap: var(--space-md) !important;
    }
    .mode-card {
        min-height: auto;
        padding: var(--space-lg);
    }
    .mode-arrow {
        display: none;
    }
}

/* Google Drive Iframe Alignment & Cropping */
.iframe-wrap {
    overflow: hidden !important;
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
}

/* Default / KOTH / main match cards (wider layout) */
iframe.gdrive-iframe,
.iframe-wrap iframe.gdrive-iframe,
.koth-video-wrap .iframe-wrap iframe.gdrive-iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(100% + 48px) !important;
    margin-top: -48px !important;
    border: none !important;
    background: #000 !important;
}

/* Smaller Podium Cards - Google Drive Iframe Alignment */
.podium-video-wrap iframe.gdrive-iframe,
.podium-video-wrap .iframe-wrap iframe.gdrive-iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(100% + 40px) !important;
    margin-top: -40px !important;
    border: none !important;
    background: #000 !important;
}
