:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --dark-bg: #0f172a;
    --card-bg: #1e293b;
    --text-light: #f1f5f9;
    --text-muted: #94a3b8;
}

/* Header Soccer Background Animations */
.header-soccer-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-ball {
    position: absolute;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.2);
    animation: float-soccer 15s ease-in-out infinite;
}

.ball-1 {
    top: 20%;
    left: 15%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.ball-2 {
    top: 60%;
    right: 20%;
    animation-delay: -5s;
    animation-duration: 18s;
}

.ball-3 {
    bottom: 25%;
    left: 70%;
    animation-delay: -10s;
    animation-duration: 14s;
}

@keyframes float-soccer {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
        opacity: 0.15;
    }
    25% { 
        transform: translateY(-20px) rotate(90deg); 
        opacity: 0.3;
    }
    50% { 
        transform: translateY(-40px) rotate(180deg); 
        opacity: 0.25;
    }
    75% { 
        transform: translateY(-20px) rotate(270deg); 
        opacity: 0.2;
    }
}

/* Light theme variables */
[data-theme="light"] {
    --primary-color: #1e40af;
    --secondary-color: #2563eb;
    --accent-color: #ffd700;
    --success-color: #059669;
    --danger-color: #dc2626;
    --dark-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-light: #1e293b;
    --text-muted: #64748b;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--dark-bg) 0%, #1e293b 100%);
    color: var(--text-light);
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

[data-theme="light"] body {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #e2e8f0 100%);
}

/* Header */
.header {
    background: linear-gradient(135deg, #002C5F 0%, #001a3a 100%);
    color: white;
    padding: 2rem 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

[data-theme="light"] .vote-counter-all-time {
}

[data-theme="light"] .vote-counter-all-time i {
    color: #66ea87;
}

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

.header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.vote-counter {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    display: inline-block;
    margin-top: 0.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.vote-counter i {
    margin-right: 0.5rem;
    color: #ffd700;
}

.vote-counter-all-time i {
    color: #9d4edd;
}

.vote-counter.updating,
.vote-counter-all-time.updating {
    animation: pulse-update 0.5s ease-in-out;
}

@keyframes pulse-update {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); background: rgba(255, 215, 0, 0.3); }
    100% { transform: scale(1); }
}

.next-vote-counter {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    margin-top: 0.5rem;
    border-radius: 25px;
    font-weight: 600;
    display: inline-block;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.next-vote-counter i {
    margin-right: 0.5rem;
    color: #ffd700;
}

/* Streak Badge */
.streak-badge {
    background: linear-gradient(135deg, #f59e0b, #ff0000);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    animation: pulse 2s infinite;
}

.streak-badge.new-streak {
    animation: streak-pop 0.5s ease-out;
}

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

@keyframes streak-pop {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.streak-badge i {
    color: #fff;
    font-size: 1rem;
}

/* Theme Toggle */
.theme-toggle {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    color: white;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    overflow: hidden;
    z-index: 10;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transition: all 0.4s ease;
    transform: translate(-50%, -50%);
}

.theme-toggle:hover::before {
    width: 100%;
    height: 100%;
}

.theme-toggle:hover {
    transform: scale(1.15) rotate(180deg);
    box-shadow: 0 8px 25px rgba(255,255,255,0.2);
}

.theme-toggle i {
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: var(--accent-hover);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.scroll-to-top:active {
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .header-brand {
        gap: 0.75rem;
    }
    
    .header-logo {
        width: 70px;
        height: 70px;
    }
    
    .scroll-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Compact Search Styles */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.search-toggle-container {
    position: relative;
}

.search-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="light"] .search-toggle {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

.search-toggle:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: var(--accent-color);
    transform: scale(1.05);
}

.compact-search {
    position: absolute;
    top: 0;
    right: 0;
    display: none;
    background: var(--card-bg);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 0.5rem;
    backdrop-filter: blur(10px);
    min-width: 280px;
    z-index: 10;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

[data-theme="light"] .compact-search {
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.compact-search.active {
    display: flex;
    align-items: center;
    animation: searchExpand 0.3s ease;
}

.compact-search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    color: var(--text-light);
    font-size: 0.95rem;
    outline: none;
}

.compact-search-input::placeholder {
    color: var(--text-muted);
}

.search-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.search-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

[data-theme="light"] .search-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

@keyframes searchExpand {
    from {
        opacity: 0;
        transform: scale(0.8) translateX(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateX(0);
    }
}

.leaderboard-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    transition: background 0.3s ease;
}

[data-theme="light"] .leaderboard-section {
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    color: var(--text-light);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

[data-theme="light"] .filter-btn {
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.1);
}

.filter-btn:hover {
    background: rgba(255,255,255,0.15);
    border-color: var(--accent-color);
    transform: translateY(-1px);
}

[data-theme="light"] .filter-btn:hover {
    background: rgba(0,0,0,0.1);
}

.filter-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--dark-bg);
    font-weight: 600;
}

.filter-btn i {
    font-size: 0.8rem;
}

.player-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    transform: translateY(0);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.player-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.player-card:hover::before {
    left: 100%;
}

/* Gold background for rank 1 */
.player-card.rank-1-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 237, 78, 0.1));
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.2);
}

[data-theme="light"] .player-card.rank-1-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 237, 78, 0.05));
    border: 2px solid rgba(255, 215, 0, 0.2);
}

