﻿/* =========================
   GOOGLE FONTS
========================= */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;800&family=DM+Sans:wght@400;500;600&display=swap');

/* =========================
   ROOT VARIABLES
========================= */
:root {
    --bg: #fdf8f5;
    --text: #1a1a2e;
    --card: #ffffff;
    --muted: #6b7280;
    --primary: #e8445a;
    --primary-2: #ff8c69;
    --gradient: linear-gradient(135deg, #e8445a 0%, #ff8c69 100%);
    --gradient-soft: linear-gradient(135deg, rgba(232,68,90,0.08), rgba(255,140,105,0.08));
    --nav: rgba(253,248,245,0.92);
    --shadow: 0 8px 32px rgba(232,68,90,0.12);
    --shadow-card: 0 4px 24px rgba(0,0,0,0.07);
    --radius: 24px;
    --radius-sm: 14px;
}

body.dark {
    --bg: #12111a;
    --text: #f0ece8;
    --card: #1e1c2a;
    --muted: #9ca3af;
    --nav: rgba(18,17,26,0.92);
    --shadow: 0 8px 32px rgba(0,0,0,0.3);
    --shadow-card: 0 4px 24px rgba(0,0,0,0.25);
    --gradient-soft: linear-gradient(135deg, rgba(232,68,90,0.12), rgba(255,140,105,0.12));
}

/* =========================
   BASE
========================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: background 0.35s ease, color 0.35s ease;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

/* =========================
   NAVBAR
========================= */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 40px;
    background: var(--nav);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(232,68,90,0.08);
    transition: background 0.35s ease;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-weight: 800;
    font-size: 1.3rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

    .navbar nav a {
        position: relative;
        font-weight: 500;
        font-size: 0.95rem;
        padding: 4px 0;
        color: var(--text);
        transition: color 0.2s;
    }

        .navbar nav a::after {
            content: "";
            position: absolute;
            left: 0;
            bottom: -3px;
            width: 0%;
            height: 2px;
            background: var(--gradient);
            border-radius: 99px;
            transition: width 0.3s ease;
        }

        .navbar nav a:hover::after,
        .navbar nav a.active::after {
            width: 100%;
        }

.dark-toggle {
    background: var(--card);
    border: 1.5px solid rgba(232,68,90,0.2);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, border-color 0.2s;
    position: relative;
    z-index: 1;
}

    .dark-toggle:hover {
        transform: rotate(20deg) scale(1.1);
        border-color: var(--primary);
    }

/* =========================
   HERO
========================= */
.hero {
    position: relative;
    padding: 120px 24px 200px;
    text-align: center;
    background: var(--gradient);
    overflow: hidden;
    z-index: 1;
}

    /* Decorative blobs */
    .hero::before {
        content: "";
        position: absolute;
        width: 500px;
        height: 500px;
        background: rgba(255,255,255,0.08);
        border-radius: 50%;
        top: -150px;
        left: -100px;
        pointer-events: none;
    }

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 99px;
    padding: 6px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 800;
    color: white;
    line-height: 1.15;
    max-width: 700px;
    margin: 0 auto 18px;
}

.hero p {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.88);
    max-width: 480px;
    margin: 0 auto;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    padding: 16px 40px;
    border-radius: 999px;
    border: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    background: white;
    color: var(--primary);
    cursor: pointer;
    box-shadow: 0 16px 40px rgba(0,0,0,0.2);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
    position: relative;
    z-index: 2;
    text-decoration: none;
}

    .hero-cta:hover {
        transform: translateY(-3px) scale(1.03);
        box-shadow: 0 24px 50px rgba(0,0,0,0.25);
        background: var(--text);
        color: white;
    }

/* Hero bottom curve */
.hero-curve {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 2;
    pointer-events: none;
}

    .hero-curve svg {
        display: block;
        width: 100%;
        height: 90px;
    }

/* =========================
   SECTIONS
========================= */
.section {
    padding: 100px 24px;
    background: var(--bg);
    text-align: center;
    position: relative;
    z-index: 2;
    transition: background 0.35s ease;
}

.section-alt {
    background: var(--card);
}

.section-header {
    max-width: 600px;
    margin: 0 auto 56px;
}

