/* ============================================================
   MotherMoonAstrology.com — Cosmic Minimalism Design System
   ============================================================
   A dark, mystical, maternal aesthetic combining deep space
   indigo backgrounds with celestial gold accents, glassmorphism,
   and subtle glow effects. Built on top of Bootstrap 5.3.
   ============================================================ */

/* ── CSS Custom Properties (Design Tokens) ─────────────────── */
:root {
    /* Background Palette */
    --bg-deep:       #0B0914;
    --bg-mid:        #120E24;
    --bg-surface:    #1A1530;
    --bg-elevated:   #221C3D;
    --bg-card:       rgba(26, 21, 48, 0.7);
    --bg-card-hover: rgba(34, 28, 61, 0.85);

    /* Gold Accent Palette */
    --gold:          #D4AF37;
    --gold-light:    #E5C158;
    --gold-warm:     #C9982D;
    --gold-glow:     rgba(212, 175, 55, 0.25);
    --gold-glow-strong: rgba(212, 175, 55, 0.45);

    /* Text Palette */
    --text-primary:  #F4F3EF;
    --text-secondary:#D4D2CC;
    --text-muted:    #A3A0B8;
    --text-dim:      #6B6880;

    /* Functional Colors */
    --success:       #4ECDC4;
    --danger:        #FF6B6B;
    --info:          #89CFF0;
    --warning:       #FFD93D;

    /* Typography */
    --font-heading:  'Quicksand', 'Segoe UI', sans-serif;
    --font-body:     'Poppins', 'Noto Sans', sans-serif;

    /* Spacing & Sizing */
    --radius-sm:     8px;
    --radius-md:     12px;
    --radius-lg:     20px;
    --radius-xl:     28px;

    /* Transitions */
    --transition-fast:   0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-glow:   0.6s ease-in-out;

    /* Shadows */
    --shadow-sm:     0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md:     0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg:     0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-gold:   0 0 20px var(--gold-glow);
    --shadow-gold-strong: 0 0 40px var(--gold-glow-strong);

    /* Borders */
    --border-subtle: 1px solid rgba(163, 160, 184, 0.12);
    --border-gold:   1px solid rgba(212, 175, 55, 0.3);
}


/* ── Global Reset & Base ───────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.cosmic-body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--text-primary);
    background: var(--bg-deep);
    background: linear-gradient(170deg, var(--bg-deep) 0%, var(--bg-mid) 50%, var(--bg-deep) 100%);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.7;
    position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
    background: var(--gold-warm);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}


/* ── Star Field Background ─────────────────────────────────── */
.stars-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.star-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    background-repeat: repeat;
}

