/* ==========================================================================
   Burç Bugün — Midnight Observatory & Celestial Gold Design System
   ========================================================================== */

:root {
    --bg-void: #070914;
    --bg-deep: #0c1022;
    --bg-surface: rgba(16, 20, 42, 0.72);
    --bg-surface-hover: rgba(22, 27, 56, 0.88);
    --bg-elevated: rgba(24, 30, 62, 0.85);

    --border-subtle: rgba(232, 197, 116, 0.14);
    --border-hover: rgba(232, 197, 116, 0.42);
    --border-muted: rgba(148, 163, 184, 0.14);

    --gold-primary: #e8c574;
    --gold-bright: #f6dfa4;
    --gold-dim: #b89447;
    --violet-soft: #a78bfa;

    --text-primary: #f4f1ea;
    --text-secondary: #cbd5e1;
    --text-muted: #8f9bb3;

    /* Element accents */
    --fire-color: #fb7185;
    --fire-bg: rgba(251, 113, 133, 0.12);
    --fire-border: rgba(251, 113, 133, 0.28);

    --earth-color: #34d399;
    --earth-bg: rgba(52, 211, 153, 0.12);
    --earth-border: rgba(52, 211, 153, 0.28);

    --air-color: #7dd3fc;
    --air-bg: rgba(125, 211, 252, 0.12);
    --air-border: rgba(125, 211, 252, 0.28);

    --water-color: #c084fc;
    --water-bg: rgba(192, 132, 252, 0.12);
    --water-border: rgba(192, 132, 252, 0.28);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-void);
    background-image:
        radial-gradient(ellipse 80% 55% at 18% -10%, rgba(124, 58, 237, 0.18), transparent 60%),
        radial-gradient(ellipse 70% 45% at 85% 5%, rgba(232, 197, 116, 0.11), transparent 55%),
        radial-gradient(ellipse 65% 50% at 50% 100%, rgba(30, 41, 96, 0.35), transparent 70%),
        linear-gradient(180deg, #070914 0%, #0b0f22 48%, #090c1a 100%);
    background-attachment: fixed;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Editorial serif headings */
.font-editorial,
h1, h2 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    letter-spacing: -0.01em;
}

/* Starfield canvas */
#starfield-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -10;
    pointer-events: none;
    display: block;
}

/* Subtle gold headline glow */
.text-gold-gradient {
    background: linear-gradient(135deg, #fff6de 0%, #e8c574 48%, #c99b44 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.text-glow {
    text-shadow: 0 0 28px rgba(232, 197, 116, 0.24);
}

/* Celestial glass card (replaces legacy .glassmorphism with refined look) */
.celestial-card,
.glassmorphism {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: 1.125rem;
    box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.28s ease,
                box-shadow 0.28s ease,
                background-color 0.28s ease;
}

.celestial-card-interactive:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-hover);
    box-shadow: 0 20px 44px -16px rgba(0, 0, 0, 0.72), 0 0 26px -6px rgba(232, 197, 116, 0.18), inset 0 1px 0 rgba(246, 223, 164, 0.14);
    transform: translateY(-4px);
}

/* Gold callout card for daily advice */
.advice-callout {
    background: linear-gradient(135deg, rgba(232, 197, 116, 0.11) 0%, rgba(22, 26, 52, 0.85) 60%, rgba(167, 139, 250, 0.08) 100%);
    border: 1px solid rgba(232, 197, 116, 0.35);
    border-radius: 1.125rem;
    box-shadow: 0 14px 36px -14px rgba(0, 0, 0, 0.6), 0 0 24px -10px rgba(232, 197, 116, 0.2);
}

