/* ================================
   RIDICULOUSLY OVER-THE-TOP BIRTHDAY STYLES
   ================================ */

/* CSS Custom Properties for easy theming */
:root {
    --primary: #a855f7;
    --secondary: #ec4899;
    --accent: #84cc16;
    --purple: #7209b7;
    --blue: #4361ee;
    --success: #06ffa5;
    --dark: #1a1a2e;
    --light: #ffffff;
    --gray: #6c757d;
    --background: #0a0a14;
    --card-bg: rgba(20, 20, 35, 0.85);
    --gradient-1: linear-gradient(135deg, var(--purple), var(--primary));
    --gradient-2: linear-gradient(135deg, var(--primary), var(--secondary));
    --gradient-3: linear-gradient(135deg, var(--accent), var(--primary));
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 30px rgba(168, 85, 247, 0.5);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

/* ================================
   ANIMATED BACKGROUND
   ================================ */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.08) 0%, transparent 50%);
}

.floating-emoji {
    position: absolute;
    font-size: 2rem;
    opacity: 0.2;
    animation: float 20s infinite ease-in-out;
}

.floating-emoji:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 25s; }
.floating-emoji:nth-child(2) { left: 20%; animation-delay: 2s; animation-duration: 22s; }
.floating-emoji:nth-child(3) { left: 30%; animation-delay: 4s; animation-duration: 28s; }
.floating-emoji:nth-child(4) { left: 40%; animation-delay: 1s; animation-duration: 24s; }
.floating-emoji:nth-child(5) { left: 50%; animation-delay: 3s; animation-duration: 26s; }
.floating-emoji:nth-child(6) { left: 60%; animation-delay: 5s; animation-duration: 23s; }
.floating-emoji:nth-child(7) { left: 70%; animation-delay: 2.5s; animation-duration: 27s; }
.floating-emoji:nth-child(8) { left: 80%; animation-delay: 4.5s; animation-duration: 25s; }
.floating-emoji:nth-child(9) { left: 90%; animation-delay: 1.5s; animation-duration: 29s; }
.floating-emoji:nth-child(10) { left: 15%; animation-delay: 3.5s; animation-duration: 21s; }

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
    }
}

/* ================================
   HERO SECTION - ABSOLUTELY DRAMATIC
   ================================ */
.hero {
    position: relative;
    z-index: 1;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    background: var(--gradient-1);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 50%, rgba(168, 85, 247, 0.25) 0%, transparent 50%);
    animation: pulse 4s ease-in-out infinite;
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-family: 'Righteous', cursive;
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 900;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: linear-gradient(45deg, var(--secondary), var(--light), var(--primary));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s ease-in-out infinite, bounce 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.7));
}

.title-word {
    display: inline-block;
}

.title-emoji {
    display: inline-block;
    animation: spin 3s linear infinite;
    font-size: 0.9em;
    -webkit-text-fill-color: initial;
    background: none;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.6));
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    animation: fadeIn 1.5s ease-out 0.5s both;
}

.cta-button {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    padding: 1.25rem 3rem;
    background: var(--gradient-2);
    color: var(--light);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    position: relative;
    overflow: hidden;
    animation: fadeIn 2s ease-out 1s both;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

.cta-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 40px rgba(168, 85, 247, 0.7);
}

.cta-button:active {
    transform: translateY(-2px) scale(1.02);
}

.button-icon,
.button-sparkle {
    display: inline-block;
    animation: wiggle 1s ease-in-out infinite;
}

.button-sparkle {
    animation: sparkle 2s ease-in-out infinite;
}

/* ================================
   CONTAINER
   ================================ */
.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* ================================
   FORM SECTION - DRAMATIC ENTRY
   ================================ */
.form-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.form-section.active {
    opacity: 1;
    pointer-events: all;
}

.form-container {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 0, 110, 0.3);
    border-radius: var(--border-radius);
    padding: 3rem;
    max-width: 600px;
    width: 100%;
    position: relative;
    box-shadow: var(--shadow-lg), 0 0 60px rgba(255, 0, 110, 0.4);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.form-section.active .form-container {
    transform: scale(1);
    animation: bounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 0, 110, 0.2);
    border: 2px solid var(--primary);
    border-radius: 50%;
    color: var(--light);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-button:hover {
    background: var(--primary);
    transform: rotate(90deg);
}

