/* Vibrant Fuchsia & Blue Voting App Design System */

:root {
    /* Base colors - Dark theme with vibrant accents */
    --background: 240 10% 3.9%;
    --foreground: 0 0% 98%;

    /* Card system with dark glass effect */
    --card: 240 10% 3.9%;
    --card-foreground: 0 0% 98%;

    --popover: 240 5% 6%;
    --popover-foreground: 0 0% 98%;

    /* Primary - Vibrant Fuchsia */
    --primary: 328 100% 54%;
    --primary-foreground: 0 0% 98%;
    --primary-glow: 328 100% 70%;

    /* Secondary - Electric Blue */
    --secondary: 217 91% 60%;
    --secondary-foreground: 0 0% 98%;
    --secondary-glow: 217 91% 75%;

    /* Muted colors */
    --muted: 240 5% 15%;
    --muted-foreground: 240 5% 65%;

    /* Accent - Purple blend */
    --accent: 280 100% 70%;
    --accent-foreground: 0 0% 98%;

    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 98%;

    --border: 240 5% 15%;
    --input: 240 5% 15%;
    --ring: 328 100% 54%;

    /* Gradients */
    --gradient-fuchsia: linear-gradient(135deg, hsl(328 100% 54%), hsl(280 100% 70%));
    --gradient-blue: linear-gradient(135deg, hsl(217 91% 60%), hsl(230 100% 70%));
    --gradient-rainbow: linear-gradient(135deg, hsl(328 100% 54%), hsl(280 100% 70%), hsl(217 91% 60%));
    --gradient-card: linear-gradient(135deg, hsl(240 10% 3.9% / 0.8), hsl(240 5% 6% / 0.9));

    /* Shadows */
    --shadow-fuchsia: 0 0 30px hsl(328 100% 54% / 0.3);
    --shadow-blue: 0 0 30px hsl(217 91% 60% / 0.3);
    --shadow-card: 0 10px 30px -10px hsl(240 10% 3.9% / 0.5);

    /* Animations */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    --radius: 0.5rem;
}

body {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    background: radial-gradient(ellipse at top, hsl(240 10% 8%) 0%, hsl(240 10% 3.9%) 100%);
    min-height: 100vh;
    font-family: sans-serif;
}

body.poll-page {
    background: linear-gradient(to bottom, hsl(240, 2%, 8%), hsl(240, 10%, 3.9%) 40%);
}

/* Card hover effects */
.character-card {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem; /* rounded-xl */
    border: 1px solid hsla(var(--border), 0.5);
    background-image: linear-gradient(to bottom right, hsla(var(--card), 0.8), hsla(var(--card), 0.4));
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-card);
    cursor: pointer;
}

.character-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-fuchsia), var(--shadow-card);
}

/* Gradient text */
.gradient-text {
    background: var(--gradient-rainbow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Vote button styles */
.vote-button {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem; /* rounded-lg */
    padding: 0.75rem 1.5rem; /* px-6 py-3 */
    font-weight: 600; /* font-semibold */
    color: hsl(var(--primary-foreground));
    transition: all 0.3s ease;
    background: var(--gradient-fuchsia);
    box-shadow: var(--shadow-fuchsia);
    border: none;
}

.vote-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px hsl(328 100% 54% / 0.5);
}

/* Pulse animation for vote counters */
.vote-pulse {
    animation: vote-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Timer glow effect */
.timer-glow {
    text-shadow: 0 0 20px hsl(217 91% 60% / 0.8);
}

.animate-vote-success {
    animation: vote-success 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.animate-fade-in-up {
    animation: fade-in-up 0.6s ease-out;
}

.animate-scale-bounce {
    animation: scale-bounce 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

@keyframes vote-success {
    0% {
        transform: scale(0.8) rotate(-5deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.1) rotate(2deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scale-bounce {
    0% {
        transform: scale(0.9);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Additional styles from components */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}
@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}
@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}
@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}
@media (min-width: 1536px) {
    .container {
        max-width: 1536px;
    }
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.text-center {
    text-align: center;
}
.margin-top{
    margin-top: 100px !important;
}

.space-y-6 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));
    margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));
}

.space-y-2 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));
    margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));
}

.text-6xl {
    font-size: 3.75rem; /* 60px */
    line-height: 1;
}

.font-bold {
    font-weight: 700;
}

.text-xl {
    font-size: 1.25rem; /* 20px */
    line-height: 1.75rem; /* 28px */
}

.text-muted-foreground {
    color: hsl(var(--muted-foreground));
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

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

.gap-8 {
    gap: 2rem;
}

.text-sm {
    font-size: 0.875rem; /* 14px */
    line-height: 1.25rem; /* 20px */
}

.gap-2 {
    gap: 0.5rem;
}

.w-4 {
    width: 1rem;
}

.h-4 {
    height: 1rem;
}

.text-primary {
    color: hsl(var(--primary));
}

.text-accent {
    color: hsl(var(--accent));
}

.text-secondary {
    color: hsl(var(--secondary));
}

.max-w-lg {
    max-width: 32rem; /* 512px */
}

.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.gap-6 {
    gap: 1.5rem;
}

.mt-12 {
    margin-top: 3rem;
}

.space-y-4 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
    margin-bottom: calc(1rem * var(--tw-space-y-reverse));
}