.section-label {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 12px;
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.9rem, 3.5vw, 2.8rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 14px;
}

.section-header p {
    font-size: 1.05rem;
    color: var(--muted);
}

/* =========================
   FEATURE / GIFT CARDS
========================= */
.gift-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.gift-card {
    background: var(--card);
    padding: 36px 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    border: 1.5px solid transparent;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
}

    .gift-card::after {
        content: "";
        position: absolute;
        inset: 0;
        background: var(--gradient-soft);
        opacity: 0;
        transition: opacity 0.3s ease;
        border-radius: var(--radius);
        pointer-events: none;
    }

    .gift-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow);
        border-color: rgba(232,68,90,0.25);
    }

        .gift-card:hover::after {
            opacity: 1;
        }

    .gift-card h3 {
        font-family: 'Playfair Display', serif;
        font-size: 1.15rem;
        margin-bottom: 8px;
    }

    .gift-card p {
        color: var(--muted);
        font-size: 0.93rem;
        line-height: 1.5;
    }

    .gift-card .card-icon {
        font-size: 2rem;
        margin-bottom: 16px;
        display: block;
    }

/* Result cards (gift finder) */
.result-card {
    background: var(--card);
    padding: 28px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    border: 1.5px solid transparent;
    transition: transform 0.25s ease, border-color 0.25s ease;
    text-align: left;
}

    .result-card:hover {
        transform: translateY(-4px);
        border-color: rgba(232,68,90,0.3);
    }

    .result-card h3 {
        font-family: 'Playfair Display', serif;
        font-size: 1.1rem;
        margin-bottom: 6px;
    }

    .result-card p {
        color: var(--muted);
        font-size: 0.9rem;
        margin-bottom: 16px;
    }

    .result-card .price-tag {
        display: inline-block;
        background: var(--gradient-soft);
        color: var(--primary);
        font-weight: 600;
        font-size: 0.88rem;
        padding: 4px 12px;
        border-radius: 99px;
        margin-bottom: 16px;
    }

.btn-primary {
    display: inline-block;
    padding: 11px 26px;
    border-radius: 99px;
    background: var(--gradient);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
}

    .btn-primary:hover {
        opacity: 0.88;
        transform: translateY(-1px);
    }

/* =========================
   GIFT FINDER FORM
========================= */
.finder-wrap {
    max-width: 660px;
    margin: 0 auto;
    background: var(--card);
    padding: 52px 48px;
    border-radius: 32px;
    box-shadow: 0 20px 60px rgba(232,68,90,0.1);
    border: 1.5px solid rgba(232,68,90,0.1);
    text-align: left;
}

    .finder-wrap h1 {
        font-family: 'Playfair Display', serif;
        font-size: 2rem;
        font-weight: 800;
        margin-bottom: 6px;
    }

    .finder-wrap .subtitle {
        color: var(--muted);
        margin-bottom: 36px;
        font-size: 0.97rem;
    }

.form-group {
    margin-bottom: 22px;
}

    .form-group label {
        display: block;
        font-weight: 600;
        font-size: 0.9rem;
        margin-bottom: 8px;
        color: var(--text);
    }

    .form-group select {
        width: 100%;
        padding: 14px 18px;
        border-radius: var(--radius-sm);
        border: 1.5px solid rgba(0,0,0,0.1);
        background: var(--bg);
        color: var(--text);
        font-family: 'DM Sans', sans-serif;
        font-size: 0.97rem;
        outline: none;
        transition: border-color 0.2s;
        -webkit-appearance: none;
        appearance: none;
        cursor: pointer;
    }

body.dark .form-group select {
    border-color: rgba(255,255,255,0.12);
}

.form-group select:focus {
    border-color: var(--primary);
}

.finder-btn {
    width: 100%;
    margin-top: 10px;
    padding: 16px;
    border-radius: var(--radius-sm);
    background: var(--gradient);
    color: white;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    position: relative;
    z-index: 1;
}

    .finder-btn:hover {
        opacity: 0.9;
        transform: translateY(-2px);
    }

