:root {
    /* Color Palette - Modern, Trust, Fresh */
    --primary-color: #4F46E5; /* Indigo */
    --primary-hover: #4338CA;
    --secondary-color: #EC4899; /* Pink */
    
    --bg-gradient-1: #e0c3fc;
    --bg-gradient-2: #8ec5fc;
    
    --text-main: #1E293B;
    --text-muted: #64748B;
    --text-light: #FFFFFF;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Transitions & Radii */
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* Background Blobs for Animation */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 10s infinite alternate ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: #ff9a9e;
    animation-delay: 0s;
}

.blob-2 {
    bottom: 10%;
    right: -5%;
    width: 400px;
    height: 400px;
    background: #fecfef;
    animation-delay: 2s;
}

.blob-3 {
    top: 40%;
    left: 50%;
    width: 250px;
    height: 250px;
    background: #a18cd1;
    animation-delay: 4s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hidden {
    display: none !important;
}

/* Header */
.app-header {
    padding: 24px 0;
}

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

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--secondary-color);
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    margin-left: 20px;
    font-size: 0.95rem;
    transition: var(--transition);
}

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

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

.dropbtn {
    background: none;
    border: none;
    font-family: var(--font-heading);
    color: var(--text-main);
    font-size: 1rem;
    cursor: pointer;
    font-weight: 500;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: rgba(255, 255, 255, 0.95);
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 100;
    border-radius: var(--radius-sm);
    top: 100%;
    right: 0;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.dropdown-content a {
    color: var(--text-main);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-size: 0.9rem;
    font-weight: 500;
    margin-left: 0;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: rgba(244, 114, 182, 0.1);
    color: var(--primary-color);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
}

/* Main Content */
.main-content {
    padding: 20px 0 80px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
}

/* Form Section */
.hero-section {
    width: 100%;
    max-width: 500px;
    animation: slideUp 0.6s ease-out forwards;
}

.form-header {
    text-align: center;
    margin-bottom: 24px;
}

.form-header h2, .main-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.25;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.keyword-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 14px;
    margin-top: 4px;
}

.badge-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-main);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: var(--transition);
    box-shadow: 0 2px 6px rgba(31, 38, 135, 0.04);
}

.badge-item:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.15);
}

.badge-icon {
    width: 12px;
    height: 12px;
    color: var(--primary-color);
    transition: var(--transition);
}

.badge-item:hover .badge-icon {
    color: var(--secondary-color);
    transform: scale(1.1);
}

.form-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-top: 4px;
}

.form-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

#dob-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 600;
    font-size: 0.95rem;
}

.required { color: #ef4444; }
.optional { color: var(--text-muted); font-weight: 400; font-size: 0.85rem; }

input[type="date"], select {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.5);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-main);
    transition: var(--transition);
    outline: none;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234F46E5' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px 16px;
    padding-right: 40px !important;
    cursor: pointer;
}

select::-ms-expand {
    display: none; /* Hide standard arrow in older IE/Edge */
}

/* Side-by-side select controls layout */
.dob-select-group {
    display: flex;
    gap: 12px;
    width: 100%;
}

.dob-select-group select {
    flex: 1;
    min-width: 0;
}

input[type="date"] {
    position: relative;
    cursor: pointer;
    /* Custom calendar icon to replace browser default variations and ensure high-premium visual design */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234F46E5' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px 20px;
    padding-right: 48px;
}

/* Make sure the native calendar picker indicator spans the whole input for easy clicking in Safari & Chrome */
input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    -webkit-appearance: none;
}

input[type="date"]:focus, select:focus {
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px;
    border-radius: var(--radius-md);
    border: none;
    background: var(--primary-color);
    color: white;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
}

/* Result Section */
.result-section {
    width: 100%;
    max-width: 800px;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    border-radius: 20px;
    color: var(--text-main);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 24px;
}

.btn-back:hover {
    background: white;
}