/* Navigation bar */
.main-navbar {
    background: rgba(7, 9, 20, 0.78);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(232, 197, 116, 0.14);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-nav-link {
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 500;
    padding: 0.5rem 0.9rem;
    border-radius: 9999px;
    transition: color 0.2s ease, background-color 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.main-nav-link:hover,
.main-nav-link:focus-visible {
    color: var(--gold-bright);
    background: rgba(232, 197, 116, 0.08);
    outline: none;
}

.main-nav-link.active {
    color: var(--gold-bright);
    background: rgba(232, 197, 116, 0.14);
    box-shadow: inset 0 0 0 1px rgba(232, 197, 116, 0.28);
}

/* Buttons */
.btn-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #f3d78e 0%, #d4a64a 100%);
    color: #130f07;
    font-weight: 600;
    border-radius: 9999px;
    padding: 0.7rem 1.45rem;
    border: 1px solid rgba(255, 244, 214, 0.45);
    box-shadow: 0 8px 22px -8px rgba(232, 197, 116, 0.55);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    text-decoration: none;
    cursor: pointer;
}

.btn-gold:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 12px 28px -8px rgba(232, 197, 116, 0.65);
    color: #0d0a04;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-weight: 500;
    border-radius: 9999px;
    padding: 0.6rem 1.2rem;
    border: 1px solid rgba(232, 197, 116, 0.22);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    text-decoration: none;
    cursor: pointer;
}

.btn-ghost:hover {
    background: rgba(232, 197, 116, 0.12);
    border-color: rgba(232, 197, 116, 0.5);
    color: var(--gold-bright);
    transform: translateY(-1px);
}

/* Filter pills */
.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(16, 20, 42, 0.65);
    border: 1px solid var(--border-muted);
    transition: all 0.2s ease;
    cursor: pointer;
}

.filter-pill:hover {
    color: var(--text-primary);
    border-color: rgba(232, 197, 116, 0.35);
}

.filter-pill.active {
    color: #130f07;
    background: linear-gradient(135deg, #f3d78e, #d4a64a);
    border-color: transparent;
    font-weight: 600;
    box-shadow: 0 6px 18px -6px rgba(232, 197, 116, 0.5);
}

/* Element colors & badges */
.fire { color: var(--fire-color); }
.earth { color: var(--earth-color); }
.air { color: var(--air-color); }
.water { color: var(--water-color); }

.badge-fire {
    color: #fda4af;
    background: var(--fire-bg);
    border: 1px solid var(--fire-border);
}

.badge-earth {
    color: #6ee7b7;
    background: var(--earth-bg);
    border: 1px solid var(--earth-border);
}

.badge-air {
    color: #bae6fd;
    background: var(--air-bg);
    border: 1px solid var(--air-border);
}

.badge-water {
    color: #e9d5ff;
    background: var(--water-bg);
    border: 1px solid var(--water-border);
}

/* Zodiac medallion ring */
.zodiac-medallion {
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    line-height: 1;
    background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.1), rgba(10, 14, 32, 0.85));
    border: 1px solid rgba(232, 197, 116, 0.28);
    box-shadow: inset 0 0 14px rgba(232, 197, 116, 0.08);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}

.group:hover .zodiac-medallion {
    transform: scale(1.08) rotate(8deg);
    border-color: rgba(232, 197, 116, 0.65);
    box-shadow: 0 0 20px rgba(232, 197, 116, 0.2);
}

/* Horizontal quick zodiac navigation strip */
.zodiac-strip {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding: 0.5rem 0.25rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.zodiac-strip::-webkit-scrollbar {
    display: none;
}

.zodiac-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    border-radius: 9999px;
    background: rgba(16, 20, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.16);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.2s ease;
}

.zodiac-chip:hover {
    color: var(--gold-bright);
    border-color: rgba(232, 197, 116, 0.45);
    background: rgba(232, 197, 116, 0.1);
}