#finderResults {
    margin-top: 40px;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 6px;
    scroll-behavior: smooth;
}

    /* Scrollbar Styling */
    #finderResults::-webkit-scrollbar {
        width: 6px;
    }

    #finderResults::-webkit-scrollbar-track {
        background: transparent;
    }

    #finderResults::-webkit-scrollbar-thumb {
        background: linear-gradient(135deg, #e8445a, #ff8c69);
        border-radius: 99px;
    }

        #finderResults::-webkit-scrollbar-thumb:hover {
            background: #e8445a;
        }

.no-results {
    text-align: center;
    padding: 32px;
    color: var(--muted);
    font-size: 1rem;
}

/* =========================
   LAST MINUTE PAGE
========================= */
.lm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

/* =========================
   ABOUT PAGE
========================= */
.about-content {
    max-width: 660px;
    margin: 0 auto;
    text-align: left;
}

    .about-content p {
        color: var(--muted);
        font-size: 1.05rem;
        line-height: 1.8;
        margin-bottom: 20px;
    }

/* =========================
   STATS ROW
========================= */
.stats-row {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.stat {
    text-align: center;
}

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.88rem;
    color: var(--muted);
    margin-top: 4px;
}

/* =========================
   TESTIMONIALS
========================= */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    max-width: 960px;
    margin: 0 auto;
}

.testimonial {
    background: var(--card);
    padding: 32px 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    text-align: left;
    border: 1.5px solid rgba(232,68,90,0.07);
}

    .testimonial .stars {
        color: #f59e0b;
        font-size: 1rem;
        margin-bottom: 12px;
        letter-spacing: 2px;
    }

    .testimonial p {
        font-size: 0.97rem;
        line-height: 1.7;
        color: var(--text);
        margin-bottom: 16px;
    }

    .testimonial .author {
        font-weight: 600;
        font-size: 0.88rem;
        color: var(--muted);
    }

/* =========================
   FOOTER
========================= */
footer {
    text-align: center;
    padding: 48px 24px;
    font-size: 0.88rem;
    color: var(--muted);
    border-top: 1px solid rgba(0,0,0,0.06);
}

body.dark footer {
    border-top-color: rgba(255,255,255,0.06);
}

footer a {
    color: var(--primary);
    font-weight: 500;
}

    footer a:hover {
        text-decoration: underline;
    }

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 640px) {
    .navbar {
        padding: 14px 20px;
        gap: 12px;
    }

        .navbar nav {
            gap: 16px;
        }

            .navbar nav a {
                font-size: 0.85rem;
            }

    .hero {
        padding: 90px 20px 160px;
    }

    .finder-wrap {
        padding: 36px 24px;
    }

    .stats-row {
        gap: 36px;
    }
}

/* =========================
   USER AUTH & PROFILE
========================= */
.auth-wrap {
    max-width: 460px;
    margin: 80px auto;
    background: var(--card);
    padding: 52px 44px;
    border-radius: 32px;
    box-shadow: 0 20px 60px rgba(232,68,90,0.12);
    border: 1.5px solid rgba(232,68,90,0.1);
    text-align: center;
}

    .auth-wrap .auth-icon {
        font-size: 2.8rem;
        margin-bottom: 14px;
    }

    .auth-wrap h2 {
        font-family: 'Playfair Display', serif;
        font-size: 1.9rem;
        margin-bottom: 6px;
    }

    .auth-wrap .subtitle {
        color: var(--muted);
        font-size: 0.93rem;
        margin-bottom: 32px;
    }

.auth-tabs {
    display: flex;
    background: var(--bg);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 28px;
    gap: 4px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: transparent;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
}

    .auth-tab.active {
        background: var(--card);
        color: var(--text);
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }

.auth-field {
    text-align: left;
    margin-bottom: 16px;
}

    .auth-field label {
        display: block;
        font-size: 0.85rem;
        font-weight: 600;
        margin-bottom: 7px;
        color: var(--text);
    }

    .auth-field input {
        width: 100%;
        padding: 13px 16px;
        border-radius: 12px;
        border: 1.5px solid rgba(0,0,0,0.1);
        background: var(--bg);
        color: var(--text);
        font-family: 'DM Sans', sans-serif;
        font-size: 0.97rem;
        outline: none;
        transition: border-color 0.2s;
    }

body.dark .auth-field input {
    border-color: rgba(255,255,255,0.12);
}

.auth-field input:focus {
    border-color: var(--primary);
}