.result-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-box {
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.result-box h3 {
    font-family: var(--font-heading);
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Age Box */
.age-box.highlight {
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.age-numbers {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.number-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.number-block .counter {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}

.number-block .label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Countdown Box */
.bday-countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.counter-large {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    color: var(--secondary-color);
    line-height: 1;
}

.next-bday-box .label {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
    margin-top: 8px;
}

.sub-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Small Boxes */
.result-row {
    display: flex;
    gap: 20px;
}

.small-box {
    flex: 1;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
}

.text-value {
    color: #10B981; /* Emerald */
}

/* Affiliate Section */
.affiliate-section {
    width: 100%;
    max-width: 1000px;
    margin-top: 20px;
}

.section-title {
    text-align: center;
    margin-bottom: 32px;
}

.section-title h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-main);
}

.section-title p {
    color: var(--text-muted);
}

.recommendation-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

/* Personal Advice Letter Style for Affiliate Boxes */
.affiliate-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
    border-top: 4px solid var(--secondary-color);
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.affiliate-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(236, 72, 153, 0.15);
    border-top-color: var(--primary-color);
}

.affiliate-disclaimer {
    font-size: 0.85rem;
    color: #64748B;
    font-style: italic;
    text-align: center;
    margin-top: 24px;
    padding: 0 20px;
    line-height: 1.6;
}

/* Emotional Reflection Box */
.emotional-reflection-box {
    position: relative;
    margin-top: 32px;
    padding: 32px 36px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.04) 0%, rgba(236, 72, 153, 0.05) 50%, rgba(79, 70, 229, 0.04) 100%);
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    background-clip: padding-box;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.emotional-reflection-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-md);
    padding: 2px;
    background: linear-gradient(135deg, #FFD700, var(--secondary-color), var(--primary-color));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    transition: opacity 0.4s ease;
}

.emotional-reflection-box:hover::before {
    opacity: 0.9;
}

.emotional-reflection-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(255, 215, 0, 0.15), 0 8px 25px rgba(236, 72, 153, 0.15);
}

.reflection-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    position: relative;
}

.reflection-icon > svg:first-child {
    fill: #FFD700;
    stroke: #FFA500;
    filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.5));
    animation: starRotate 4s ease-in-out infinite;
    z-index: 2;
}

.sparkle {
    position: absolute;
    fill: #FFD700;
    filter: drop-shadow(0 2px 6px rgba(255, 215, 0, 0.6));
}

.sparkle-1 {
    top: -8px;
    right: 20px;
    animation: sparkleFloat 2.5s ease-in-out infinite;
}

.sparkle-2 {
    bottom: -4px;
    left: 24px;
    animation: sparkleFloat 3s ease-in-out infinite 0.5s;
}

@keyframes starRotate {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(-5deg) scale(1.05);
    }
    75% {
        transform: rotate(5deg) scale(1.05);
    }
}

@keyframes sparkleFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-8px) scale(1.15);
        opacity: 1;
    }
}

.reflection-text-main {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    color: #1E293B;
    margin: 0 0 12px 0;
    position: relative;
    z-index: 1;
    letter-spacing: -0.3px;
}

.reflection-text-sub {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.7;
    text-align: center;
    color: #475569;
    margin: 0;
    position: relative;
    z-index: 1;
}

.reflection-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.12) 0%, rgba(236, 72, 153, 0.08) 50%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: celebrationGlow 5s ease-in-out infinite;
    z-index: 0;
}

@keyframes celebrationGlow {
    0%, 100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.15);
    }
}

.advice-header h4 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    line-height: 1.3;
}

.advice-content {
    position: relative;
    padding: 10px 20px;
    background: rgba(241, 245, 249, 0.6);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--secondary-color);
}

.advice-content p {
    color: #475569;
    font-size: 1.05rem;
    line-height: 1.7;
    font-style: italic;
    font-weight: 500;
    margin: 0;
}

.advice-content p::before {
    content: '"';
    font-family: Georgia, serif;
    font-size: 2rem;
    color: var(--secondary-color);
    position: absolute;
    top: -5px;
    left: 5px;
    opacity: 0.5;
}

.advice-content p::after {
    content: '"';
    font-family: Georgia, serif;
    font-size: 2rem;
    color: var(--secondary-color);
    position: absolute;
    bottom: -15px;
    right: 10px;
    opacity: 0.5;
}

.image-link {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: var(--radius-sm);
    width: 100%;
    height: 200px;
    background-color: #ffffff; /* pure white background for Amazon product frames */
    padding: 12px; /* safety padding to keep product photos away from borders */
    border: 1px solid rgba(0, 0, 0, 0.05); /* very soft borders to highlight product bounds */
}

.product-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* fits the entire product image without zoom/crop */
    border-radius: var(--radius-sm);
    transition: transform 0.3s ease;
}

.affiliate-card:hover .product-image {
    transform: scale(1.05); /* elegant focus zoom */
}