.form-title {
    font-family: 'Righteous', cursive;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.form-description {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.birthday-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

.form-label {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.label-icon {
    font-size: 1.3rem;
}

.form-input {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--light);
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 4px rgba(255, 0, 110, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.character-count {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    align-self: flex-end;
}

.submit-button {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    padding: 1.25rem 2rem;
    background: var(--gradient-1);
    color: var(--light);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

.submit-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(255, 0, 110, 0.5);
}

.submit-button:active {
    transform: translateY(-1px);
}

.submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.form-message {
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1rem;
    font-weight: 600;
    text-align: center;
    display: none;
    animation: slideInUp 0.3s ease;
}

.form-message.success {
    background: rgba(6, 255, 165, 0.2);
    border: 2px solid var(--success);
    color: var(--success);
    display: block;
}

.form-message.error {
    background: rgba(255, 0, 110, 0.2);
    border: 2px solid var(--primary);
    color: var(--primary);
    display: block;
}

/* ================================
   TODAY'S BIRTHDAYS - EPIC SECTION
   ================================ */
.today-section {
    margin-bottom: 4rem;
}

.today-banner {
    background: var(--gradient-1);
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    animation: pulse 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.today-banner::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 10s linear infinite;
}

.today-banner-content {
    position: relative;
    z-index: 1;
}

.today-title {
    font-family: 'Righteous', cursive;
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    animation: bounce 1s ease-in-out infinite;
}

.today-subtitle {
    font-size: 1.5rem;
    opacity: 0.9;
}

.today-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* ================================
   SECTION HEADERS
   ================================ */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out;
}

.section-title {
    font-family: 'Righteous', cursive;
    font-size: 3rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.title-icon {
    font-size: 2.5rem;
    animation: wiggle 2s ease-in-out infinite;
}

.section-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ================================
   LOADING STATE
   ================================ */
.loading-state {
    text-align: center;
    padding: 4rem 2rem;
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    border: 4px solid rgba(255, 0, 110, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    animation: pulse 2s ease-in-out infinite;
}

/* ================================
   EMPTY STATE
   ================================ */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    animation: fadeInUp 0.8s ease-out;
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: wiggle 2s ease-in-out infinite;
}

.empty-title {
    font-family: 'Righteous', cursive;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.empty-description {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
}

.empty-cta {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem 2rem;
    background: var(--gradient-2);
    color: var(--light);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.empty-cta:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ================================
   BIRTHDAY CARDS - SPECTACULAR
   ================================ */
.birthday-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    animation: fadeIn 0.6s ease-out;
}

.birthday-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 2rem;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out both;
}

.birthday-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-2);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.birthday-card:hover::before {
    transform: scaleX(1);
}

.birthday-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 0, 110, 0.5);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(255, 0, 110, 0.3);
}

/* Stagger animation for cards */
.birthday-card:nth-child(1) { animation-delay: 0s; }
.birthday-card:nth-child(2) { animation-delay: 0.1s; }
.birthday-card:nth-child(3) { animation-delay: 0.2s; }
.birthday-card:nth-child(4) { animation-delay: 0.3s; }
.birthday-card:nth-child(5) { animation-delay: 0.4s; }
.birthday-card:nth-child(6) { animation-delay: 0.5s; }
.birthday-card:nth-child(n+7) { animation-delay: 0.6s; }

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.card-name {
    font-family: 'Righteous', cursive;
    font-size: 1.75rem;
    color: var(--light);
    margin: 0;
}

.card-emoji {
    font-size: 2rem;
    animation: wiggle 2s ease-in-out infinite;
}

.card-countdown {
    background: rgba(255, 0, 110, 0.1);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.countdown-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.countdown-time {
    font-family: 'Righteous', cursive;
    font-size: 2rem;
    color: var(--primary);
    font-weight: 700;
    line-height: 1.2;
}

.card-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.info-icon {
    font-size: 1.25rem;
}

.info-label {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

.info-value {
    color: var(--light);
    font-weight: 600;
}

.card-message {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    padding: 1rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* Today's Birthday Card - EXTRA SPECIAL */
.birthday-card.is-today {
    border: 3px solid var(--primary);
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.2), rgba(131, 56, 236, 0.2));
    box-shadow: var(--shadow-lg), var(--shadow-glow), 0 0 60px rgba(255, 0, 110, 0.6);
    animation: pulse 2s ease-in-out infinite, fadeInUp 0.6s ease-out both;
}

.birthday-card.is-today .card-countdown {
    background: var(--gradient-1);
    border: none;
    animation: glow 2s ease-in-out infinite;
}

.birthday-card.is-today .countdown-time {
    color: var(--light);
    font-size: 2.5rem;
    animation: bounce 1s ease-in-out infinite;
}

/* ================================
   FOOTER
   ================================ */
.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(26, 26, 46, 0.5);
    backdrop-filter: blur(10px);
    margin-top: 4rem;
}

.footer-text {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.footer-emoji {
    display: inline-block;
    animation: spin 3s linear infinite;
}

.footer-subtext {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ================================
   ANIMATIONS
   ================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

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

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

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

@keyframes wiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

@keyframes shimmer {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */
@media (max-width: 768px) {
    .hero {
        min-height: 50vh;
        padding: 3rem 1rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .cta-button {
        font-size: 1rem;
        padding: 1rem 2rem;
    }

    .container {
        padding: 2rem 1rem;
    }

    .form-container {
        padding: 2rem 1.5rem;
    }

    .form-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .today-title {
        font-size: 2rem;
    }

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

    .birthday-card {
        padding: 1.5rem;
    }

    .card-name {
        font-size: 1.5rem;
    }

    .countdown-time {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .form-section {
        padding: 1rem;
    }

    .form-container {
        padding: 1.5rem;
    }

    .floating-emoji {
        font-size: 1.5rem;
    }
}

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

/* Focus styles for keyboard navigation */
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* ================================
   UTILITY CLASSES
   ================================ */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