.auth-submit {
    width: 100%;
    margin-top: 6px;
    padding: 14px;
    border-radius: 12px;
    background: var(--gradient);
    color: white;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

    .auth-submit:hover {
        opacity: 0.9;
        transform: translateY(-2px);
    }

.auth-error {
    display: none;
    color: #e8445a;
    font-size: 0.87rem;
    font-weight: 600;
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(232,68,90,0.08);
    border-radius: 10px;
}

.auth-success {
    display: none;
    color: #059669;
    font-size: 0.87rem;
    font-weight: 600;
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(5,150,105,0.08);
    border-radius: 10px;
}

/* Nav user badge */
.nav-user-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 16px 7px 10px;
    border-radius: 99px;
    background: var(--gradient-soft);
    border: 1.5px solid rgba(232,68,90,0.2);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}

    .nav-user-btn:hover {
        background: rgba(232,68,90,0.15);
    }

.nav-user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--gradient);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Profile page */
.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    background: var(--card);
    padding: 36px 40px;
    border-radius: 28px;
    box-shadow: var(--shadow-card);
    border: 1.5px solid rgba(232,68,90,0.08);
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.profile-avatar-big {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--gradient);
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-info h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.profile-info p {
    color: var(--muted);
    font-size: 0.9rem;
}

.profile-logout {
    margin-left: auto;
    padding: 9px 20px;
    border-radius: 99px;
    border: 1.5px solid rgba(232,68,90,0.3);
    background: transparent;
    color: var(--primary);
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 0.87rem;
    cursor: pointer;
    transition: all 0.2s;
}

    .profile-logout:hover {
        background: var(--primary);
        color: white;
    }

.profile-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.profile-tab {
    padding: 10px 22px;
    border-radius: 99px;
    border: 1.5px solid rgba(0,0,0,0.1);
    background: var(--card);
    color: var(--muted);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

body.dark .profile-tab {
    border-color: rgba(255,255,255,0.1);
}

.profile-tab.active,
.profile-tab:hover {
    background: var(--gradient);
    color: white;
    border-color: transparent;
}

/* Gift cards in profile */
.profile-gift-card {
    background: var(--card);
    padding: 22px 20px;
    border-radius: 18px;
    box-shadow: var(--shadow-card);
    border: 1.5px solid rgba(232,68,90,0.07);
    display: flex;
    gap: 16px;
    align-items: flex-start;
    animation: fadeIn 0.3s ease;
}

    .profile-gift-card .gift-emoji {
        font-size: 2rem;
        flex-shrink: 0;
    }

    .profile-gift-card .gift-info {
        flex: 1;
    }

    .profile-gift-card h4 {
        font-size: 0.97rem;
        font-weight: 600;
        margin-bottom: 4px;
    }

    .profile-gift-card p {
        font-size: 0.87rem;
        color: var(--muted);
        margin-bottom: 10px;
        line-height: 1.5;
    }

    .profile-gift-card .gift-actions {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }

.gift-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 99px;
    background: var(--gradient-soft);
    color: var(--primary);
}

    .gift-tag.bought {
        background: rgba(5,150,105,0.1);
        color: #059669;
    }

.icon-btn {
    padding: 7px 14px;
    border-radius: 8px;
    border: 1.5px solid rgba(0,0,0,0.08);
    background: var(--bg);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'DM Sans', sans-serif;
}

body.dark .icon-btn {
    border-color: rgba(255,255,255,0.1);
}

.icon-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.icon-btn.danger:hover {
    background: rgba(232,68,90,0.08);
    border-color: var(--primary);
    color: var(--primary);
}

.note-input {
    width: 100%;
    margin-top: 10px;
    padding: 10px 13px;
    border-radius: 10px;
    border: 1.5px solid rgba(0,0,0,0.1);
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    outline: none;
    resize: none;
    min-height: 70px;
    transition: border-color 0.2s;
}

body.dark .note-input {
    border-color: rgba(255,255,255,0.1);
}

.note-input:focus {
    border-color: var(--primary);
}

.empty-profile {
    text-align: center;
    padding: 60px 24px;
    color: var(--muted);
}

    .empty-profile a {
        color: var(--primary);
        font-weight: 600;
    }