.star-layer-1 {
    background-image:
        radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.6) 0%, transparent 100%),
        radial-gradient(1px 1px at 30% 65%, rgba(255,255,255,0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 55% 15%, rgba(255,255,255,0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 70% 80%, rgba(255,255,255,0.5) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 85% 35%, rgba(212,175,55,0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 15% 85%, rgba(255,255,255,0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 45% 45%, rgba(255,255,255,0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 92% 60%, rgba(255,255,255,0.4) 0%, transparent 100%);
    animation: twinkle1 8s ease-in-out infinite alternate;
}

.star-layer-2 {
    background-image:
        radial-gradient(1px 1px at 25% 40%, rgba(255,255,255,0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 60% 30%, rgba(255,255,255,0.3) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 40% 75%, rgba(212,175,55,0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 80% 50%, rgba(255,255,255,0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 5% 55%, rgba(255,255,255,0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 50% 90%, rgba(255,255,255,0.3) 0%, transparent 100%);
    animation: twinkle2 12s ease-in-out infinite alternate;
}

.star-layer-3 {
    background-image:
        radial-gradient(2px 2px at 20% 50%, rgba(212,175,55,0.2) 0%, transparent 100%),
        radial-gradient(1px 1px at 75% 25%, rgba(255,255,255,0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 35% 10%, rgba(255,255,255,0.2) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 90% 85%, rgba(212,175,55,0.25) 0%, transparent 100%);
    animation: twinkle3 15s ease-in-out infinite alternate;
}

@keyframes twinkle1 {
    0%   { opacity: 0.6; }
    100% { opacity: 1; }
}
@keyframes twinkle2 {
    0%   { opacity: 0.8; }
    100% { opacity: 0.4; }
}
@keyframes twinkle3 {
    0%   { opacity: 0.4; }
    100% { opacity: 0.9; }
}


/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    letter-spacing: 0.02em;
}

h1, .h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2, .h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3, .h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4, .h4 { font-size: 1.3rem; }
h5, .h5 { font-size: 1.1rem; }
h6, .h6 { font-size: 0.95rem; }

p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

a {
    color: var(--gold-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover {
    color: var(--gold);
    text-decoration: none;
}

/* Golden gradient text utility */
.text-golden {
    background: linear-gradient(135deg, var(--gold-warm) 0%, var(--gold-light) 50%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-glow {
    text-shadow: 0 0 20px var(--gold-glow), 0 0 40px var(--gold-glow);
}

.text-muted-cosmic {
    color: var(--text-muted) !important;
}


/* ── Navigation ────────────────────────────────────────────── */
.cosmic-nav {
    background: rgba(11, 9, 20, 0.85) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: var(--border-subtle);
    padding: 0.8rem 0;
    transition: all var(--transition-smooth);
    z-index: 1050;
}

.cosmic-nav.scrolled {
    padding: 0.4rem 0;
    background: rgba(11, 9, 20, 0.95) !important;
    box-shadow: var(--shadow-md);
}

.cosmic-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none !important;
}

.brand-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 10px var(--gold-glow));
    animation: moonFloat 6s ease-in-out infinite;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.brand-tagline {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 0.7rem;
    color: var(--gold-light);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.cosmic-nav .nav-link {
    color: var(--text-muted) !important;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    position: relative;
}

.cosmic-nav .nav-link:hover,
.cosmic-nav .nav-link.active {
    color: var(--gold-light) !important;
}

.cosmic-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--gold);
    border-radius: 1px;
    box-shadow: 0 0 8px var(--gold-glow);
}

.cosmic-toggler {
    border-color: rgba(212, 175, 55, 0.3) !important;
}
.cosmic-toggler:focus {
    box-shadow: 0 0 0 0.2rem var(--gold-glow);
}

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


/* ── Main Content ──────────────────────────────────────────── */
.cosmic-main {
    position: relative;
    z-index: 1;
    padding-top: 80px; /* Account for fixed navbar */
    min-height: 70vh;
}


/* ── Buttons ───────────────────────────────────────────────── */
.btn-cosmic {
    background: linear-gradient(135deg, var(--gold-warm) 0%, var(--gold) 50%, var(--gold-light) 100%);
    color: var(--bg-deep) !important;
    font-family: var(--font-heading);
    font-weight: 700;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.6rem 1.6rem;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-gold);
    position: relative;
    overflow: hidden;
}

.btn-cosmic::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-cosmic:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold-strong);
    color: var(--bg-deep) !important;
}

.btn-cosmic:hover::before {
    left: 100%;
}

.btn-cosmic:active {
    transform: translateY(0);
}

.btn-cosmic-outline {
    background: transparent;
    color: var(--gold-light) !important;
    font-family: var(--font-heading);
    font-weight: 600;
    border: 2px solid var(--gold);
    border-radius: var(--radius-md);
    padding: 0.6rem 1.6rem;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    transition: all var(--transition-smooth);
}

.btn-cosmic-outline:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.btn-cosmic-lg {
    padding: 0.9rem 2.4rem;
    font-size: 1.05rem;
    border-radius: var(--radius-lg);
}


/* ── Cards (Glassmorphism) ─────────────────────────────────── */
.cosmic-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.cosmic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(212, 175, 55, 0.3),
        transparent
    );
}

.cosmic-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(212, 175, 55, 0.2);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-gold);
}

.cosmic-card-flat {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
}


/* ── Glow Border Utility ───────────────────────────────────── */
.glow-border {
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: inset 0 0 20px rgba(212, 175, 55, 0.05),
                0 0 15px rgba(212, 175, 55, 0.1);
}

.glow-border:hover {
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: inset 0 0 30px rgba(212, 175, 55, 0.08),
                0 0 25px rgba(212, 175, 55, 0.2);
}

/* Animated glow pulse */
.glow-pulse {
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(212, 175, 55, 0.15);
    }
    50% {
        box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
    }
}


/* ── Form Inputs ───────────────────────────────────────────── */
.cosmic-input {
    background: rgba(11, 9, 20, 0.6) !important;
    border: 1px solid rgba(163, 160, 184, 0.2) !important;
    border-radius: var(--radius-sm) !important;
    color: var(--text-primary) !important;
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 0.7rem 1rem;
    transition: all var(--transition-fast);
}

.cosmic-input::placeholder {
    color: var(--text-dim) !important;
}

.cosmic-input:focus {
    background: rgba(11, 9, 20, 0.8) !important;
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 3px var(--gold-glow) !important;
    outline: none;
}

.cosmic-input:hover {
    border-color: rgba(163, 160, 184, 0.35) !important;
}

/* Select inputs */
.cosmic-select {
    background: rgba(11, 9, 20, 0.6) !important;
    border: 1px solid rgba(163, 160, 184, 0.2) !important;
    border-radius: var(--radius-sm) !important;
    color: var(--text-primary) !important;
    font-family: var(--font-body);
    padding: 0.7rem 1rem;
    transition: all var(--transition-fast);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23A3A0B8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.8rem center !important;
    background-size: 12px !important;
    padding-right: 2.5rem !important;
}

.cosmic-select:focus {
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 3px var(--gold-glow) !important;
}

/* Labels */
.cosmic-label {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}


/* ── Badges ────────────────────────────────────────────────── */
.cosmic-badge {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold-light);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cosmic-badge-pill {
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    border: 1px solid rgba(163, 160, 184, 0.2);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cosmic-badge-pill:hover,
.cosmic-badge-pill.active {
    background: rgba(212, 175, 55, 0.12);
    color: var(--gold-light);
    border-color: rgba(212, 175, 55, 0.3);
}


/* ── Section Dividers ──────────────────────────────────────── */
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 3rem 0;
    opacity: 0.5;
}

.section-divider .divider-line {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.section-divider .divider-icon {
    color: var(--gold);
    font-size: 1.2rem;
}


/* ── Hero Section ──────────────────────────────────────────── */
.cosmic-hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 1rem 4rem;
    position: relative;
    overflow: hidden;
}

.cosmic-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-title {
    font-size: clamp(2.2rem, 6vw, 3.8rem);
    font-weight: 700;
    margin-bottom: 1.2rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 2.5rem;
    font-weight: 400;
    line-height: 1.8;
}

.hero-cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}


