/* ============================================
   HER CROWN ERA - Design System
   Regal, Warm, Empowering
   ============================================ */

:root {
    /* Colors - Warm & Regal */
    --gold: #D4A574;
    --gold-light: #E8C9A0;
    --gold-dark: #B8956A;
    --cream: #FDF8F3;
    --cream-dark: #F5EDE3;
    --charcoal: #1A1612;
    --charcoal-light: #2D2620;
    --rose: #C9A9A6;
    --rose-dark: #9E7B78;
    --text-primary: #1A1612;
    --text-secondary: #5D544C;
    --text-light: #8A7F75;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(26, 22, 18, 0.06);
    --shadow-md: 0 4px 20px rgba(26, 22, 18, 0.1);
    --shadow-lg: 0 8px 40px rgba(26, 22, 18, 0.15);
    --shadow-gold: 0 4px 30px rgba(212, 165, 116, 0.3);

    /* Typography */
    --font-display: 'Cormorant Garamond', serif;
    --font-body: 'DM Sans', sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 5rem;

    /* Transitions */
    --transition: all 0.3s ease;
}

/* ============================================
   Reset & Base
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--cream);
    min-height: 100vh;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Navigation
   ============================================ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(253, 248, 243, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(212, 165, 116, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-sm) var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.nav-logo .crown-icon {
    color: var(--gold);
    font-size: 1.3rem;
}

.nav-links {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    padding: var(--space-xs) var(--space-sm);
    border-radius: 6px;
}

.nav-links a:hover {
    color: var(--gold-dark);
    background: rgba(212, 165, 116, 0.1);
}

/* ============================================
   Sections
   ============================================ */

.section {
    min-height: 100vh;
    padding-top: 80px;
}

/* ============================================
   Hero / Landing
   ============================================ */

.landing-section {
    background: linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 100%);
}

.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-md);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
    min-height: calc(100vh - 80px);
}

.hero-tag {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold-dark);
    margin-bottom: var(--space-sm);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.gold-text {
    color: var(--gold);
    position: relative;
}

.gold-text::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg, var(--gold-light), transparent);
    z-index: -1;
    opacity: 0.5;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    max-width: 500px;
}

.hero-note {
    margin-top: var(--space-md);
    font-size: 0.9rem;
    color: var(--text-light);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.crown-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.crown-visual .glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(212, 165, 116, 0.3) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

.crown-visual .large-crown {
    font-size: 12rem;
    color: var(--gold);
    text-shadow: 0 10px 40px rgba(212, 165, 116, 0.4);
    animation: float 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.5; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 0.875rem 1.75rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: white;
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 35px rgba(212, 165, 116, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--gold);
}

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

.btn-large {
    padding: 1.1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
}

.btn .crown-icon {
    font-size: 1.1em;
}

/* ============================================
   Features
   ============================================ */

.features {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-md);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.feature {
    text-align: center;
    padding: var(--space-lg);
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
}

.feature h3 {
    font-size: 1.3rem;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

.feature p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ============================================
   Pricing
   ============================================ */

.pricing-section {
    padding: var(--space-2xl) var(--space-md);
    background: var(--charcoal);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--cream);
    margin-bottom: var(--space-xl);
}

.pricing-cards {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.pricing-card {
    background: var(--charcoal-light);
    border-radius: 24px;
    padding: var(--space-lg);
    text-align: center;
    position: relative;
    border: 1px solid rgba(212, 165, 116, 0.1);
}

.pricing-card h3 {
    color: var(--cream);
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
}

.pricing-card .price {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: var(--space-md);
}

.pricing-card .price span {
    font-size: 1rem;
    color: var(--text-light);
}

.pricing-features {
    list-style: none;
    text-align: left;
    margin-bottom: var(--space-lg);
}

.pricing-features li {
    padding: var(--space-xs) 0;
    color: var(--cream);
    font-size: 0.95rem;
}

.pricing-features li.disabled {
    color: var(--text-light);
    opacity: 0.5;
}

.pricing-card.featured {
    border: 2px solid var(--gold);
    box-shadow: var(--shadow-gold);
}

.featured-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ============================================
   Quiz
   ============================================ */

.quiz-section {
    background: linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz-container {
    max-width: 600px;
    width: 100%;
    padding: var(--space-lg);
}

.quiz-progress {
    margin-bottom: var(--space-xl);
}

.progress-bar {
    height: 6px;
    background: var(--cream-dark);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-dark));
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 20%;
}

.progress-text {
    display: block;
    text-align: center;
    margin-top: var(--space-sm);
    color: var(--text-light);
    font-size: 0.9rem;
}

.quiz-card {
    background: white;
    border-radius: 24px;
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
}

.quiz-question {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    text-align: center;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.quiz-option {
    padding: var(--space-md);
    background: var(--cream);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.quiz-option:hover {
    border-color: var(--gold-light);
}

.quiz-option.selected {
    border-color: var(--gold);
    background: rgba(212, 165, 116, 0.1);
}

.quiz-option h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.quiz-option p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.quiz-checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.quiz-checkbox {
    padding: var(--space-sm);
    background: var(--cream);
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-weight: 500;
}

.quiz-checkbox:hover {
    border-color: var(--gold-light);
}

.quiz-checkbox.selected {
    border-color: var(--gold);
    background: rgba(212, 165, 116, 0.15);
    color: var(--gold-dark);
}

.quiz-nav {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-lg);
    gap: var(--space-sm);
}

.quiz-nav .btn {
    flex: 1;
}

/* ============================================
   Results
   ============================================ */

.results-section {
    background: linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 100%);
    padding-bottom: var(--space-2xl);
}

.results-container {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-lg);
}

