/* ===================================
   Modern Gaming Theme
   Optimized for Mobile & Performance
   Repository: https://github.com/Yamiru/voting-sites 
   =================================== */

:root {
    --primary: #ff9900;
    --secondary: #3677d8;
    --accent: #3677d8;
    --dark: #0a0e27;
    --darker: #050711;
    --glass: rgba(255, 255, 255, 0.08);
    --glass-hover: rgba(255, 255, 255, 0.15);
    --text: #ffffff;
    --text-muted: #b9bbbe;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --glow: 0 0 20px rgba(88, 101, 242, 0.5);
}

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

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: var(--darker);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Animated Background */
.background-animation {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, rgba(88, 101, 242, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(235, 69, 158, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 40% 20%, rgba(254, 231, 92, 0.1) 0%, transparent 50%);
    animation: bgFloat 20s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-5%, 5%) rotate(5deg); }
}

/* Container */
.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 1rem;
    margin-bottom: 3rem;
}

.logo-pulse {
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
    margin-bottom: 1.5rem;
}

.logo-icon {
    width: 645px;
    height: 130px;
    filter: drop-shadow(var(--glow));
}

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

/* Glitch Effect for Title */
.glitch {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    text-transform: uppercase;
    position: relative;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glitch::before {
    animation: glitch1 2.5s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.glitch::after {
    animation: glitch2 2.5s infinite;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

@keyframes glitch1 {
    0%, 100% { transform: translate(0); }
    33% { transform: translate(-2px, 2px); }
}

@keyframes glitch2 {
    0%, 100% { transform: translate(0); }
    33% { transform: translate(2px, -2px); }
}

.subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    margin-bottom: 1rem;
    opacity: 0.9;
}

.tagline {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.tag {
    background: var(--glass);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--glass-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Glass Card */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: var(--glass-hover);
    transform: translateY(-5px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}

.glass-card h2 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-card p {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 1.05rem;
}

/* About Section */
.about-section {
    margin-bottom: 4rem;
}

/* Voting Section */
.voting-section {
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.vote-description {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* Voting Grid */
.voting-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.vote-card {
    background: var(--glass);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.vote-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.5s;
}

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

.vote-card:hover {
    background: var(--glass-hover);
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(88, 101, 242, 0.3);
    border-color: var(--primary);
}

.vote-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.vote-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.vote-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.vote-btn {
    background: var(--gradient);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
}

.vote-btn:hover {
    box-shadow: 0 6px 25px rgba(88, 101, 242, 0.6);
    transform: scale(1.05);
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
}

.stat-card {
    background: var(--glass);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 4rem;
}

footer p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.separator {
    color: var(--text-muted);
    opacity: 0.5;
}

.footer-note {
    font-size: 0.9rem;
    opacity: 0.6;
    font-style: italic;
    margin-top: 1rem;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .hero {
        padding: 2rem 0.5rem;
    }

    .logo-icon {
        width: 80px;
        height: 80px;
    }

    .glass-card {
        padding: 1.5rem;
    }

    .voting-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .vote-card {
        padding: 1.5rem;
    }

    .stats-section {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tagline {
        flex-direction: column;
        align-items: center;
    }
}

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --glass: rgba(255, 255, 255, 0.15);
        --glass-hover: rgba(255, 255, 255, 0.25);
    }

    .vote-card,
    .glass-card,
    .stat-card {
        border: 2px solid var(--primary);
    }
}

/* Focus Styles for Accessibility */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

/* Performance Optimizations */
.vote-card,
.glass-card,
.stat-card,
.tag {
    will-change: transform;
    contain: layout style paint;
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container > * {
    animation: fadeIn 0.6s ease-out backwards;
}

.container > *:nth-child(1) { animation-delay: 0.1s; }
.container > *:nth-child(2) { animation-delay: 0.2s; }
.container > *:nth-child(3) { animation-delay: 0.3s; }
.container > *:nth-child(4) { animation-delay: 0.4s; }