.zodiac-chip.active {
    color: #130f07;
    background: linear-gradient(135deg, #f3d78e, #d4a64a);
    border-color: transparent;
    font-weight: 600;
}

.zodiac-chip.active .chip-symbol {
    color: #130f07 !important;
}

/* Editorial prose styling (for reading horoscopes & love guides) */
.prose-celestial p,
.prose p {
    color: #d6dce8;
    font-size: 1.025rem;
    line-height: 1.85;
    margin-bottom: 1.15rem;
}

.prose-celestial p:last-child,
.prose p:last-child {
    margin-bottom: 0;
}

.prose-celestial h3,
.prose h3 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--gold-bright);
    font-size: 1.45rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid rgba(232, 197, 116, 0.16);
}

.prose-celestial h3:first-child,
.prose h3:first-child {
    margin-top: 0;
}

/* Content section helper */
.content-section {
    margin-bottom: 1.75rem;
    padding: 1.75rem;
}

.content-section h2 {
    color: var(--gold-bright);
    font-size: 1.65rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.content-section p {
    color: #d6dce8;
    line-height: 1.8;
    margin-bottom: 0.9rem;
}

.content-section p:last-child {
    margin-bottom: 0;
}

/* Form controls */
.celestial-select,
.celestial-input,
.celestial-textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 0.75rem;
    background: rgba(10, 13, 28, 0.85);
    border: 1px solid rgba(232, 197, 116, 0.22);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.celestial-select:focus,
.celestial-input:focus,
.celestial-textarea:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(232, 197, 116, 0.18);
}

.celestial-select option {
    background-color: #0e1328;
    color: #f4f1ea;
}

/* Line clamp helper */
.line-clamp-4 {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Toast notification */
.celestial-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(1.25rem);
    background: rgba(16, 20, 42, 0.96);
    color: var(--gold-bright);
    border: 1px solid rgba(232, 197, 116, 0.45);
    padding: 0.75rem 1.35rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 2000;
}

.celestial-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Footer */
.main-footer {
    background: rgba(6, 8, 18, 0.82);
    border-top: 1px solid rgba(232, 197, 116, 0.14);
    backdrop-filter: blur(12px);
}

/* Subtle decorative divider */
.celestial-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(232, 197, 116, 0.35), transparent);
}

/* GEO Citation-Friendly Reference Tables */
.geo-table-wrap {
    overflow-x: auto;
    border-radius: 0.875rem;
    border: 1px solid var(--border-subtle);
    background: rgba(10, 14, 30, 0.55);
}

.geo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    text-align: left;
}

.geo-table th {
    padding: 0.85rem 1rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold-bright);
    background: rgba(232, 197, 116, 0.08);
    border-bottom: 1px solid rgba(232, 197, 116, 0.2);
    white-space: nowrap;
}

.geo-table td {
    padding: 0.8rem 1rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.geo-table tbody tr:last-child td {
    border-bottom: none;
}

.geo-table tbody tr:hover {
    background: rgba(232, 197, 116, 0.04);
}

/* GEO Answer-First FAQ Accordion */
.faq-item {
    border: 1px solid var(--border-muted);
    border-radius: 0.875rem;
    background: rgba(12, 16, 34, 0.6);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.faq-item[open] {
    border-color: rgba(232, 197, 116, 0.35);
    background: rgba(18, 23, 48, 0.75);
}

.faq-summary {
    list-style: none;
    cursor: pointer;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.faq-summary::-webkit-details-marker {
    display: none;
}

.faq-summary .faq-chevron {
    color: var(--gold-primary);
    transition: transform 0.2s ease;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.faq-item[open] .faq-summary .faq-chevron {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.25rem 1.15rem 1.25rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.75;
}

/* Answer-First Direct Takeaway Strip */
.tldr-box {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.08) 0%, rgba(16, 20, 42, 0.78) 55%, rgba(232, 197, 116, 0.08) 100%);
    border: 1px solid rgba(167, 139, 250, 0.28);
    border-radius: 1rem;
}

/* Mobile menu panel */
@media (max-width: 767px) {
    .content-section {
        padding: 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
