/* ===== CSS Variables - Warm Coral/Orange Theme ===== */
:root {
    --primary: #FF6B6B;
    --primary-dark: #EE5A5A;
    --primary-light: #FF8A8A;
    --secondary: #4ECDC4;
    --secondary-dark: #45B7AF;
    --accent: #FFE66D;
    --success: #2ECC71;
    --success-dark: #27AE60;
    
    --bg-dark: #1A1A2E;
    --bg-darker: #0F0F1A;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    
    --text-white: #FFFFFF;
    --text-light: rgba(255, 255, 255, 0.85);
    --text-muted: rgba(255, 255, 255, 0.5);
    
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(255, 107, 107, 0.5);
    
    --shadow-glow: 0 20px 60px rgba(255, 107, 107, 0.25);
    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.4);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-darker);
    min-height: 100vh;
    color: var(--text-white);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===== Animated Background ===== */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(255, 107, 107, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(78, 205, 196, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 230, 109, 0.05) 0%, transparent 70%);
    animation: gradientPulse 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes gradientPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* ===== Floating Hearts ===== */
.floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.heart {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.2;
    animation: floatHeart 20s linear infinite;
}

.heart:nth-child(1) { left: 10%; animation-delay: 0s; font-size: 1.2rem; }
.heart:nth-child(2) { left: 25%; animation-delay: 3s; font-size: 1.8rem; }
.heart:nth-child(3) { left: 45%; animation-delay: 6s; font-size: 1rem; }
.heart:nth-child(4) { left: 65%; animation-delay: 9s; font-size: 2rem; }
.heart:nth-child(5) { left: 80%; animation-delay: 12s; font-size: 1.4rem; }
.heart:nth-child(6) { left: 90%; animation-delay: 15s; font-size: 1.6rem; }

@keyframes floatHeart {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 0.3; }
    90% { opacity: 0.3; }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* ===== App Container ===== */
.app-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

/* ===== Header ===== */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0 20px;
}

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

.logo-icon {
    font-size: 1.8rem;
    animation: flame 1s ease-in-out infinite;
}

@keyframes flame {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1) rotate(-5deg); }
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.online-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
    padding: 8px 14px;
    border-radius: 50px;
    border: 1px solid var(--border-subtle);
    font-size: 0.85rem;
    color: var(--text-light);
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: livePulse 1.5s ease infinite;
}

@keyframes livePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.4); }
    50% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(46, 204, 113, 0); }
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px 0;
}

/* ===== Steps ===== */
.step {
    display: none;
    animation: stepFadeIn 0.5s ease;
}

.step.active {
    display: flex;
    flex-direction: column;
    align-items: center;
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== Step 1: Profile Stack ===== */
.profile-stack {
    position: relative;
    width: 280px;
    height: 340px;
    margin-bottom: 30px;
}

.profile-card {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.profile-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-card.card-3 {
    transform: scale(0.85) translateY(-30px);
    filter: blur(2px) brightness(0.6);
    z-index: 1;
}

.profile-card.card-2 {
    transform: scale(0.92) translateY(-15px);
    filter: blur(1px) brightness(0.8);
    z-index: 2;
}

.profile-card.card-1 {
    transform: scale(1);
    z-index: 3;
    animation: cardFloat 3s ease-in-out infinite;
}

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

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 25px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.profile-info h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-info p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ===== Step Content ===== */
.step-content {
    text-align: center;
    max-width: 320px;
}

.main-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
}

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

.main-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 25px;
}

/* ===== CTA Button ===== */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 40px;
    border: none;
    border-radius: 60px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-transform: none;
}

.cta-button.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-glow);
}

.cta-button.primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 25px 70px rgba(255, 107, 107, 0.35);
}

.cta-button.success {
    background: linear-gradient(135deg, var(--success), var(--success-dark));
    color: white;
    width: 100%;
    font-size: 1.15rem;
    padding: 20px;
}

.cta-button.glow {
    animation: buttonGlow 2s ease-in-out infinite;
}

@keyframes buttonGlow {
    0%, 100% { box-shadow: 0 10px 40px rgba(46, 204, 113, 0.3); }
    50% { box-shadow: 0 15px 50px rgba(46, 204, 113, 0.5); }
}

.cta-button svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.cta-button:hover svg {
    transform: translateX(5px);
}

.fire-icon {
    font-size: 1.3rem;
    animation: flame 1s ease-in-out infinite;
}

/* ===== Question Badge ===== */
.question-badge {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--primary-light);
    font-weight: 600;
    margin-bottom: 20px;
}

.question-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
}

.question-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 30px;
}