/* Silver background for rank 2 */
.player-card.rank-2-card {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.15), rgba(229, 229, 229, 0.1));
    border: 2px solid rgba(192, 192, 192, 0.3);
    box-shadow: 0 8px 25px rgba(192, 192, 192, 0.2);
}

[data-theme="light"] .player-card.rank-2-card {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.1), rgba(229, 229, 229, 0.05));
    border: 2px solid rgba(192, 192, 192, 0.2);
}

/* Bronze background for rank 3 */
.player-card.rank-3-card {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.15), rgba(218, 165, 32, 0.1));
    border: 2px solid rgba(205, 127, 50, 0.3);
    box-shadow: 0 8px 25px rgba(205, 127, 50, 0.2);
}

[data-theme="light"] .player-card.rank-3-card {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.1), rgba(218, 165, 32, 0.05));
    border: 2px solid rgba(205, 127, 50, 0.2);
}

[data-theme="light"] .player-card {
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.player-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

[data-theme="light"] .player-card:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.player-card.vote-celebration {
    animation: celebrate 0.8s ease-out;
}

@keyframes celebrate {
    0% { transform: scale(1); }
    25% { transform: scale(1.05) rotate(1deg); }
    50% { transform: scale(1.1) rotate(-1deg); }
    75% { transform: scale(1.05) rotate(0.5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Background rank number - large and non-blocking */
.player-card::after {
    content: attr(data-rank);
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    font-size: 4rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.08);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: 0;
    line-height: 1;
    user-select: none;
}

[data-theme="light"] .player-card::after {
    color: rgba(0, 0, 0, 0.06);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1);
}

/* Special styling for top 3 ranks */
.player-card.rank-1-card::after {
    color: rgba(255, 215, 0, 0.2);
    text-shadow: 2px 2px 8px rgba(255, 215, 0, 0.3);
}

.player-card.rank-2-card::after {
    color: rgba(192, 192, 192, 0.25);
    text-shadow: 2px 2px 8px rgba(192, 192, 192, 0.3);
}

.player-card.rank-3-card::after {
    color: rgba(205, 127, 50, 0.2);
    text-shadow: 2px 2px 8px rgba(205, 127, 50, 0.3);
}

[data-theme="light"] .player-card.rank-1-card::after {
    color: rgba(255, 215, 0, 0.15);
    text-shadow: 1px 1px 4px rgba(255, 215, 0, 0.2);
}

[data-theme="light"] .player-card.rank-2-card::after {
    color: rgba(192, 192, 192, 0.2);
    text-shadow: 1px 1px 4px rgba(192, 192, 192, 0.2);
}

[data-theme="light"] .player-card.rank-3-card::after {
    color: rgba(205, 127, 50, 0.15);
    text-shadow: 1px 1px 4px rgba(205, 127, 50, 0.2);
}

/* Small rank indicator for visual hierarchy */
.rank-indicator {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    z-index: 2;
    opacity: 0.8;
}

.rank-indicator.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #b8860b;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.rank-indicator.rank-2 {
    background: linear-gradient(135deg, #c0c0c0, #e5e5e5);
    color: #696969;
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.4);
}

.rank-indicator.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #daa520);
    color: #8b4513;
    box-shadow: 0 2px 8px rgba(205, 127, 50, 0.4);
}

