@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --accent: #f472b6;
    --text-dark: #1e1b4b;
    --text-medium: #4b5563;
    --text-light: #9ca3af;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-light: #e5e7eb;
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --gradient-2: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    --shadow-sm: 0 2px 8px rgba(99, 102, 241, 0.08);
    --shadow-md: 0 8px 24px rgba(99, 102, 241, 0.12);
    --shadow-lg: 0 16px 40px rgba(99, 102, 241, 0.16);
}

html {
    height: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: var(--gradient-1);
    color: white;
    padding: 50px 20px 70px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -50%;
    width: 200%;
    height: 300%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 25%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 20%),
        radial-gradient(circle at 40% 80%, rgba(255,255,255,0.06) 0%, transparent 30%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 50px;
    background: var(--bg-light);
    border-radius: 100% 100% 0 0;
}

header .container {
    position: relative;
    z-index: 1;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.header-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #34d399;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

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

header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

header .subtitle {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.9;
}

main {
    flex: 1;
    padding: 0 20px 50px;
    margin-top: -30px;
    position: relative;
    z-index: 2;
}

section {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 28px 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(99, 102, 241, 0.08);
}

.section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    margin-bottom: 24px;
}

.section-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-sm);
}

.section-icon svg {
    width: 22px;
    height: 22px;
}

h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.events-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.event-card {
    background: linear-gradient(135deg, #faf5ff 0%, #f0f9ff 100%);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.event-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gradient-1);
    border-radius: 4px 0 0 4px;
}

.event-card:active {
    transform: scale(0.98);
}

.event-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--gradient-1);
    color: white;
    padding: 5px 12px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.event-badge svg {
    width: 6px;
    height: 6px;
}

.event-card h3 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 12px;
    font-weight: 700;
}

.event-detail {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-medium);
    margin-bottom: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.event-detail svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 1px;
}

.event-note {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    color: var(--primary-dark);
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.85rem;
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.form-intro {
    color: var(--text-medium);
    margin-bottom: 24px;
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: center;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.required {
    color: #f43f5e;
    font-weight: 700;
}

.optional-label {
    font-weight: 500;
    color: var(--text-light);
    font-size: 0.75rem;
}

input {
    padding: 14px 16px;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: #fafafa;
    -webkit-appearance: none;
}

input:hover {
    border-color: #d1d5db;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

input::placeholder {
    color: #9ca3af;
}

.spouse-section {
    background: linear-gradient(135deg, #faf5ff 0%, #f0f9ff 100%);
    border-radius: 16px;
    padding: 24px 20px;
    margin: 20px 0;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.spouse-section h3 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.spouse-section h3 svg {
    color: var(--accent);
}

.submit-btn {
    background: var(--gradient-1);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
    width: 100%;
    -webkit-tap-highlight-color: transparent;
}

.submit-btn:active {
    transform: scale(0.98);
}

.submit-btn svg {
    width: 18px;
    height: 18px;
}

.success-message {
    text-align: center;
    padding: 40px 24px;
}

.success-message.hidden {
    display: none;
}

.success-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.success-message h3 {
    color: var(--text-dark);
    font-size: 1.4rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.success-message p {
    color: var(--text-medium);
    font-size: 0.95rem;
}

.connect-section {
    text-align: center;
    background: var(--gradient-1);
    color: white;
    position: relative;
    overflow: hidden;
}

.connect-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 25%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 30%);
}

.connect-section .section-header {
    position: relative;
    z-index: 1;
}

.connect-section .section-icon {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}

.connect-section h2 {
    color: white;
}

.connect-section > p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 24px;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
    line-height: 1.6;
}

.facebook-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: white;
    color: var(--text-dark);
    padding: 14px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.facebook-btn:active {
    transform: scale(0.98);
}

.facebook-icon {
    width: 22px;
    height: 22px;
    color: #1877f2;
}

footer {
    background: var(--text-dark);
    color: white;
    padding: 24px 20px;
    text-align: center;
}

footer p {
    font-size: 0.8rem;
    opacity: 0.6;
}

@media (min-width: 480px) {
    header {
        padding: 60px 24px 80px;
    }

    header h1 {
        font-size: 2.4rem;
    }

    section {
        padding: 32px 28px;
    }

    .facebook-btn {
        width: auto;
    }
}

@media (min-width: 768px) {
    header {
        padding: 80px 32px 100px;
    }

    header::after {
        height: 60px;
    }

    header h1 {
        font-size: 3rem;
    }

    header .subtitle {
        font-size: 1.15rem;
    }

    main {
        padding: 0 32px 60px;
        margin-top: -40px;
    }

    section {
        padding: 40px;
        border-radius: 24px;
        margin-bottom: 28px;
    }

    .section-header {
        flex-direction: row;
        text-align: left;
        gap: 16px;
    }

    .section-icon {
        width: 52px;
        height: 52px;
    }

    h2 {
        font-size: 1.75rem;
    }

    .events-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .event-card {
        padding: 28px;
    }

    .event-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow-lg);
    }

    .event-card h3 {
        font-size: 1.35rem;
    }

    .form-intro {
        text-align: left;
        font-size: 1rem;
    }

    .form-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-bottom: 20px;
    }

    .form-group.full-width {
        max-width: 48%;
    }

    .spouse-section {
        padding: 32px;
    }

    .spouse-section h3 {
        justify-content: flex-start;
    }

    .submit-btn {
        width: auto;
        padding: 16px 40px;
    }

    .submit-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
    }

    .connect-section > p {
        font-size: 1.05rem;
        max-width: 450px;
        margin-left: auto;
        margin-right: auto;
    }

    .facebook-btn {
        padding: 16px 32px;
    }

    .facebook-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    }

    footer {
        padding: 32px;
    }

    footer p {
        font-size: 0.85rem;
    }
}

@media (min-width: 1024px) {
    header h1 {
        font-size: 3.5rem;
    }

    section {
        padding: 48px;
    }

    .events-grid {
        gap: 24px;
    }
}
