/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@700;900&family=Rajdhani:wght@500;600;700&family=Creepster&display=swap');

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

/* Animations */
@keyframes bgShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

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

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 51, 51, 0.5); }
    50% { box-shadow: 0 0 40px rgba(255, 51, 51, 0.8); }
}

@keyframes glow {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(255, 51, 51, 0.6)); }
    50% { filter: drop-shadow(0 0 40px rgba(255, 51, 51, 1)); }
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: #000;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0505 25%, #0a0a0a 50%, #140505 75%, #0a0a0a 100%);
    background-size: 400% 400%;
    animation: bgShift 15s ease infinite;
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(255, 51, 51, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 51, 51, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 51, 51, 0.05) 0%, transparent 30%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    position: relative;
    z-index: 2;
}

/* Header */
header {
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.95) 0%, rgba(20, 5, 5, 0.9) 100%);
    padding: 40px 0;
    text-align: center;
    border-bottom: 4px solid;
    border-image: linear-gradient(90deg, transparent, #ff3333, transparent) 1;
    box-shadow: 0 10px 40px rgba(255, 51, 51, 0.3);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(255, 51, 51, 0.03) 20px, rgba(255, 51, 51, 0.03) 40px);
    animation: bgShift 30s linear infinite;
}

header h1 {
    font-family: 'Creepster', cursive;
    font-size: 3.5rem;
    background: linear-gradient(180deg, #ff5555 0%, #ff3333 50%, #cc0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: 12px;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
    animation: glow 3s ease-in-out infinite;
}

.tagline {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 1.4rem;
    color: #999;
    letter-spacing: 4px;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.subtitle {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 500;
    font-size: 1.1rem;
    color: #666;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 5px;
    position: relative;
    z-index: 1;
}

/* Stats Bar */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 40px 0;
    animation: slideUp 0.6s ease-out;
}

.stat-card {
    background: linear-gradient(135deg, rgba(40, 20, 20, 0.8) 0%, rgba(20, 10, 10, 0.8) 100%);
    border: 2px solid rgba(255, 51, 51, 0.3);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: #ff3333;
    box-shadow:
        0 12px 48px rgba(255, 51, 51, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.stat-icon {
    font-size: 3rem;
    filter: drop-shadow(0 0 10px rgba(255, 51, 51, 0.6));
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: #ff3333;
    text-shadow: 0 0 20px rgba(255, 51, 51, 0.6);
    letter-spacing: 2px;
}

.stat-label {
    font-size: 0.9rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: #ff3333;
    text-shadow: 0 0 20px rgba(255, 51, 51, 0.5);
    letter-spacing: 2px;
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(255, 51, 51, 0.2), rgba(255, 51, 51, 0.1));
    color: #ff3333;
    border: 2px solid rgba(255, 51, 51, 0.4);
    border-radius: 8px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background: linear-gradient(135deg, rgba(255, 51, 51, 0.3), rgba(255, 51, 51, 0.15));
    border-color: #ff3333;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 51, 51, 0.4);
}

.refresh-btn svg {
    transition: transform 0.3s ease;
}

.refresh-btn:hover svg {
    transform: rotate(180deg);
}

/* Leaderboard Container */
.leaderboard-container {
    background: linear-gradient(135deg, rgba(40, 20, 20, 0.6) 0%, rgba(20, 10, 10, 0.6) 100%);
    border: 2px solid rgba(255, 51, 51, 0.3);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: slideUp 0.6s ease-out 0.1s both;
}

.leaderboard {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 25px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 2px solid rgba(255, 51, 51, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
    animation: slideUp 0.4s ease-out both;
    position: relative;
    overflow: hidden;
}

.leaderboard-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 51, 51, 0.1), transparent);
    transition: left 0.5s ease;
}

.leaderboard-item:hover::before {
    left: 100%;
}

.leaderboard-item:hover {
    transform: translateX(10px);
    border-color: #ff3333;
    box-shadow: 0 5px 25px rgba(255, 51, 51, 0.3);
}

.leaderboard-item.rank-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 165, 0, 0.1));
    border-color: rgba(255, 215, 0, 0.5);
}

