:root {
    --bg-light: #faf7f2;
    --bg-surface: #f4eee3;
    --card-bg: rgba(255, 253, 249, 0.85);
    --card-hover: rgba(255, 255, 255, 0.95);
    --border-glass: rgba(180, 130, 90, 0.18);
    --border-accent: rgba(200, 100, 50, 0.35);
    
    --terracotta: #c86432;
    --terracotta-dark: #a3481e;
    --ochre: #d97706;
    --sage: #4e6b5a;
    --walnut: #2d1e18;
    
    --text-primary: #2d1e18;
    --text-secondary: #574438;
    --text-muted: #8c7465;
    
    --font-heading: 'Cormorant Garamond', serif;
    --font-sans: 'Plus Jakarta Sans', sans-serif;
    --font-display: 'Outfit', sans-serif;
    
    --glass-shadow: 0 10px 30px -5px rgba(60, 40, 20, 0.07);
    --terracotta-shadow: 0 6px 20px -3px rgba(200, 100, 50, 0.25);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-light);
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(208, 140, 96, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(217, 119, 6, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(78, 107, 90, 0.05) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.65;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.app-container {
    max-width: 1100px;
    margin: 0 auto;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.02em;
}

header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.brand {
    font-size: 3.6rem;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, var(--terracotta) 0%, var(--terracotta-dark) 60%, var(--ochre) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    filter: drop-shadow(0 2px 8px rgba(200, 100, 50, 0.15));
    transition: transform 0.3s ease;
}

.brand:hover {
    transform: scale(1.03);
}

.subtitle {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--text-muted);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-top: 0.2rem;
    font-weight: 500;
}

/* Views */
.view {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.view.active {
    display: block;
    opacity: 1;
}

/* Glassmorphism Warm Panels */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass:hover {
    border-color: rgba(200, 100, 50, 0.25);
}

/* Layout */
.grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .grid-layout {
        grid-template-columns: 1fr 1fr;
    }
}

.card {
    padding: 2.2rem;
}

.card h2 {
    font-size: 1.85rem;
    color: var(--terracotta-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* Form Styles */
.input-group {
    margin-bottom: 1.3rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.03em;
}

input {
    width: 100%;
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--text-primary);
    outline: none;
    transition: all 0.25s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
}

input:focus {
    border-color: var(--terracotta);
    box-shadow: 0 0 0 3px rgba(200, 100, 50, 0.15);
    background: #ffffff;
}

button[type="submit"] {
    width: 100%;
    padding: 1.1rem;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, var(--terracotta) 0%, var(--terracotta-dark) 100%);
    color: #ffffff;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: var(--terracotta-shadow);
    transition: all 0.3s ease;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -4px rgba(200, 100, 50, 0.4);
}

/* Past Charts List */
.chart-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 0.3rem;
}

.chart-list::-webkit-scrollbar {
    width: 6px;
}

.chart-list::-webkit-scrollbar-thumb {
    background: rgba(180, 130, 90, 0.25);
    border-radius: 4px;
}

.chart-item {
    padding: 1.1rem 1.3rem;
    border-radius: 14px;
    background: rgba(245, 238, 227, 0.6);
    border: 1px solid rgba(180, 130, 90, 0.15);
    cursor: pointer;
    transition: all 0.25s ease;
}

.chart-item:hover {
    background: #ffffff;
    border-color: var(--terracotta);
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(60, 40, 20, 0.05);
}

.chart-item h4 {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.chart-item p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* Fingerprint View */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.4rem;
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-secondary);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1.8rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.back-btn:hover {
    background: #ffffff;
    color: var(--terracotta-dark);
    border-color: var(--terracotta);
}

.fingerprint-header {
    padding: 2.2rem;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.fingerprint-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, transparent, var(--terracotta), var(--ochre), transparent);
}

.fingerprint-header h2 {
    font-size: 2.6rem;
    color: var(--terracotta-dark);
    margin-bottom: 0.3rem;
}

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

