/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --purple: #652d86;
    --purple-light: #7e3fa3;
    --purple-dark: #4a1f63;
    --purple-glow: rgba(101, 45, 134, 0.25);
    --white: #ffffff;
    --off-white: #f8f5fb;
    --bg: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #555566;
    --text-muted: #8888a0;
    --border: rgba(101, 45, 134, 0.12);
    --radius-md: 12px;
    --radius-xl: 24px;
}
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg); color: var(--text-primary);
    overflow-x: hidden; min-height: 100vh; line-height: 1.6;
}

/* ===== BACKGROUND ===== */
#particles-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.orb {
    position: fixed; border-radius: 50%; filter: blur(100px); opacity: 0.08;
    pointer-events: none; z-index: 0; animation: float 20s ease-in-out infinite;
}
.orb-1 { width: 500px; height: 500px; background: var(--purple); top: -150px; left: -150px; }
.orb-2 { width: 400px; height: 400px; background: var(--purple-light); bottom: -100px; right: -100px; animation-delay: -7s; }
.orb-3 { width: 300px; height: 300px; background: var(--purple); top: 50%; left: 60%; animation-delay: -14s; }
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ===== PAGE CENTER ===== */
.page-center {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 2rem; position: relative; z-index: 1;
}

/* ===== INVITE CARD ===== */
.invite-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    max-width: 500px; width: 100%;
    position: relative; overflow: hidden;
    animation: fadeInUp 0.8s ease both;
    box-shadow: 0 4px 24px rgba(101, 45, 134, 0.08), 0 12px 48px rgba(101, 45, 134, 0.06);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.invite-card:hover {
    box-shadow: 0 8px 32px rgba(101, 45, 134, 0.12), 0 16px 56px rgba(101, 45, 134, 0.08);
    transform: translateY(-2px);
}
.invite-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--purple), var(--purple-light), var(--purple));
}

/* ===== INVITE HEADER ===== */
.invite-header { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.invite-icon {
    width: 52px; height: 52px; min-width: 52px; border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--purple), var(--purple-light));
    display: flex; align-items: center; justify-content: center; color: var(--white);
    box-shadow: 0 4px 12px rgba(101, 45, 134, 0.25);
}
.invite-title {
    font-family: 'Outfit', sans-serif; font-size: 1.35rem; font-weight: 700;
    line-height: 1.3; color: var(--purple-dark);
}
.invite-subtitle { font-size: 0.9rem; color: var(--text-muted); margin-top: 4px; }

/* ===== FORM ===== */
.invite-form { display: flex; flex-direction: column; gap: 14px; }
.input-wrapper {
    position: relative; display: flex; align-items: center;
    background: var(--off-white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md); transition: all 0.3s ease;
}
.input-wrapper:focus-within {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px var(--purple-glow);
    background: var(--white);
}
.input-icon { position: absolute; left: 16px; color: var(--text-muted); pointer-events: none; transition: color 0.3s; }
.input-wrapper:focus-within .input-icon { color: var(--purple); }
.email-input {
    width: 100%; padding: 16px 16px 16px 48px; background: transparent; border: none;
    color: var(--text-primary); font-size: 1rem; font-family: 'Inter', sans-serif; outline: none;
}
.email-input::placeholder { color: var(--text-muted); }

/* ===== SEND BUTTON ===== */
.send-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 16px 24px; width: 100%;
    background: linear-gradient(135deg, var(--purple), var(--purple-light));
    border: none; border-radius: var(--radius-md); color: var(--white); font-weight: 600;
    font-size: 1rem; cursor: pointer; transition: all 0.3s ease;
    position: relative; overflow: hidden; font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 16px rgba(101, 45, 134, 0.3);
}
.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(101, 45, 134, 0.4);
    background: linear-gradient(135deg, var(--purple-light), var(--purple));
}
.send-btn:active { transform: translateY(0); box-shadow: 0 4px 16px rgba(101, 45, 134, 0.3); }
.send-btn.loading .btn-text, .send-btn.loading .btn-icon { opacity: 0; }
.send-btn.loading .btn-loader { opacity: 1; }
.btn-loader {
    position: absolute; opacity: 0; transition: opacity 0.3s;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== NOTE ===== */
.invite-note {
    font-size: 0.82rem; color: var(--text-muted); margin-top: 18px; text-align: center;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed; inset: 0; z-index: 1000; background: rgba(101, 45, 134, 0.15);
    backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center;
    padding: 1.5rem; opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal {
    background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-xl);
    padding: 36px; max-width: 520px; width: 100%; position: relative; max-height: 90vh;
    overflow-y: auto; transform: scale(0.9) translateY(20px); transition: transform 0.4s ease;
    box-shadow: 0 20px 60px rgba(101, 45, 134, 0.15);
}
.modal-overlay.active .modal { transform: scale(1) translateY(0); }
.modal-close {
    position: absolute; top: 16px; right: 16px; background: var(--off-white);
    border: 1px solid var(--border); border-radius: 8px; padding: 6px; cursor: pointer;
    color: var(--text-muted); transition: all 0.2s;
}
.modal-close:hover { color: var(--purple); background: rgba(101, 45, 134, 0.08); }
.modal-success-icon {
    width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(101, 45, 134, 0.1), rgba(126, 63, 163, 0.1));
    display: flex; align-items: center; justify-content: center; color: var(--purple);
    animation: scaleIn 0.5s ease;
}
@keyframes scaleIn { 0% { transform: scale(0); } 100% { transform: scale(1); } }
.modal-title {
    font-family: 'Outfit', sans-serif; font-size: 1.5rem; font-weight: 800;
    text-align: center; margin-bottom: 8px; color: var(--purple-dark);
}
.modal-text { text-align: center; color: var(--text-secondary); font-size: 0.9rem; }
.modal-email {
    text-align: center; font-weight: 700; font-size: 1rem;
    color: var(--purple); margin-bottom: 20px;
}