.btn-cta {
    display: inline-block;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    font-weight: 700;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: auto;
    box-shadow: 0 4px 10px rgba(236, 72, 153, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(236, 72, 153, 0.5);
}

.btn-cta::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -50%; }
    100% { left: 150%; }
}

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

/* SEO & FAQ Section */
.seo-section {
    width: 100%;
    max-width: 1000px;
    margin-top: 40px;
}

.text-content {
    padding: 40px;
}

.text-content h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--text-main);
    margin-bottom: 16px;
    margin-top: 32px;
}

.text-content h2:first-child {
    margin-top: 0;
}

.text-content p {
    color: #475569;
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.text-content ul, .text-content ol {
    margin-bottom: 24px;
    padding-left: 24px;
    color: #475569;
    line-height: 1.7;
}

.text-content li {
    margin-bottom: 8px;
}

.text-content li strong {
    color: var(--text-main);
}

.faq-container {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.05);
}

/* Accordion Details/Summary Style */
.faq-item details {
    width: 100%;
}

.faq-item summary {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary-color);
    padding: 20px;
    cursor: pointer;
    list-style: none; /* Hide standard arrow in Chrome/Firefox */
    display: flex;
    justify-content: space-between;
    align-items: center;
    outline: none;
    user-select: none;
}

/* Hide standard arrow in Safari */
.faq-item summary::-webkit-details-marker {
    display: none;
}

/* Custom interactive +/- symbol */
.faq-item summary::after {
    content: "+";
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--primary-color);
    transition: transform 0.3s ease;
    line-height: 1;
}

.faq-item details[open] summary::after {
    content: "−";
    color: var(--secondary-color);
}

.faq-item details[open] summary {
    color: var(--secondary-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.faq-content {
    padding: 20px;
    background: rgba(255, 255, 255, 0.25);
    color: #475569;
    font-size: 1rem;
    line-height: 1.7;
    animation: faqSlideDown 0.3s ease-out forwards;
}

@keyframes faqSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
.app-footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.3);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

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

.admin-link {
    color: #94a3b8 !important;
}

.app-footer p {
    color: #94a3b8;
    font-size: 0.85rem;
}

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

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive */
@media (min-width: 768px) {
    .recommendation-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .age-numbers {
        gap: 40px;
    }
}

@media (min-width: 1024px) {
    .recommendation-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .main-content {
        justify-content: center;
        min-height: calc(100vh - 200px);
    }
}

@media (max-width: 480px) {
    .result-row {
        flex-direction: column;
    }
    .age-numbers {
        gap: 10px;
    }
    .number-block .counter {
        font-size: 2.5rem;
    }
}

/* --- Admin & Button Extras --- */
.admin-tabs {
    display: flex;
    gap: 12px;
}

.admin-tabs button {
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.btn-sm:hover {
    background: var(--primary-hover);
}

.btn-sm.delete {
    background: #ef4444;
}

.btn-sm.delete:hover {
    background: #dc2626;
}

.scenario-actions {
    display: flex;
    gap: 8px;
}

.scenario-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.scenario-info h4 {
    margin-bottom: 4px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

.badge {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Tab Buttons */
.calculator-tabs .tab-btn {
    border: none;
    background: transparent;
    padding: 12px 20px;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.calculator-tabs .tab-btn.active {
    background: rgba(255, 255, 255, 0.7);
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Memorial card layout (No image, quote and link button only) */
.affiliate-card.memorial-card {
    border-top-color: #94A3B8; /* soft slate border for respectfulness */
    background: linear-gradient(135deg, #ffffff 0%, #F8FAFC 100%);
    box-shadow: 0 10px 25px rgba(148, 163, 184, 0.05);
    padding: 28px;
}

.affiliate-card.memorial-card:hover {
    border-top-color: var(--primary-color);
    box-shadow: 0 15px 30px rgba(79, 70, 229, 0.08);
}

.affiliate-card.memorial-card .advice-content {
    background: rgba(248, 250, 252, 0.8);
    border-left-color: #94A3B8;
}

.affiliate-card.memorial-card .btn-cta {
    background: linear-gradient(135deg, #475569, #64748B);
    box-shadow: 0 4px 10px rgba(71, 85, 105, 0.15);
}

.affiliate-card.memorial-card .btn-cta:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 6px 15px rgba(236, 72, 153, 0.3);
}