/* ── Section Headings ──────────────────────────────────────── */
.section-heading {
    text-align: center;
    margin-bottom: 3rem;
}

.section-heading h2 {
    margin-bottom: 0.8rem;
}

.section-heading p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.05rem;
}

.section-eyebrow {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
    display: block;
}


/* ── Service Cards (Homepage) ──────────────────────────────── */
.service-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: var(--radius-lg);
    margin-bottom: 1.2rem;
    transition: all var(--transition-smooth);
}

.cosmic-card:hover .service-icon {
    background: rgba(212, 175, 55, 0.15);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.2);
    transform: scale(1.05);
}

.service-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}


/* ── Step Flow (How It Works) ──────────────────────────────── */
.step-number {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--bg-deep);
    background: linear-gradient(135deg, var(--gold-warm), var(--gold-light));
    border-radius: 50%;
    margin: 0 auto 1rem;
    box-shadow: var(--shadow-gold);
}


/* ── Testimonial Cards ─────────────────────────────────────── */
.testimonial-card {
    background: var(--bg-card);
    border: var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 1.5rem;
    font-family: Georgia, serif;
    font-size: 5rem;
    color: rgba(212, 175, 55, 0.15);
    line-height: 1;
}

.testimonial-text {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
    line-height: 1.8;
}

.testimonial-author {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--gold-light);
    font-size: 0.9rem;
}

.testimonial-stars {
    color: var(--gold);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}


/* ── Blog Cards ────────────────────────────────────────────── */
.blog-card {
    background: var(--bg-card);
    border: var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-smooth);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg), var(--shadow-gold);
    border-color: rgba(212, 175, 55, 0.2);
}

.blog-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--bg-surface), var(--bg-elevated));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    opacity: 0.6;
}

.blog-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-meta {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.blog-card-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
    line-height: 1.4;
}

.blog-card-title a {
    color: var(--text-primary);
    transition: color var(--transition-fast);
}
.blog-card-title a:hover {
    color: var(--gold-light);
}

.blog-card-excerpt {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    flex: 1;
}


/* ── Blog Post (Single) ───────────────────────────────────── */
.post-article {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

.post-article h1 {
    margin-bottom: 1rem;
}

.post-article h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--gold-light);
}

.post-article h3 {
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}

.post-article p {
    font-size: 1.05rem;
    line-height: 1.9;
    margin-bottom: 1.2rem;
}