.leaderboard-item.rank-1:hover {
    border-color: #FFD700;
    box-shadow: 0 5px 25px rgba(255, 215, 0, 0.4);
}

.leaderboard-item.rank-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.15), rgba(169, 169, 169, 0.1));
    border-color: rgba(192, 192, 192, 0.5);
}

.leaderboard-item.rank-2:hover {
    border-color: #C0C0C0;
    box-shadow: 0 5px 25px rgba(192, 192, 192, 0.4);
}

.leaderboard-item.rank-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.15), rgba(184, 115, 51, 0.1));
    border-color: rgba(205, 127, 50, 0.5);
}

.leaderboard-item.rank-3:hover {
    border-color: #CD7F32;
    box-shadow: 0 5px 25px rgba(205, 127, 50, 0.4);
}

.rank {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    min-width: 60px;
    text-align: center;
}

.rank-1 .rank {
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    font-size: 2.5rem;
}

.rank-2 .rank {
    color: #C0C0C0;
    text-shadow: 0 0 20px rgba(192, 192, 192, 0.8);
    font-size: 2.2rem;
}

.rank-3 .rank {
    color: #CD7F32;
    text-shadow: 0 0 20px rgba(205, 127, 50, 0.8);
    font-size: 2rem;
}

.voter-info {
    flex: 1;
}

.voter-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
}

.voter-meta {
    font-size: 0.9rem;
    color: #888;
}

.claimed-badge {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.unclaimed-badge {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(255, 170, 0, 0.2);
    color: #ffaa00;
    border: 1px solid rgba(255, 170, 0, 0.3);
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.vote-count {
    text-align: right;
}

.vote-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: #ff3333;
    text-shadow: 0 0 15px rgba(255, 51, 51, 0.6);
}

.vote-label {
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
}

/* Vote CTA */
.vote-cta {
    background: linear-gradient(135deg, rgba(40, 20, 20, 0.6) 0%, rgba(20, 10, 10, 0.6) 100%);
    border: 2px solid rgba(255, 51, 51, 0.3);
    border-radius: 20px;
    padding: 50px 40px;
    text-align: center;
    margin-bottom: 40px;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: slideUp 0.6s ease-out 0.2s both;
}

.vote-cta h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    color: #ff3333;
    text-shadow: 0 0 20px rgba(255, 51, 51, 0.5);
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.vote-cta p {
    font-size: 1.2rem;
    color: #aaa;
    margin-bottom: 30px;
}

.vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 40px;
    background: linear-gradient(135deg, #ff3333 0%, #cc0000 100%);
    color: #fff;
    text-decoration: none;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    border: 2px solid #ff3333;
    border-radius: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    box-shadow:
        0 8px 25px rgba(255, 51, 51, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.vote-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.vote-btn:hover::before {
    left: 100%;
}

.vote-btn:hover {
    background: linear-gradient(135deg, #ff5555 0%, #ff3333 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow:
        0 12px 35px rgba(255, 51, 51, 0.7),
        0 0 50px rgba(255, 51, 51, 0.3);
}

/* Loading States */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #ff3333;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 51, 51, 0.2);
    border-top-color: #ff3333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading p {
    font-size: 1.1rem;
    color: #888;
}

.no-votes {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 1.1rem;
}

.error {
    text-align: center;
    padding: 60px 20px;
    color: #ff5555;
}

.error-details {
    font-size: 0.9rem;
    color: #888;
    margin-top: 10px;
}

.error-hint {
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* Footer */
footer {
    background: linear-gradient(180deg, transparent 0%, rgba(10, 10, 10, 0.95) 100%);
    padding: 30px 0;
    text-align: center;
    border-top: 2px solid;
    border-image: linear-gradient(90deg, transparent, rgba(255, 51, 51, 0.5), transparent) 1;
    margin-top: 60px;
}

footer p {
    color: #666;
    font-size: 1.05rem;
    letter-spacing: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
        letter-spacing: 6px;
    }

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

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

    .rank {
        min-width: 50px;
        font-size: 1.5rem;
    }

    .vote-cta h2 {
        font-size: 2rem;
    }

    .vote-btn {
        font-size: 1.1rem;
        padding: 15px 30px;
    }
}
