* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0a0e27;
    --bg-card: #141b3a;
    --bg-card-hover: #1a2348;
    --blue-primary: #3b82f6;
    --blue-secondary: #60a5fa;
    --blue-glow: rgba(59, 130, 246, 0.3);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-gold: #f59e0b;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    animation: pulse 15s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.1); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Language Selector */
.language-selector {
    position: fixed;
    top: 2rem;
    right: 2rem;
    display: flex;
    gap: 0.5rem;
    z-index: 1000;
    background: var(--bg-card);
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.lang-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.lang-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.lang-btn.active {
    background: var(--blue-primary);
    color: white;
    border-color: var(--blue-secondary);
    box-shadow: 0 0 20px var(--blue-glow);
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    padding: 1.5rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    transform: translateY(0);
    transition: transform 0.3s ease;
    border-top: 2px solid var(--blue-primary);
}

.cookie-banner.hidden {
    transform: translateY(100%);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.cookie-btn {
    padding: 0.75rem 2rem;
    background: var(--blue-primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--blue-glow);
}

.cookie-btn:hover {
    background: var(--blue-secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--blue-glow);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
}

.title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInDown 1s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    animation: fadeIn 1s ease 0.2s backwards;
}

.description {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    animation: fadeIn 1s ease 0.4s backwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Voting Section */
.voting-section {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 24px;
    margin: 3rem 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.voting-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Date Grid */
.date-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.date-card {
    background: var(--bg-dark);
    padding: 1.5rem 1rem;
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.date-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--blue-primary), var(--blue-secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.date-card:hover::before {
    opacity: 0.1;
}

.date-card:hover {
    transform: translateY(-4px);
    border-color: var(--blue-primary);
    box-shadow: 0 8px 24px var(--blue-glow);
}

.date-card.dimmed {
    opacity: 0.3;
    cursor: not-allowed;
    background: var(--bg-card);
}

.date-card.dimmed:hover {
    transform: none;
    border-color: transparent;
    box-shadow: none;
}

.date-card.dimmed::before {
    display: none;
}

.date-card.selected {
    border-color: var(--accent-green);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.4);
}

.date-card.selected::before {
    opacity: 0.2;
    background: var(--accent-green);
}

.date-card.due-date {
    border-color: var(--accent-gold);
}

.date-card.due-date::after {
    content: '⭐';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 1rem;
    z-index: 1;
}

.date-day {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    position: relative;
    z-index: 1;
}

.date-month {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.date-weekday {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.date-odds {
    font-size: 1rem;
    font-weight: 600;
    color: var(--blue-secondary);
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.odds-value {
    font-size: 1.3rem;
    color: var(--accent-gold);
}

.odds-probability {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Family Predictions */
.family-predictions {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.prediction-item {
    background: var(--bg-dark);
    padding: 1rem 2rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.prediction-label {
    font-weight: 600;
    color: var(--blue-secondary);
}

.prediction-date {
    color: var(--text-primary);
}

.prediction-odds {
    color: var(--accent-gold);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Vote Status */
.vote-status {
    text-align: center;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--accent-green);
    border-radius: 12px;
    color: var(--accent-green);
    margin-top: 1.5rem;
    animation: slideUp 0.5s ease;
}

.vote-status.hidden {
    display: none;
}

/* Odds Explanation */
.odds-explanation {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
}

.odds-explanation-title {
    font-weight: 600;
    color: var(--blue-secondary);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.odds-explanation-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.odds-examples {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.odds-example {
    background: var(--bg-dark);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    flex: 1;
    min-width: 150px;
}

.odds-example-value {
    font-weight: 700;
    color: var(--accent-gold);
    font-size: 1.1rem;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Image Section */
.image-section {
    text-align: center;
    margin: 4rem 0;
}

.family-image {
    max-width: 500px;
    width: 100%;
    height: auto;
    border-radius: 24px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
    /* Attempt to blend white background with dark theme */
    background: var(--bg-card);
    padding: 2rem;
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.2));
}

.family-image:hover {
    transform: scale(1.02);
}

/* Educational Section */
.educational-section {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 24px;
    margin: 3rem 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.edu-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.edu-item {
    text-align: center;
    padding: 2rem;
    background: var(--bg-dark);
    border-radius: 16px;
    transition: transform 0.3s ease;
}

.edu-item:hover {
    transform: translateY(-4px);
}

.edu-stat {
    font-size: 3rem;
    font-weight: 700;
    color: var(--blue-primary);
    margin-bottom: 1rem;
}

.edu-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.edu-references {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
}

.references-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.references-list {
    list-style: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.references-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.references-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--blue-primary);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .language-selector {
        top: 1rem;
        right: 1rem;
        padding: 0.25rem;
    }

    .lang-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .title {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .voting-section,
    .educational-section {
        padding: 2rem 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .date-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.75rem;
    }

    .date-card {
        padding: 1rem 0.5rem;
    }

    .date-day {
        font-size: 1.4rem;
    }

    .date-month {
        font-size: 0.8rem;
    }

    .date-odds {
        font-size: 1rem;
    }

    .family-predictions {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .family-image {
        max-width: 100%;
    }

    .edu-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .cookie-content {
        flex-direction: column;
        gap: 1rem;
    }

    .cookie-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }

    .date-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
