:root {
    --primary: #8B1A1A;
    --primary-light: #A0522D;
    --primary-dark: #5C0000;
    --accent: #D4AF37;
    --accent-light: #F0D060;
    --bg-cream: #FFF8F0;
    --bg-section: #FFFAF5;
    --text-dark: #2C1810;
    --text-body: #3D2B1F;
    --text-muted: #7A6A5E;
    --border-light: #E8D5C0;
    --card-shadow: 0 2px 12px rgba(139,26,26,0.08);
    --gradient-hero: linear-gradient(135deg, #8B1A1A 0%, #A0522D 50%, #D4AF37 100%);
}

* { box-sizing: border-box; }

body {
    font-family: 'Poppins', 'Noto Sans Tamil', sans-serif;
    color: var(--text-body);
    background: var(--bg-cream);
    font-size: 16px;
    line-height: 1.65;
    margin: 0;
}

h1, h2, h3, h4, h5 {
    font-family: 'Noto Serif Tamil', 'Noto Serif Devanagari', serif;
    color: var(--text-dark);
    font-weight: 600;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }
h5 { font-size: 1.05rem; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.top-bar-v2 {
    background: var(--primary-dark);
    color: #fff;
    padding: 6px 0;
    font-size: 0.82rem;
}
.top-vedic { opacity: 0.85; }

.language-toggle .lang-btn {
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 2px 12px;
    font-size: 0.78rem;
    border-radius: 4px;
    margin-left: 4px;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
}
.language-toggle .lang-btn.active,
.language-toggle .lang-btn:hover {
    background: var(--accent);
    color: var(--primary-dark);
    border-color: var(--accent);
}

.header-v2 {
    background: #fff;
    border-bottom: 3px solid var(--accent);
    padding: 10px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand-v2 {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.brand-logo-img {
    height: 38px;
    margin-right: 10px;
}
.brand-text {
    font-family: 'Noto Serif Tamil', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.header-nav { flex: 1; display: flex; justify-content: center; }
.nav-list-v2 {
    list-style: none;
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
}
.nav-link-v2 {
    padding: 6px 14px;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s;
}
.nav-link-v2:hover, .nav-link-v2.active {
    background: var(--bg-section);
    color: var(--primary);
}

.generate-btn-header {
    background: var(--primary);
    color: #fff !important;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.generate-btn-header:hover {
    background: var(--primary-dark);
}

.hero-v2 {
    background: var(--gradient-hero);
    color: #fff;
    padding: 50px 0 40px;
    text-align: center;
}
.hero-title-v2 { font-size: 2.2rem; margin-bottom: 8px; color: #fff; }
.hero-subtitle-v2 { font-size: 1.1rem; opacity: 0.9; margin-bottom: 12px; color: #fff; font-weight: 400; }
.hero-desc-v2 { font-size: 0.95rem; opacity: 0.85; max-width: 700px; margin: 0 auto; color: #fff; }
.hero-for-line { font-size: 0.85rem; opacity: 0.7; font-style: italic; }

.trust-chips { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.trust-chip {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
}

.main-content-v2 { padding: 30px 0; }

.sidebar-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-light);
}
.sidebar-title {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-light);
}
.tools-list { list-style: none; padding: 0; margin: 0; }
.tools-list li { margin-bottom: 6px; }
.tools-list li a {
    display: flex;
    justify-content: space-between;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 0.88rem;
    color: var(--text-body);
    transition: background 0.2s;
}
.tools-list li a:hover { background: var(--bg-section); color: var(--primary); }

.form-card-v2 {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(139,26,26,0.1);
    border: 1px solid var(--border-light);
}
.form-title-v2 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 20px;
}

.form-label {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.9rem;
}
.form-control, .form-select {
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139,26,26,0.1);
}

.get-kundli-btn {
    background: var(--primary) !important;
    border: none;
    color: #fff !important;
    padding: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    margin-top: 10px;
    transition: all 0.3s;
}
.get-kundli-btn:hover {
    background: var(--primary-dark) !important;
    transform: translateY(-1px);
}

.cta-trust-strip { font-size: 0.78rem; color: var(--text-muted); }
.trust-text span { white-space: nowrap; }

.form-tabs { display: flex; gap: 8px; margin-top: 16px; justify-content: center; }
.tab-btn {
    padding: 6px 14px;
    border: 1px solid var(--border-light);
    background: transparent;
    border-radius: 6px;
    font-size: 0.82rem;
    cursor: pointer;
    color: var(--text-muted);
}
.tab-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.location-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}
.location-dropdown.show { display: block; }
.location-item {
    padding: 8px 14px;
    cursor: pointer;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0f0f0;
}
.location-item:hover { background: var(--bg-section); }

.feature-cards-v2 { padding: 40px 0; background: #fff; }
.feature-card {
    background: var(--bg-section);
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    border: 1px solid var(--border-light);
    transition: transform 0.2s;
}
.feature-card:hover { transform: translateY(-3px); }
.feature-icon { font-size: 2rem; margin-bottom: 8px; }
.feature-card h5 { font-size: 0.95rem; color: var(--primary); }
.feature-card p { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 10px; }
.btn-feature {
    background: var(--primary);
    color: #fff !important;
    padding: 5px 16px;
    border-radius: 6px;
    font-size: 0.82rem;
}
.btn-feature:hover { background: var(--primary-dark); }

.section-title { color: var(--primary); font-size: 1.1rem; margin-bottom: 16px; }

.faq-section { padding: 40px 0; }
.accordion-button { font-family: 'Noto Serif Tamil', serif; font-weight: 500; color: var(--text-dark); }
.accordion-button:not(.collapsed) { background: var(--bg-section); color: var(--primary); }

.footer { background: var(--primary-dark); color: #fff; padding: 30px 0; text-align: center; }
.footer a { color: var(--accent-light); }
.footer p { margin: 0; font-size: 0.9rem; }

.top-bar {
    background: var(--primary-dark);
    color: #fff;
    padding: 6px 0;
    font-size: 0.82rem;
}
.top-bar a { color: #fff; margin-right: 15px; opacity: 0.85; }
.top-bar a:hover { opacity: 1; }

.navbar {
    background: var(--primary) !important;
    padding: 8px 0;
}
.navbar-brand { color: #fff !important; font-family: 'Noto Serif Tamil', serif; font-weight: 700; font-size: 1.2rem; display: flex; align-items: center; gap: 8px; }
.brand-logo-img-sm { height: 30px; }
.navbar-nav-links { display: flex; gap: 4px; }
.navbar .nav-link { color: rgba(255,255,255,0.85) !important; font-size: 0.85rem; padding: 6px 10px; border-radius: 6px; }
.navbar .nav-link:hover { color: #fff !important; background: rgba(255,255,255,0.1); }
.navbar .btn-outline-light { font-size: 0.82rem; padding: 4px 14px; }

.result-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(139,26,26,0.08);
}
.result-header {
    background: var(--gradient-hero);
    color: #fff;
    padding: 20px 24px;
}
.result-header h2 { color: #fff; margin-bottom: 4px; }
.result-header .birth-info { color: rgba(255,255,255,0.85); font-size: 0.9rem; }
.result-trust-strip { display: flex; gap: 16px; flex-wrap: wrap; }
.trust-badge { font-size: 0.78rem; opacity: 0.85; white-space: nowrap; }

.inputs-used-box {
    background: var(--bg-section);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 16px 20px;
    margin: 16px 20px;
}
.inputs-used-title { font-size: 0.95rem; color: var(--primary); margin-bottom: 10px; }
.inputs-used-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.input-item { display: flex; flex-direction: column; }
.input-label { font-size: 0.78rem; color: var(--text-muted); }
.input-value { font-size: 0.88rem; font-weight: 500; color: var(--text-dark); }
.calculation-timestamp { margin-top: 10px; font-size: 0.78rem; color: var(--text-muted); border-top: 1px solid var(--border-light); padding-top: 8px; }

.section-box {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 0;
}
.section-subtitle { font-size: 0.95rem; color: var(--primary-light); margin-bottom: 10px; }

.kundali-chart {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}
.kundali-chart svg { width: 100%; height: auto; }

.chart-birth-info { font-size: 0.85rem; color: var(--text-muted); }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.info-item { display: flex; justify-content: space-between; padding: 5px 8px; border-radius: 4px; font-size: 0.88rem; }
.info-item:nth-child(odd) { background: var(--bg-section); }
.info-label { color: var(--text-muted); }
.info-value { font-weight: 500; color: var(--text-dark); }

.indicator-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.indicator-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
}
.indicator-badge.manglik-yes { background: #fde8e8; color: #c0392b; border: 1px solid #f5c6c6; }
.indicator-badge.manglik-no { background: #e8f5e9; color: #27ae60; border: 1px solid #c8e6c9; }
.indicator-badge.sade-sati { background: #fff3e0; color: #e65100; border: 1px solid #ffe0b2; }

.planetary-table th { background: var(--primary); color: #fff; font-size: 0.85rem; padding: 8px 12px; }
.planetary-table td { font-size: 0.88rem; padding: 8px 12px; }

.strength-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.strength-card {
    background: var(--bg-section);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    border: 1px solid var(--border-light);
}
.strength-card .planet-name { font-weight: 600; color: var(--primary); font-size: 0.95rem; }
.strength-card .strength-value { font-size: 1.2rem; font-weight: 700; color: var(--accent); }
.strength-bar {
    height: 6px;
    background: #e0d5c8;
    border-radius: 3px;
    margin-top: 6px;
    overflow: hidden;
}
.strength-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.5s;
}

.premium-new-section {
    border: 2px solid var(--accent);
    background: linear-gradient(135deg, #FFFAF0 0%, #FFF8F0 100%);
}
.premium-new-section .section-title { color: var(--primary); }

.chart-essence-box {
    background: linear-gradient(135deg, #FFF8F0, #FFF0E0);
    border-left: 4px solid var(--accent);
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.essence-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.essence-detail-item {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}
.essence-detail-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; }
.essence-detail-value { font-size: 1rem; font-weight: 600; color: var(--primary); margin-top: 4px; }

.command-table { width: 100%; border-collapse: collapse; }
.command-table th {
    background: var(--primary);
    color: #fff;
    padding: 10px 12px;
    font-size: 0.85rem;
    text-align: left;
}
.command-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-light); font-size: 0.88rem; }
.command-table tr:nth-child(odd) { background: var(--bg-section); }

.role-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 500;
}
.role-supportive { background: #e8f5e9; color: #2e7d32; }
.role-challenging { background: #fde8e8; color: #c62828; }

.phase-card {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}
.phase-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.phase-name { font-weight: 600; color: var(--primary); font-size: 1rem; }
.phase-years { font-size: 0.82rem; color: var(--text-muted); }
.phase-theme { font-size: 0.9rem; color: var(--text-body); margin-bottom: 8px; }
.phase-dashas { display: flex; gap: 6px; flex-wrap: wrap; }
.dasha-tag {
    background: var(--bg-section);
    border: 1px solid var(--border-light);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.78rem;
}

.outlook-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}
.outlook-growth { background: #e8f5e9; color: #2e7d32; }
.outlook-challenge { background: #fde8e8; color: #c62828; }
.outlook-mixed { background: #fff3e0; color: #e65100; }
.outlook-transformation { background: #e8eaf6; color: #283593; }

.timeline-card {
    background: #fff;
    border-left: 4px solid var(--accent);
    border-radius: 0 8px 8px 0;
    padding: 14px 16px;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.timeline-header { display: flex; justify-content: space-between; align-items: center; }
.timeline-period { font-weight: 600; color: var(--primary); }
.timeline-years { font-size: 0.82rem; color: var(--text-muted); }
.timeline-reason { font-size: 0.85rem; color: var(--text-body); margin-top: 4px; }

.type-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}
.type-rise { background: #e8f5e9; color: #2e7d32; }
.type-stability { background: #e3f2fd; color: #1565c0; }
.type-opportunity { background: #fff8e1; color: #f57f17; }
.type-risk { background: #fde8e8; color: #c62828; }

.marriage-window-card {
    background: linear-gradient(135deg, #FFF8F0, #FFECEC);
    border: 1px solid #f0c0c0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 10px;
    text-align: center;
}
.marriage-strength { font-size: 0.82rem; color: var(--primary); font-weight: 600; }

.remedy-table { width: 100%; border-collapse: collapse; }
.remedy-table th {
    background: var(--primary);
    color: #fff;
    padding: 10px 12px;
    font-size: 0.85rem;
}
.remedy-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-light); font-size: 0.88rem; }
.remedy-table tr:nth-child(odd) { background: var(--bg-section); }

.yogas-box .yoga-item {
    background: var(--bg-section);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}
.yoga-name { font-weight: 600; color: var(--primary); }
.yoga-desc { font-size: 0.88rem; color: var(--text-body); }

.dasha-list .dasha-item {
    background: var(--bg-section);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 6px;
}
.current-dasha-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }

.predictions-box .prediction-card {
    background: var(--bg-section);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 10px;
    border: 1px solid var(--border-light);
}

.score-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 auto 8px;
}
.score-excellent { background: #e8f5e9; color: #2e7d32; border: 2px solid #66bb6a; }
.score-good { background: #e3f2fd; color: #1565c0; border: 2px solid #42a5f5; }
.score-moderate { background: #fff3e0; color: #e65100; border: 2px solid #ffa726; }

.ashtakavarga-grid { overflow-x: auto; }
.house-analysis-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; }

.premium-insights-section {
    background: linear-gradient(135deg, #FFF8F0 0%, #FFFAF5 100%);
    border: 2px solid var(--accent);
}
.premium-badge {
    background: var(--accent);
    color: var(--primary-dark);
    padding: 3px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 8px;
}
.premium-subsection {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    border: 1px solid var(--border-light);
}
.subsection-title { font-size: 1rem; color: var(--primary); margin-bottom: 12px; }

.strength-rankings-container .rank-bar {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    gap: 10px;
}
.rank-bar .bar-label { min-width: 80px; font-size: 0.85rem; font-weight: 500; }
.rank-bar .bar-fill {
    height: 20px;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.5s;
}

.remedies-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.remedy-card {
    background: var(--bg-section);
    border-radius: 8px;
    padding: 14px;
    border: 1px solid var(--border-light);
    text-align: center;
}

.weekly-predictions-container .day-card {
    background: var(--bg-section);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 8px;
    border: 1px solid var(--border-light);
}

.navamsa-positions-table table { width: 100%; font-size: 0.85rem; }
.navamsa-positions-table th { background: var(--primary-light); color: #fff; padding: 6px 10px; }
.navamsa-positions-table td { padding: 6px 10px; border-bottom: 1px solid var(--border-light); }

.cta-btn {
    background: var(--primary) !important;
    border: none;
    color: #fff !important;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
}
.cta-btn:hover { background: var(--primary-dark) !important; }

.gochar-moon-info { margin: 8px 0; }
.gochar-list { list-style: none; padding: 0; margin: 8px 0; }
.gochar-list li { padding: 4px 0; font-size: 0.88rem; display: flex; align-items: center; gap: 6px; }
.transit-rashi { font-weight: 600; color: var(--accent); margin-left: auto; }

.trending-list { list-style: none; padding: 0; margin: 0; }
.trending-list li { padding: 5px 0; font-size: 0.85rem; display: flex; gap: 6px; }
.trend-icon { color: var(--accent); }

.report-list { list-style: none; padding: 0; font-size: 0.85rem; }
.report-list li { padding: 3px 0; color: var(--text-muted); }
.btn-view-reports {
    display: block;
    background: var(--primary);
    color: #fff !important;
    text-align: center;
    padding: 6px;
    border-radius: 6px;
    font-size: 0.82rem;
    margin-top: 10px;
}

.homepage-v2 .quick-tools-section { background: var(--bg-section); padding: 30px 0; }

.gochar-flags { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.gochar-overall { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border-light); font-size: 0.85rem; }

@media (max-width: 768px) {
    .hero-title-v2 { font-size: 1.6rem; }
    .hero-subtitle-v2 { font-size: 0.95rem; }
    .header-nav { display: none; }
    .generate-btn-header { display: none; }
    .inputs-used-grid { grid-template-columns: repeat(2, 1fr); }
    .form-card-v2 { padding: 20px 16px; }
    .nav-list-v2 { display: none; }
    .navbar-nav-links { gap: 2px; }
    .navbar .nav-link { font-size: 0.75rem; padding: 4px 6px; }
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.3rem; }
    h3 { font-size: 1.15rem; }
}

@media (max-width: 576px) {
    .inputs-used-grid { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: 1fr; }
    .trust-chips { flex-direction: column; align-items: center; }
    .result-trust-strip { flex-direction: column; gap: 4px; }
}
