@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@500;700;800&family=Playfair+Display:ital,wght@0,700;1,700&display=swap');

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

:root {
    /* Premium Romantic Palette */
    --primary: #f43f5e;       /* Rose Red */
    --primary-hover: #e11d48;
    --secondary: #be123c;     /* Ruby */
    --accent: #fda4af;        /* Soft Pink */
    
    --bg-main: #fffafb;       /* Airy Blush White */
    --bg-card: rgba(255, 255, 255, 0.6);
    --bg-nav: rgba(255, 250, 251, 0.85);
    
    --text-main: #1f2937;
    --text-muted: #64748b;
    --text-on-primary: #ffffff;
    
    --border: rgba(244, 63, 94, 0.1);
    --shadow: 0 10px 40px -10px rgba(244, 63, 94, 0.1);
    --shadow-lg: 0 20px 60px -12px rgba(244, 63, 94, 0.15);
    
    --glass-bg: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(255, 255, 255, 0.6);
    
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
    --bg-main: #0a0104;       /* Deep Midnight Rose */
    --bg-card: rgba(28, 0, 8, 0.7);
    --bg-nav: rgba(10, 1, 4, 0.92);
    
    --text-main: #fff1f2;
    --text-muted: #fda4af;
    
    --border: rgba(244, 63, 94, 0.2);
    --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.8);
    --shadow-lg: 0 20px 60px -12px rgba(0, 0, 0, 0.9);
    
    --glass-bg: rgba(40, 5, 15, 0.5);
    --glass-border: rgba(255, 255, 255, 0.05);
}

/* --- Base Enhancements --- */
body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, .font-heading {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Navigation & Mobile Menu --- */
.sticky-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: 70px;
    display: flex;
    align-items: center;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.nav-links a {
    color: var(--text-main);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary);
}

#mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-main);
    cursor: pointer;
}

/* Mobile Nav Drawer */
@media (max-width: 768px) {
    #mobile-menu-btn { display: block; }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-nav);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        flex-direction: column;
        padding: 2rem 1.5rem;
        transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 999;
        text-align: center;
        gap: 1rem;
        overflow-y: auto; /* Enable scroll for long menus */
    }

    .nav-links.active {
        left: 0;
    }

    .dropdown {
        width: 100%;
        display: block;
    }

    .dropdown-content {
        position: static !important;
        box-shadow: none;
        background: rgba(244, 63, 94, 0.05);
        padding: 0.5rem 0;
        margin-top: 0.5rem;
        display: none;
        width: 100%;
        border-radius: 12px;
        transform: none !important;
        animation: none !important;
    }
    
    .dropdown.active .dropdown-content,
    .dropdown:hover .dropdown-content {
        display: block !important;
    }

    .dropdown-content a {
        padding: 0.75rem;
        font-size: 0.95rem;
        display: block;
    }
}

/* --- Attractive UI Elements --- */
.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--primary));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientFlow 5s linear infinite;
}

@keyframes gradientFlow {
    to { background-position: 200% center; }
}

/* Iridescent Card */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(25px) saturate(160%);
    -webkit-backdrop-filter: blur(25px) saturate(160%);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 3rem;
    transition: var(--transition);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid transparent;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(255,255,255,0.4), transparent, rgba(255,255,255,0.2)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Hover removed as requested */

.card-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 10px rgba(244, 63, 94, 0.3));
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.rotated-heart {
    display: inline-block;
    transform: rotate(-15deg);
    transition: var(--transition);
}

/* Tool Card Heart Hover removed */
#tool-card-heart-hover-placeholder { display: none; }

/* Floating Label Inputs */
.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input, 
.form-group select {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--bg-main);
    border: 2px solid var(--border);
    border-radius: 12px;
    outline: none;
    color: var(--text-main);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group label {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: var(--transition);
    pointer-events: none;
    background: var(--bg-card);
    padding: 0 0.5rem;
}

.form-group input:focus,
.form-group input:not(:placeholder-shown) {
    border-color: var(--primary);
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
    top: 0;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes floatHeart {
    0% { transform: translateY(0) rotate(0deg) scale(0.5); opacity: 0; }
    10% { opacity: var(--opacity, 0.2); }
    90% { opacity: var(--opacity, 0.2); }
    100% { transform: translateY(-100vh) rotate(360deg) scale(1.5); opacity: 0; }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

h1, .hero-title {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    letter-spacing: -1px;
}

/* --- Header & Navigation --- */
.sticky-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: 75px;
    display: flex;
    align-items: center;
    background: var(--bg-nav);
}

/* --- Premium Romantic Hero --- */
.hero-romantic {
    padding: 6rem 0;
    background: radial-gradient(circle at top right, var(--accent), transparent);
}

.hero-grid-romantic {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--border);
    border: 1px solid var(--primary);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-main-img {
    width: 100%;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.hero-image-container {
    padding: 1.5rem;
    border-radius: 40px;
}

.hero-main.tool-card:hover {
    /* Maintained simple brightness or slight border for visibility without transform */
    border-color: var(--primary);
}

.tools-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.py-20 { padding: 5rem 0; }
.mb-16 { margin-bottom: 4rem; }

/* --- Result Screens (Premium Romantic) --- */
.premium-result-header {
    background: radial-gradient(circle at center, var(--accent), transparent 70%);
    padding: 3rem 1.5rem;
    border-radius: 30px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.premium-result-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, var(--primary), transparent 30%);
    animation: rotateGlow 10s linear infinite;
    opacity: 0.1;
}

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

.result-percentage.text-gradient {
    font-size: 5rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    margin: 0.5rem 0;
    filter: drop-shadow(0 0 15px rgba(244, 63, 94, 0.4));
}

nav.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.nav-logo {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.footer-logo {
    height: 50px;
    width: auto;
    margin-bottom: 1rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    min-width: 260px;
    top: 90%; /* Slight overlap to ensure transition is smooth */
    left: 0;
    border-radius: 16px;
    padding: 0.75rem;
    background: var(--bg-nav);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
}

/* Pseudo-element to bridge the gap and keep hover active */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 25px;
}

.dropdown-content a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 8px;
}

.dropdown-content a:hover {
    background: var(--border);
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* --- Footer --- */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding-top: 5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    padding-bottom: 4rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-logo-box {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    height: 48px;
    width: auto;
}

.footer-site-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--primary);
    font-style: italic;
    font-weight: 700;
}

.footer-brand p {
    color: var(--text-muted);
    line-height: 1.8;
    max-width: 450px;
}

.footer-links h4 {
    margin-bottom: 1.5rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Typography Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Tool Hero Section */
.tool-hero {
    text-align: center;
    padding: 4rem 0;
}

.tool-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tool-hero p {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Form & Tool Layouts --- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 40px 1fr;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.form-deep-grid {
    display: grid;
    grid-template-columns: 1fr 40px 1fr;
    align-items: center;
    gap: 1rem;
}

.love-separator {
    text-align: center;
    font-size: 1.8rem;
    color: var(--primary);
}

.form-group {
    position: relative;
    margin-bottom: 0; /* Let grid handle vertical gap */
}

/* Tool Hero Section (Compact) */
.tool-hero {
    text-align: center;
    padding: 3rem 0;
}

/* Action Buttons (Horizontal Row for Desktop) */
.action-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

/* Mobile Specific Fixes */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .form-grid, .form-deep-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .love-separator {
        transform: none !important;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0.5rem 0;
    }

    .love-separator .rotated-heart {
        transform: rotate(0deg) !important;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .action-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        align-items: center;
    }

    .footer-logo-box {
        justify-content: center;
    }
}
