/* ============================================
   Kundali Chart Visual + Panchang + New Sections
   ============================================ */

/* ---- North Indian Kundali Chart ---- */
.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 35px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 20px;
}

.kundali-chart {
    width: 400px;
    height: 400px;
    position: relative;
}

.kundali-chart svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 8px rgba(139, 92, 246, 0.15));
}

.chart-label {
    text-align: center;
    margin-top: 14px;
    font-family: 'Cinzel', serif;
    color: var(--secondary);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ---- Planet Table ---- */
.planet-table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

.planet-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.planet-table th {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary-light);
    padding: 12px 15px;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.planet-table td {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(45, 45, 74, 0.3);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.planet-table tr:hover td {
    background: rgba(139, 92, 246, 0.03);
}

.planet-table .planet-name-cell {
    font-weight: 600;
    color: var(--text);
}

.planet-table .retro { color: var(--danger); font-weight: 600; }
.planet-table .combust { color: var(--secondary); font-weight: 600; }
.planet-table .exalted { color: var(--success); font-weight: 600; }
.planet-table .debilitated { color: var(--danger); font-weight: 600; }
.planet-table .own { color: var(--primary-light); font-weight: 600; }

/* ---- Navamsa Analysis ---- */
.navamsa-analysis {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 20px;
}

.navamsa-point {
    padding: 10px 14px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    border-left: 3px solid var(--primary);
}

/* ---- Yoga Cards ---- */
.yoga-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 22px;
    margin-bottom: 10px;
    border-left: 4px solid var(--success);
    transition: all 0.3s ease;
}

.yoga-card:hover {
    transform: translateX(4px);
}

.yoga-name {
    font-weight: 700;
    color: var(--success);
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.yoga-planets {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.yoga-effect {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ---- Dosha Cards ---- */
.dosha-detail-card {
    background: var(--bg-card);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
    border-left: 4px solid var(--danger);
}

.dosha-detail-card .dosha-name {
    font-weight: 700;
    color: var(--danger);
    font-size: 0.95rem;
}

.dosha-severity {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 8px;
}

.dosha-severity.High { background: rgba(239,68,68,0.15); color: #ef4444; }
.dosha-severity.Medium { background: rgba(245,158,11,0.15); color: #f59e0b; }
.dosha-severity.Low { background: rgba(16,185,129,0.15); color: #10b981; }

.dosha-detail-card .dosha-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.5;
}

.dosha-detail-card .dosha-remedy-text {
    font-size: 0.82rem;
    color: var(--success);
    margin-top: 8px;
    font-style: italic;
}

.no-dosha-card {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius);
    padding: 25px;
    text-align: center;
    color: var(--success);
    font-weight: 600;
}

/* ---- Dasha Timeline ---- */
.dasha-timeline {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 25px;
}

.dasha-current {
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-sm);
    padding: 18px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.dasha-current-item {
    text-align: center;
}

.dasha-current-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.dasha-current-planet {
    font-size: 1.4rem;
    font-weight: 700;
    font-family: 'Cinzel', serif;
    color: var(--primary-light);
}

.dasha-current-dates {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.dasha-sequence {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dasha-item {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.dasha-item.active {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--primary);
    color: var(--primary-light);
    font-weight: 600;
}

.dasha-item:hover {
    transform: translateY(-2px);
}

/* ---- Varshphal Card ---- */
.varshphal-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 25px;
}

.varshphal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.varshphal-item {
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 18px;
    text-align: center;
}

.varshphal-item-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.varshphal-item-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-light);
}

.varshphal-item-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ---- Panchang Card ---- */
.panchang-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
}

.panchang-date {
    text-align: center;
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    color: var(--secondary);
    margin-bottom: 25px;
}

.panchang-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.panchang-item {
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    border: 1px solid rgba(45, 45, 74, 0.3);
    transition: all 0.3s ease;
}

.panchang-item:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
}

.panchang-item-icon {
    font-size: 1.3rem;
    margin-bottom: 6px;
    color: var(--secondary);
}

.panchang-item-label {
    font-size: 0.72rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.panchang-item-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.panchang-item-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.panchang-item.warning {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.03);
}

.panchang-item.good {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.03);
}

/* ---- City Dropdown ---- */
.city-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.city-option {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(45, 45, 74, 0.2);
}

.city-option:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--text);
}

.city-option small {
    color: var(--text-dim);
    font-size: 0.75rem;
}

/* Light theme overrides */
body.light-theme .planet-table th { background: rgba(124,58,237,0.06); color: #7c3aed; }
body.light-theme .planet-table td { border-bottom-color: rgba(0,0,0,0.05); color: #4a4a6a; }
body.light-theme .planet-table .planet-name-cell { color: #1e1e2e; }
body.light-theme .chart-container { background: rgba(255,255,255,0.85); border-color: rgba(0,0,0,0.06); }
body.light-theme .kundali-chart svg { filter: drop-shadow(0 2px 8px rgba(124, 58, 237, 0.1)); }
body.light-theme .panchang-card { background: rgba(255,255,255,0.85); border-color: rgba(0,0,0,0.06); }
body.light-theme .panchang-item { background: #f5f5fa; border-color: rgba(0,0,0,0.05); }
body.light-theme .panchang-item-value { color: #1e1e2e; }
body.light-theme .yoga-card { background: rgba(255,255,255,0.85); border-color: rgba(0,0,0,0.06); }
body.light-theme .dosha-detail-card { background: rgba(255,255,255,0.85); }
body.light-theme .dasha-timeline { background: rgba(255,255,255,0.85); border-color: rgba(0,0,0,0.06); }
body.light-theme .dasha-item { background: #f5f5fa; border-color: rgba(0,0,0,0.06); }
body.light-theme .varshphal-card { background: rgba(255,255,255,0.85); border-color: rgba(0,0,0,0.06); }
body.light-theme .varshphal-item { background: #f5f5fa; }
body.light-theme .navamsa-analysis { background: rgba(255,255,255,0.85); border-color: rgba(0,0,0,0.06); }
body.light-theme .navamsa-point { background: #f5f5fa; }
body.light-theme .city-dropdown { background: #ffffff; border-color: rgba(0,0,0,0.08); }
body.light-theme .city-option { color: #4a4a6a; border-bottom-color: rgba(0,0,0,0.04); }
body.light-theme .city-option:hover { background: rgba(124,58,237,0.06); }

@media (max-width: 768px) {
    .kundali-chart { width: 280px; height: 280px; }
    #meri-kundali .form-grid { grid-template-columns: 1fr 1fr !important; }
    .panchang-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .dasha-current { grid-template-columns: 1fr; }
}