.rank-indicator.rank-other {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 0.7rem;
}

[data-theme="light"] .rank-indicator.rank-other {
    background: rgba(0, 0, 0, 0.1);
}

.player-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    z-index: 2;
    position: relative;
    margin-bottom: 0;
}

.player-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.player-avatar .player-initial {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
}

.player-details h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.player-details p {
    color: var(--text-muted);
    margin-bottom: 0;
}

.vote-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    z-index: 2;
    position: relative;
}

.vote-count {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.vote-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.vote-btn {
    background: linear-gradient(135deg, var(--accent-color), #ffd700);
    border: none;
    border-radius: 12px;
    color: white;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.vote-btn::after {
    content: '\f1e3';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 1.5rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.vote-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.6);
}

.vote-btn:active {
    transform: translateY(0) scale(0.98);
}

.vote-btn.voting::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.vote-btn.voting {
    animation: vote-pulse 0.6s ease-out;
}

@keyframes vote-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.vote-btn:disabled {
    background: #6b7280;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.vote-btn.voted {
    background: linear-gradient(135deg, var(--success-color), #059669);
    animation: voted-success 0.5s ease-out;
}

@keyframes voted-success {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.vote-btn.voted:hover {
    background: linear-gradient(135deg, var(--success-color), #059669);
}

.share-btn {
    background: linear-gradient(135deg, var(--secondary-color), #2563eb);
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.share-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.4);
}

.search-results {
    margin-bottom: 1rem;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.search-results.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.search-results .player-card {
    animation: slideInUp 0.3s ease-out;
    animation-fill-mode: both;
}

.search-results .player-card:nth-child(1) { animation-delay: 0.1s; }
.search-results .player-card:nth-child(2) { animation-delay: 0.2s; }
.search-results .player-card:nth-child(3) { animation-delay: 0.3s; }
.search-results .player-card:nth-child(4) { animation-delay: 0.4s; }
.search-results .player-card:nth-child(5) { animation-delay: 0.5s; }

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

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

.no-results {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.ads-container {
    margin: 2rem 0;
    text-align: center;
}

.ads-container .ad {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border: 1px dashed rgba(255,255,255,0.2);
}

[data-theme="light"] .ads-container .ad {
    background: rgba(0,0,0,0.02);
    border-color: rgba(0,0,0,0.1);
}

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid rgba(245, 158, 11, 0.2);
    border-left: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: relative;
}

.spinner::after {
    content: '\f1e3';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    color: var(--accent-color);
    animation: bounce 0.6s ease-in-out infinite alternate;
}

@keyframes bounce {
    from { transform: translate(-50%, -50%) scale(0.8); }
    to { transform: translate(-50%, -50%) scale(1.2); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    pointer-events: none;
    z-index: 1000;
    animation: confetti-fall 3s linear forwards;
}

.confetti:nth-child(odd) {
    background: var(--success-color);
    border-radius: 50%;
}

.confetti:nth-child(3n) {
    background: var(--secondary-color);
    transform: rotate(45deg);
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1001;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast.error {
    background: var(--danger-color);
}

/* Countdown Modal */
.countdown-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.countdown-modal.show {
    opacity: 1;
    visibility: visible;
}

.countdown-content {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
    position: relative;
    border: 2px solid var(--accent-color);
}

.countdown-modal.show .countdown-content {
    transform: scale(1);
}

.countdown-content h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.countdown-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.countdown-timer {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin: 1.5rem 0;
    font-family: 'Courier New', monospace;
}

.btn-close {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

/* PWA styles removed */

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

#streakBadge, #headerVoteNow, #footerVoteNow, .player-avatar img.is-hidden {
    display: none;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    /* Fix header layout - keep theme toggle inline */
    .header-top {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .header-controls {
        flex-direction: row;
        gap: 0.5rem;
        flex-shrink: 0;
    }
    
    .main-container {
        padding: 1rem;
    }
    
    /* Fix section header - keep search toggle inline */
    .section-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 0;
    }
    
    .search-toggle-container {
        position: relative;
        flex-shrink: 0;
    }
    
    .compact-search {
        right: 0;
        min-width: 220px;
        top: 0;
    }
    
    /* Keep player cards horizontal in portrait mode */
    .player-card {
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: 1rem;
        gap: 1rem;
    }
    
    .player-card::after {
        font-size: 3rem;
        right: 0.5rem;
    }
    
    .rank-indicator {
        top: 0.5rem;
        left: 0.5rem;
    }
    
    .player-info {
        flex-direction: row;
        text-align: left;
        margin-bottom: 0;
        flex: 1;
    }
    
    .player-avatar {
        width: 65px;
        height: 65px;
        font-size: 1.2rem;
    }
    
    .vote-section {
        align-items: flex-end;
        gap: 0.5rem;
        flex-shrink: 0;
    }
    
    /* Keep vote buttons horizontal when there's space */
    .vote-buttons {
        flex-direction: row;
        gap: 0.5rem;
        align-items: center;
    }
    
    .vote-btn {
        padding: 0.5rem 1rem;
        font-size: 1.2rem;
        white-space: nowrap;
    }
    
    .share-btn {
        padding: 0.5rem;
        min-width: 40px;
    }
    
    .filter-buttons {
        gap: 0.25rem;
        flex-wrap: wrap;
    }
    
    .filter-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .filter-btn span {
        display: none;
    }
    
    .countdown-timer {
        font-size: 2rem;
    }
}

/* For very small screens (narrow portrait phones) */
@media (max-width: 480px) {
    .header-top {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-controls {
        align-self: flex-end;
    }
    
    .player-card {
        flex-direction: column;
        text-align: center;
    }
    
    .player-info {
        flex-direction: column;
        text-align: center;
    }
    
    .vote-section {
        align-items: center;
    }
    
    /* Keep vote buttons in row layout even on small screens */
    .vote-buttons {
        flex-direction: row;
        gap: 0.5rem;
        align-items: center;
        justify-content: center;
    }
    
    .vote-btn {
        padding: 0.5rem 0.75rem;
        font-size: 1rem;
    }
    
    .share-btn {
        padding: 0.5rem;
        min-width: 36px;
    }
}

/* Footer */
.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    padding: 2rem 0 1rem;
    color: var(--text-secondary);
}

[data-theme="light"] .footer {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    align-items: start;
}

.footer-section {
    text-align: center;
}

.footer-section h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.footer-section p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.footer-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 1rem;
    border-radius: 10px;
    object-fit: contain;
}

.footer-countdown {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

.footer-countdown span {
    background: var(--accent-color);
    color: white;
    padding: 0.5rem;
    border-radius: 8px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.countdown-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
}

.instagram-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(131, 58, 180, 0.3);
}

.instagram-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(131, 58, 180, 0.4);
    color: white;
    text-decoration: none;
}

.instagram-link i {
    font-size: 1.2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.facebook-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #1877f2, #42a5f5);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(24, 119, 242, 0.3);
}

.facebook-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(24, 119, 242, 0.4);
    color: white;
    text-decoration: none;
}

.facebook-link i {
    font-size: 1.2rem;
}

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

[data-theme="light"] .footer-bottom {
    border-top: 1px solid #e9ecef;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-countdown {
        font-size: 1.2rem;
    }
    
    .footer-countdown span {
        min-width: 35px;
        padding: 0.4rem;
    }
    
    .instagram-link {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .social-links {
        gap: 0.75rem;
    }
    
    .facebook-link {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
} 