.post-article em {
    color: var(--gold-light);
    font-style: italic;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.reading-time {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--gold);
}


/* ── Chat Interface ────────────────────────────────────────── */
.chat-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem 0 2rem;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 160px);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: rgba(11, 9, 20, 0.4);
    border-radius: var(--radius-lg);
    border: var(--border-subtle);
    margin-bottom: 1rem;
    scroll-behavior: smooth;
}

.chat-message {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
    animation: messageSlide 0.3s ease-out;
}

.chat-message.user-message {
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.chat-avatar.moon-avatar {
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.chat-avatar.user-avatar {
    background: rgba(137, 207, 240, 0.15);
    border: 1px solid rgba(137, 207, 240, 0.3);
}

.chat-bubble {
    max-width: 75%;
    padding: 1rem 1.3rem;
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    line-height: 1.7;
}

.moon-message .chat-bubble {
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.15);
    color: var(--text-secondary);
    border-bottom-left-radius: 4px;
}

.user-message .chat-bubble {
    background: rgba(137, 207, 240, 0.08);
    border: 1px solid rgba(137, 207, 240, 0.15);
    color: var(--text-secondary);
    border-bottom-right-radius: 4px;
}

.chat-input-area {
    display: flex;
    gap: 0.6rem;
}

.chat-input-area .cosmic-input {
    flex: 1;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 0.5rem 0;
    align-items: center;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    opacity: 0.4;
    animation: typingBounce 1.4s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

@keyframes messageSlide {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Chat message counter */
.chat-counter {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-dim);
    padding: 0.5rem;
}

.chat-counter .count-highlight {
    color: var(--gold);
    font-weight: 600;
}


/* ── Tools Page ────────────────────────────────────────────── */
.tools-form-container {
    max-width: 600px;
    margin: 0 auto 3rem;
}

.tools-results {
    display: none;
}

.tools-results.visible {
    display: block;
    animation: fadeInUp 0.6s ease-out;
}

.chart-display {
    text-align: center;
    margin-bottom: 2rem;
}

.chart-display svg {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.1));
}

/* Planetary placement rows */
.planet-row {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    border-bottom: var(--border-subtle);
    transition: background var(--transition-fast);
}

.planet-row:hover {
    background: rgba(212, 175, 55, 0.04);
}

.planet-row:last-child {
    border-bottom: none;
}

.planet-symbol {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: rgba(212, 175, 55, 0.08);
    border-radius: 50%;
    margin-right: 1rem;
    flex-shrink: 0;
}

.planet-name {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    min-width: 90px;
}

.planet-sign {
    color: var(--gold-light);
    font-weight: 500;
    min-width: 100px;
}

.planet-degree {
    color: var(--text-muted);
    font-size: 0.85rem;
    min-width: 80px;
}

.planet-retro {
    color: var(--danger);
    font-size: 0.8rem;
    font-weight: 600;
}

/* Insight cards */
.insight-card {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05), rgba(212, 175, 55, 0.02));
    border: 1px solid rgba(212, 175, 55, 0.12);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.2rem;
}

.insight-card .insight-title {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--gold-light);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.insight-card .insight-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 0;
}

/* City autocomplete dropdown */
.city-autocomplete {
    position: relative;
}

.city-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border: 1px solid rgba(163, 160, 184, 0.2);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.city-dropdown.visible {
    display: block;
}

.city-option {
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: background var(--transition-fast);
    border-bottom: 1px solid rgba(163, 160, 184, 0.06);
}

.city-option:hover,
.city-option.highlighted {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold-light);
}

.city-option .city-country {
    color: var(--text-dim);
    font-size: 0.8rem;
    margin-left: 0.4rem;
}


/* ── Loading Spinner (Moon Phase) ──────────────────────────── */
.moon-loader {
    display: none;
    text-align: center;
    padding: 3rem;
}

.moon-loader.visible {
    display: block;
}

.moon-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-warm), transparent 50%);
    animation: moonSpin 1.5s linear infinite;
    position: relative;
}

.moon-spinner::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border-radius: 50%;
    background: var(--bg-deep);
}

.moon-loader-text {
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.95rem;
}

@keyframes moonSpin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* ── Footer ────────────────────────────────────────────────── */
.cosmic-footer {
    background: rgba(11, 9, 20, 0.9);
    border-top: var(--border-subtle);
    position: relative;
    z-index: 1;
}

.footer-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem 0 0;
}

.footer-divider .divider-line {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.4), transparent);
}