.text-2xl {
    font-size: 1.5rem; /* 24px */
    line-height: 2rem; /* 32px */
}

.space-y-3 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));
    margin-bottom: calc(0.75rem * var(--tw-space-y-reverse));
}

.bg-card\/50 {
    background-color: hsla(var(--card), 0.5);
}

.backdrop-blur-sm {
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.rounded-lg {
    border-radius: 0.5rem;
}

.p-4 {
    padding: 1rem;
}

.border-border\/50 {
    border-color: hsla(var(--border), 0.5);
}

.justify-between {
    justify-content: space-between;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.font-semibold {
    font-weight: 600;
}

.w-10 {
    width: 2.5rem;
}

.h-10 {
    height: 2.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

.object-cover {
    object-fit: cover;
}

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

.text-xs {
    font-size: 0.75rem; /* 12px */
    line-height: 1rem; /* 16px */
}

.w-full {
    width: 100%;
}

.bg-muted {
    background-color: hsl(var(--muted));
}

.h-2 {
    height: 0.5rem;
}

.bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.from-primary {
    --tw-gradient-from: hsl(var(--primary));
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, hsla(var(--primary), 0));
}

.to-accent {
    --tw-gradient-to: hsl(var(--accent));
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.duration-1000 {
    transition-duration: 1000ms;
}

/* Make navbar not sticky */
body.poll-page #navbar {
    position: absolute;
}

/* Countdown Timer */
.countdown-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background-image: linear-gradient(to right, hsla(var(--secondary), 0.2), hsla(var(--primary), 0.2));
    border-radius: 0.75rem; /* rounded-xl */
    border: 1px solid hsla(var(--border), 0.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.countdown-timer .icon {
    width: 1.5rem;
    height: 1.5rem;
    color: hsl(var(--secondary));
    animation: pulse 2s infinite;
}

.countdown-timer .time-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.countdown-timer .time-unit {
    text-align: center;
}

.countdown-timer .time-value {
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 0 20px hsl(217 91% 60% / 0.8);
}

.countdown-timer .time-label {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.countdown-timer .separator {
    font-size: 1.5rem;
    color: hsl(var(--muted-foreground));
}

/* Vote Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    max-width: 42rem; /* max-w-2xl */
    padding: 0;
    overflow: hidden;
    background-image: linear-gradient(to bottom right, hsla(var(--card), 0.95), hsla(var(--card), 0.8));
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(8px);
    border: 1px solid hsla(var(--border), 0.5);
    border-radius: 0.5rem; /* rounded-lg */
    position: relative;
}

.modal-close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    padding: 0.5rem;
    border-radius: 9999px;
    background-color: hsla(var(--background), 0.2);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.modal-close-button:hover {
    background-color: hsla(var(--background), 0.4);
}

.modal-close-button svg {
    width: 1rem;
    height: 1rem;
    color: hsl(var(--foreground));
}

.modal-image-container {
    position: relative;
    overflow: hidden;
}

.modal-image {
    width: 100%;
    height: 20rem; /* h-80 */
    object-fit: cover;
}

.modal-image-gradient {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to top, hsl(var(--background)), transparent);
}

.modal-votes {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-image: linear-gradient(to right, hsl(var(--primary)), hsl(var(--accent)));
    color: hsl(var(--primary-foreground));
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 700;
    animation: vote-pulse 2s infinite;
}

.modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    background-color: #1f2125;
    gap: 1.5rem;
}

.modal-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal-title {
    font-size: 1.875rem; /* text-3xl */
    font-weight: 700;
    background: var(--gradient-rainbow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-origin {
    color: hsl(var(--muted-foreground));
}

.modal-vote-section {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-vote-prompt {
    color: hsl(var(--muted-foreground));
}

.modal-vote-button {
    width: 100%;
    max-width: 20rem; /* max-w-xs */
    margin: 0 auto;
    animation: scale-bounce 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.modal-vote-button.voting {
    cursor: not-allowed;
}

.modal-vote-button .spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid hsl(var(--primary-foreground));
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.modal-success-message {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: vote-success 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.modal-success-icon-container {
    width: 4rem; /* w-16 */
    height: 4rem; /* h-16 */
    margin: 0 auto;
    background-image: linear-gradient(to right, hsl(var(--primary)), hsl(var(--accent)));
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-success-icon {
    width: 2rem; /* w-8 */
    height: 2rem; /* h-8 */
    color: hsl(var(--primary-foreground));
    fill: currentColor;
}

.modal-success-text {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal-success-title {
    font-size: 1.25rem; /* text-xl */
    font-weight: 700;
    color: hsl(var(--primary));
}

.modal-success-description {
    color: hsl(var(--muted-foreground));
}

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

#info-modal .modal-content {
    background-color: #1f2125;
    max-width: 400px;
    text-align: center;
}

#info-modal .modal-body p {
    font-size: 1.125rem;
    color: #e5e7eb;
    padding: 1rem;
}