.results-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.results-header h1 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.affirmation-card {
    background: linear-gradient(135deg, var(--charcoal) 0%, var(--charcoal-light) 100%);
    border-radius: 20px;
    padding: var(--space-xl);
    text-align: center;
    margin-bottom: var(--space-xl);
}

.affirmation-card .crown-icon {
    font-size: 3rem;
    color: var(--gold);
    display: block;
    margin-bottom: var(--space-md);
}

.affirmation-card p {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-style: italic;
    color: var(--cream);
    line-height: 1.6;
}

.routine-section {
    background: white;
    border-radius: 20px;
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-sm);
}

.routine-section h3 {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.routine-step {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--cream-dark);
}

.routine-step:last-child {
    border-bottom: none;
}

.step-number {
    width: 36px;
    height: 36px;
    background: var(--gold);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.step-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.step-tag {
    display: inline-block;
    padding: 2px 10px;
    background: var(--cream);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 6px;
}

.upgrade-banner {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    border-radius: 20px;
    padding: var(--space-xl);
    text-align: center;
    color: white;
}

.upgrade-banner h3 {
    font-size: 1.8rem;
    margin-bottom: var(--space-sm);
}

.upgrade-banner p {
    margin-bottom: var(--space-md);
    opacity: 0.9;
}

.upgrade-banner .btn {
    background: white;
    color: var(--gold-dark);
}

.upgrade-banner .btn:hover {
    background: var(--cream);
}

.locked-section {
    background: white;
    border-radius: 20px;
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    position: relative;
    overflow: hidden;
}

.locked-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, white 80%);
    pointer-events: none;
}

.locked-overlay {
    position: absolute;
    bottom: var(--space-md);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    text-align: center;
}

.locked-overlay .lock-icon {
    font-size: 2rem;
    margin-bottom: var(--space-xs);
}

/* ============================================
   Auth
   ============================================ */

.auth-section {
    background: linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: var(--space-md);
}

.auth-card {
    background: white;
    border-radius: 24px;
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
}

.auth-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--cream-dark);
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--gold);
}

.auth-error {
    color: var(--rose-dark);
    font-size: 0.9rem;
    text-align: center;
    margin-top: var(--space-sm);
    min-height: 1.2em;
}

.auth-switch {
    text-align: center;
    margin-top: var(--space-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-switch a {
    color: var(--gold-dark);
    font-weight: 600;
}

/* ============================================
   Dashboard
   ============================================ */

.dashboard-section {
    background: var(--cream);
}

.dashboard-container {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-lg);
}

.dashboard-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.dashboard-header h1 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.dashboard-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.dashboard-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.dashboard-content {
    background: white;
    border-radius: 20px;
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
}

.dashboard-content h3 {
    font-size: 1.4rem;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.routine-history-item {
    padding: var(--space-md);
    border: 1px solid var(--cream-dark);
    border-radius: 12px;
    margin-bottom: var(--space-sm);
    cursor: pointer;
    transition: var(--transition);
}

.routine-history-item:hover {
    border-color: var(--gold-light);
}

.routine-history-item h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.routine-history-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.empty-state {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-light);
}

.empty-state .crown-icon {
    font-size: 3rem;
    color: var(--gold-light);
    display: block;
    margin-bottom: var(--space-sm);
}

/* ============================================
   Loading Spinner
   ============================================ */

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--cream-dark);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading p {
    margin-top: var(--space-md);
    color: var(--text-secondary);
    font-style: italic;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: var(--space-lg) var(--space-md);
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-visual {
        order: -1;
    }

    .crown-visual .large-crown {
        font-size: 8rem;
    }

    .nav-links {
        gap: var(--space-sm);
    }

    .nav-links a {
        padding: var(--space-xs);
        font-size: 0.85rem;
    }

    .quiz-checkbox-group {
        grid-template-columns: 1fr;
    }

    .pricing-cards {
        grid-template-columns: 1fr;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2rem;
    }

    .quiz-nav {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .nav-container {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .hero-title {
        font-size: 2rem;
    }

    .btn-large {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
}