.footer-divider .divider-star {
    color: var(--gold);
    font-size: 0.8rem;
    opacity: 0.6;
}

.footer-divider .divider-moon {
    font-size: 1.2rem;
    filter: drop-shadow(0 0 8px var(--gold-glow));
}

.footer-heading {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.05rem;
    margin-bottom: 1.2rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
}

.footer-links a:hover {
    color: var(--gold-light);
    transform: translateX(4px);
}

.footer-about {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-social {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
}

.social-link {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(163, 160, 184, 0.08);
    border: 1px solid rgba(163, 160, 184, 0.15);
    color: var(--text-muted);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.3);
    color: var(--gold);
    transform: translateY(-2px);
}

/* Newsletter form */
.newsletter-form .input-group {
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.newsletter-feedback {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    min-height: 1.2rem;
}

.newsletter-feedback.success {
    color: var(--success);
}

.newsletter-feedback.error {
    color: var(--danger);
}

/* Footer bottom bar */
.footer-bottom {
    border-top: var(--border-subtle);
    padding: 1.5rem 0;
}

.footer-copyright {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin: 0;
}

.footer-tagline {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin: 0;
}

.tagline-icon {
    margin-right: 0.3rem;
}


/* ── Pagination ────────────────────────────────────────────── */
.cosmic-pagination .page-link {
    background: rgba(26, 21, 48, 0.5);
    border: 1px solid rgba(163, 160, 184, 0.15);
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 0.5rem 0.9rem;
    transition: all var(--transition-fast);
}

.cosmic-pagination .page-link:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.3);
    color: var(--gold-light);
}

.cosmic-pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--gold-warm), var(--gold));
    border-color: var(--gold);
    color: var(--bg-deep);
}

.cosmic-pagination .page-item.disabled .page-link {
    background: rgba(11, 9, 20, 0.3);
    border-color: rgba(163, 160, 184, 0.08);
    color: var(--text-dim);
}


/* ── Scroll Animations ─────────────────────────────────────── */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

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


/* ── Upgrade Modal Overlay ─────────────────────────────────── */
.upgrade-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 9, 20, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.upgrade-overlay.visible {
    display: flex;
    animation: fadeIn 0.4s ease;
}

.upgrade-card {
    background: var(--bg-surface);
    border: var(--border-gold);
    border-radius: var(--radius-xl);
    padding: 3rem;
    max-width: 480px;
    text-align: center;
    box-shadow: var(--shadow-gold-strong);
    animation: fadeInUp 0.5s ease;
}

.upgrade-card .upgrade-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}


/* ── Social Share Buttons ──────────────────────────────────── */
.share-buttons {
    display: flex;
    gap: 0.6rem;
    margin-top: 2rem;
}

.share-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(163, 160, 184, 0.08);
    border: 1px solid rgba(163, 160, 184, 0.15);
    color: var(--text-muted);
    font-size: 1rem;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.share-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.3);
    color: var(--gold);
    transform: translateY(-2px);
}


/* ── Breadcrumb ────────────────────────────────────────────── */
.cosmic-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 1.5rem;
}

.cosmic-breadcrumb a {
    color: var(--text-muted);
}

.cosmic-breadcrumb a:hover {
    color: var(--gold-light);
}

.cosmic-breadcrumb .separator {
    color: var(--text-dim);
}


/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .cosmic-nav .navbar-collapse {
        background: rgba(11, 9, 20, 0.95);
        padding: 1rem;
        border-radius: var(--radius-md);
        margin-top: 0.5rem;
        border: var(--border-subtle);
    }

    .cosmic-nav .nav-link.active::after {
        display: none;
    }

    .cosmic-hero {
        min-height: 80vh;
        padding-top: 5rem;
    }
}

@media (max-width: 767.98px) {
    .cosmic-card {
        padding: 1.5rem;
    }

    .cosmic-hero {
        min-height: 70vh;
    }

    .hero-cta-group {
        flex-direction: column;
        align-items: center;
    }

    .chat-container {
        height: calc(100vh - 140px);
    }

    .chat-bubble {
        max-width: 85%;
    }

    .planet-row {
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .footer-bottom .row > div {
        text-align: center !important;
    }
}

@media (max-width: 575.98px) {
    .cosmic-main {
        padding-top: 70px;
    }

    h1, .h1 {
        font-size: 1.8rem;
    }

    .cosmic-card {
        padding: 1.2rem;
    }
}
