/* ============================================
   CSS Variables & Root Styles
   ============================================ */
:root {
    /* Color Palette - Academic & Engaging */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --accent-color: #ec4899;
    --accent-light: #f472b6;
    
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Outfit', 'Inter', sans-serif;
    
    /* Spacing */
    --spacing-unit: 8px;
    
    /* Transitions */
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    padding: 80px 20px 60px;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="white" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.hero-badge {
    display: inline-block;
    animation: fadeInDown 0.8s ease-out;
}

.badge-text {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    color: white;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.gradient-text {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #ec4899 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
    padding: 0 20px 80px;
}

/* ============================================
   Vote Card
   ============================================ */
.vote-card {
    background: white;
    border-radius: 24px;
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out 0.6s backwards;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.vote-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.card-header-custom {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 48px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.card-header-custom::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.icon-wrapper {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
}

.card-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.card-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.05rem;
    margin: 0;
    position: relative;
    z-index: 1;
}

.card-body-custom {
    padding: 40px 32px;
}

/* ============================================
   Alert/Status Messages
   ============================================ */
.alert-custom {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    border-left: 4px solid;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-custom.success {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success-color);
    color: #065f46;
}

.alert-custom.error {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error-color);
    color: #991b1b;
}

.alert-custom.info {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary-color);
    color: #312e81;
}

.alert-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
}

.alert-custom.success .alert-icon {
    background: var(--success-color);
    position: relative;
}

.alert-custom.success .alert-icon::after {
    content: '✓';
    position: absolute;
    color: white;
    font-weight: bold;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.alert-custom.error .alert-icon {
    background: var(--error-color);
    position: relative;
}

.alert-custom.error .alert-icon::after {
    content: '✕';
    position: absolute;
    color: white;
    font-weight: bold;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 1rem;
}

.alert-message {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ============================================
   Form Styles
   ============================================ */
.form-group-custom {
    margin-bottom: 24px;
}

.form-label-custom {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.required-star {
    color: var(--error-color);
    margin-left: 2px;
}

.form-select-custom {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all var(--transition-base);
    cursor: pointer;
    font-family: var(--font-primary);
}

.form-select-custom:hover {
    border-color: var(--primary-light);
    background: white;
}

.form-select-custom:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* ============================================
   Button Styles
   ============================================ */
.btn-vote {
    width: 100%;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
    font-family: var(--font-display);
    letter-spacing: 0.3px;
}

.btn-vote::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;
}

.btn-vote:hover::before {
    left: 100%;
}

.btn-vote:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -8px rgba(99, 102, 241, 0.5);
}

.btn-vote:active {
    transform: translateY(0);
}

.btn-vote:disabled {
    background: var(--bg-tertiary);
    color: var(--text-light);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-vote:disabled::before {
    display: none;
}

.btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.btn-icon {
    transition: transform var(--transition-base);
}

.btn-vote:hover .btn-icon {
    transform: scale(1.1);
}

/* ============================================
   Vote Info
   ============================================ */
.vote-info {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px;
}

.info-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.info-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.info-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.info-text strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 2px;
}

/* ============================================
   Stats Grid
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    animation: fadeInUp 0.8s ease-out 0.8s backwards;
}

.stat-card {
    background: white;
    padding: 24px 16px;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-value {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: var(--font-display);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
    font-weight: 600;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    padding: 40px 20px;
    text-align: center;
}

.footer-text {
    color: white;
    font-size: 1rem;
    margin: 0;
    opacity: 0.9;
}

.footer-icon {
    margin: 0 8px;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 20px 40px;
    }
    
    .card-header-custom,
    .card-body-custom {
        padding: 32px 24px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .card-body-custom {
        padding: 24px 20px;
    }
}