/* ===== Choice Cards ===== */
.choice-container {
    display: flex;
    gap: 15px;
    width: 100%;
    max-width: 320px;
}

.choice-card {
    flex: 1;
    background: var(--bg-card);
    border: 2px solid var(--border-subtle);
    border-radius: 20px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.choice-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateY(-5px);
}

.choice-card.selected {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.15), rgba(255, 107, 107, 0.05));
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(255, 107, 107, 0.2);
}

.choice-icon {
    font-size: 3rem;
}

.choice-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-white);
}

.choice-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    opacity: 0;
    transform: scale(0);
    transition: var(--transition);
}

.choice-card.selected .choice-check {
    opacity: 1;
    transform: scale(1);
}

/* ===== Age Grid ===== */
.age-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 320px;
}

.age-option {
    background: var(--bg-card);
    border: 2px solid var(--border-subtle);
    border-radius: 16px;
    padding: 20px 15px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-white);
    cursor: pointer;
    transition: var(--transition);
}

.age-option:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: scale(1.05);
}

.age-option.selected {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: var(--primary);
    color: white;
}

/* ===== Goal Options ===== */
.goal-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 320px;
}

.goal-card {
    background: var(--bg-card);
    border: 2px solid var(--border-subtle);
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.goal-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--secondary);
    transform: translateX(5px);
}

.goal-card.selected {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.15), rgba(78, 205, 196, 0.05));
    border-color: var(--secondary);
}

.goal-emoji {
    font-size: 1.8rem;
}

.goal-text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-white);
}

/* ===== Success Animation ===== */
.success-animation {
    margin-bottom: 25px;
}

.success-circle {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--success), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successBounce 0.8s ease, successPulse 2s ease-in-out infinite 0.8s;
}

@keyframes successBounce {
    0% { transform: scale(0); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes successPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.4); }
    50% { box-shadow: 0 0 0 20px rgba(46, 204, 113, 0); }
}

.success-icon {
    font-size: 3rem;
}

.result-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
}

.result-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 25px;
}

.result-subtitle strong {
    color: var(--success);
}

/* ===== Matches Carousel ===== */
.matches-carousel {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.match-card {
    width: 80px;
    text-align: center;
    animation: matchPopIn 0.5s ease backwards;
}

.match-card:nth-child(1) { animation-delay: 0.1s; }
.match-card:nth-child(2) { animation-delay: 0.2s; }
.match-card:nth-child(3) { animation-delay: 0.3s; }
.match-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes matchPopIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.match-card img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg-dark);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.match-card:hover img {
    transform: scale(1.1);
    border-color: var(--primary);
}

.match-info {
    margin-top: 8px;
}

.match-name {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-white);
}

.match-status {
    display: block;
    font-size: 0.7rem;
    color: var(--success);
}

.match-card.more {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.match-card.more .more-count {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: white;
}

.match-card.more .more-text {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== Urgency Alert ===== */
.urgency-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 320px;
}

.alert-icon {
    font-size: 1.5rem;
    animation: flash 1.5s ease infinite;
}

@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.alert-text {
    font-size: 0.9rem;
    color: var(--text-light);
}

.alert-text strong {
    color: var(--primary);
}

/* ===== Trust Text ===== */
.trust-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.shield {
    font-size: 1rem;
}

/* ===== Progress Indicator ===== */
.progress-indicator {
    padding: 20px 0;
}

.progress-track {
    height: 4px;
    background: var(--border-subtle);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
    width: 16.66%;
    transition: width 0.5s ease;
}

.progress-dots {
    display: flex;
    justify-content: space-between;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-subtle);
    transition: var(--transition);
}

.dot.active {
    background: var(--primary);
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.dot.completed {
    background: var(--success);
}

/* ===== Footer ===== */
.app-footer {
    text-align: center;
    padding: 15px 0;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ===== Responsive ===== */
@media (max-width: 420px) {
    .app-container {
        padding: 15px;
    }

    .profile-stack {
        width: 250px;
        height: 300px;
    }

    .main-title {
        font-size: 1.65rem;
    }

    .question-title {
        font-size: 1.5rem;
    }

    .choice-container {
        max-width: 280px;
    }

    .choice-card {
        padding: 25px 15px;
    }

    .choice-icon {
        font-size: 2.5rem;
    }

    .age-grid {
        max-width: 280px;
    }

    .age-option {
        padding: 15px 10px;
        font-size: 0.9rem;
    }

    .goal-options,
    .urgency-alert {
        max-width: 280px;
    }

    .cta-button {
        padding: 16px 35px;
        font-size: 1rem;
    }
}