.chart-visuals-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 900px) {
    .chart-visuals-container {
        grid-template-columns: 1fr 1fr;
    }
}

.chart-card {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart-card h3 {
    font-size: 1.5rem;
    color: var(--terracotta-dark);
    margin-bottom: 1rem;
}

.svg-container {
    width: 100%;
    max-width: 380px;
    aspect-ratio: 1;
    margin-top: 0.5rem;
}

.svg-container svg {
    width: 100%;
    height: 100%;
    border-radius: 14px;
    background: rgba(255, 253, 249, 0.95);
    box-shadow: inset 0 0 0 1px rgba(180, 130, 90, 0.2);
}

/* ==========================================================================
   Light Warm Earthy Reading Styling
   ========================================================================== */

.reading-container {
    padding: 2.5rem 2rem;
}

/* Structured Section Cards */
.reading-section-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(180, 130, 90, 0.2);
    border-left: 4px solid var(--terracotta);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(60, 40, 20, 0.05);
    transition: all 0.3s ease;
}

.reading-section-card:nth-child(2) {
    border-left-color: var(--ochre);
}

.reading-section-card:nth-child(3) {
    border-left-color: var(--sage);
}

.reading-section-card:hover {
    background: #ffffff;
    border-color: rgba(200, 100, 50, 0.3);
    box-shadow: 0 8px 30px rgba(60, 40, 20, 0.08);
}

/* Headings inside reading */
.reading-content h2, 
.reading-content h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--terracotta-dark);
    margin-top: 0;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    line-height: 1.3;
}

.reading-section-card:nth-child(2) h2,
.reading-section-card:nth-child(2) h3 {
    color: #b45309;
}

.reading-section-card:nth-child(3) h2,
.reading-section-card:nth-child(3) h3 {
    color: #3b5245;
}

/* Section paragraph styling */
.reading-content p {
    font-size: 1.03rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 1.2rem;
}

/* Section list container styling */
.reading-content ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin: 1.2rem 0;
    padding-left: 0;
}

/* Bullet item formatted as light warm cards */
.reading-content li {
    position: relative;
    padding: 1rem 1.2rem 1rem 2.8rem;
    background: rgba(245, 238, 227, 0.5);
    border: 1px solid rgba(180, 130, 90, 0.15);
    border-radius: 12px;
    font-size: 0.98rem;
    color: var(--text-primary);
    line-height: 1.65;
    transition: all 0.25s ease;
}

.reading-content li::before {
    content: '✦';
    position: absolute;
    left: 1.1rem;
    top: 1rem;
    color: var(--terracotta);
    font-size: 0.9rem;
}

.reading-section-card:nth-child(2) li::before {
    color: var(--ochre);
}

.reading-section-card:nth-child(3) li::before {
    color: var(--sage);
}

.reading-content li:hover {
    background: #ffffff;
    border-color: rgba(200, 100, 50, 0.25);
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(60, 40, 20, 0.04);
}

/* Strong / Highlight styling */
.reading-content strong,
.reading-content b {
    color: var(--terracotta-dark);
    font-weight: 700;
}

.reading-section-card:nth-child(2) strong {
    color: #92400e;
}

.reading-section-card:nth-child(3) strong {
    color: #2d3f35;
}

/* Key Astrological Indicator Tags */
.astro-badge {
    display: inline-block;
    padding: 0.15rem 0.65rem;
    border-radius: 6px;
    background: rgba(200, 100, 50, 0.12);
    border: 1px solid rgba(200, 100, 50, 0.25);
    color: var(--terracotta-dark);
    font-size: 0.88rem;
    font-weight: 600;
    margin: 0 0.2rem;
}

/* Loader Overlay */
.loader-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(250, 247, 242, 0.88);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loader-overlay.hidden {
    display: none;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(200, 100, 50, 0.15);
    border-top: 4px solid var(--terracotta);
    border-radius: 50%;
    animation: spin 0.9s cubic-bezier(0.55, 0.15, 0.45, 0.85) infinite;
    margin-bottom: 1.2rem;
}

.loader-overlay p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

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