/* ===== EMAIL PREVIEW ===== */
.email-preview {
    background: var(--off-white); border-radius: var(--radius-md); overflow: hidden;
    margin-bottom: 20px; border: 1px solid var(--border);
}
.ep-header {
    background: linear-gradient(135deg, var(--purple), var(--purple-light));
    padding: 10px 16px;
}
.ep-label { font-size: 0.75rem; font-weight: 600; color: var(--white); text-transform: uppercase; letter-spacing: 1px; }
.ep-body { padding: 24px; color: #333; background: var(--white); }
.ep-logo {
    width: 48px; height: 48px; border-radius: 12px; margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--purple), var(--purple-light));
    display: flex; align-items: center; justify-content: center;
    font-family: 'Outfit', sans-serif; font-weight: 900; font-size: 1.5rem; color: var(--white);
    box-shadow: 0 4px 12px rgba(101, 45, 134, 0.2);
}
.ep-body h3 { text-align: center; margin-bottom: 12px; font-family: 'Outfit', sans-serif; color: var(--purple-dark); }
.ep-body > p { text-align: center; font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 16px; }
.ep-features { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.ep-feat {
    padding: 10px 14px; background: var(--off-white); border-radius: 8px;
    font-size: 0.85rem; color: var(--text-primary); border: 1px solid rgba(101,45,134,0.06);
}
.ep-cta {
    display: block; width: 100%; padding: 14px; text-align: center; text-decoration: none;
    background: linear-gradient(135deg, var(--purple), var(--purple-light));
    color: var(--white); font-weight: 700; border-radius: 10px; font-size: 1rem;
    transition: all 0.3s ease; box-shadow: 0 4px 16px rgba(101, 45, 134, 0.25);
}
.ep-cta:hover { box-shadow: 0 6px 24px rgba(101, 45, 134, 0.35); transform: translateY(-2px); }
.ep-footer { font-size: 0.75rem; color: var(--text-muted); text-align: center; margin-top: 16px; }
.modal-done-btn {
    width: 100%; padding: 14px;
    background: var(--off-white); border: 1.5px solid var(--border);
    border-radius: var(--radius-md); color: var(--purple); font-weight: 600;
    font-size: 0.95rem; cursor: pointer; transition: all 0.3s; font-family: 'Inter', sans-serif;
}
.modal-done-btn:hover { background: rgba(101, 45, 134, 0.06); border-color: var(--purple); }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp { 0% { opacity: 0; transform: translateY(30px); } 100% { opacity: 1; transform: translateY(0); } }

/* ===== RESPONSIVE - TABLET ===== */
@media (min-width: 481px) and (max-width: 768px) {
    .page-center { padding: 1.5rem; }
    .invite-card { padding: 32px; max-width: 460px; }
    .invite-title { font-size: 1.25rem; }
}

/* ===== RESPONSIVE - MOBILE ===== */
@media (max-width: 480px) {
    .page-center { padding: 1rem; }
    .invite-card {
        padding: 24px 20px;
        border-radius: 18px;
        max-width: 100%;
    }
    .invite-header { gap: 12px; margin-bottom: 22px; }
    .invite-icon { width: 44px; height: 44px; min-width: 44px; }
    .invite-icon svg { width: 20px; height: 20px; }
    .invite-title { font-size: 1.1rem; }
    .invite-subtitle { font-size: 0.82rem; }
    .email-input { padding: 14px 14px 14px 44px; font-size: 0.92rem; }
    .input-icon { left: 14px; }
    .input-icon svg { width: 18px; height: 18px; }
    .send-btn { padding: 14px 20px; font-size: 0.95rem; }
    .invite-note { font-size: 0.76rem; }

    /* Modal mobile */
    .modal-overlay { padding: 0.75rem; }
    .modal {
        padding: 24px 20px; border-radius: 18px;
        max-height: 92vh;
    }
    .modal-title { font-size: 1.25rem; }
    .modal-success-icon { width: 60px; height: 60px; }
    .modal-success-icon svg { width: 36px; height: 36px; }
    .ep-body { padding: 18px; }
    .ep-logo { width: 40px; height: 40px; font-size: 1.2rem; }
    .ep-body h3 { font-size: 1rem; }
    .ep-feat { padding: 8px 12px; font-size: 0.8rem; }
    .ep-cta { padding: 12px; font-size: 0.92rem; }
    .modal-done-btn { padding: 12px; font-size: 0.9rem; }
}
/* ===== RESPONSIVE - LARGE DESKTOP ===== */
@media (min-width: 1200px) {
    .invite-card {
        padding: 48px;
        max-width: 540px;
    }
    .invite-title { font-size: 1.45rem; }
    .email-input { padding: 18px 18px 18px 52px; font-size: 1.05rem; }
    .send-btn { padding: 18px 28px; font-size: 1.05rem; }
}

