.kundli-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    background: #ffffff;
    box-shadow: 0 10px 40px rgba(0,0,0,0.04);
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    border: 1px solid #f2e9d8;
}

.kundli-header {
    text-align: center;
    margin-bottom: 40px;
}

.kundli-header h1 {
    color: #b12a2a;
    font-size: 34px;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    margin-bottom: 15px;
}

.kundli-header p {
    color: #555;
    font-size: 17px;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

.kundli-form-section {
    background: linear-gradient(180deg, #fffcf7 0%, #ffffff 100%);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid #eaddcc;
    box-shadow: 0 4px 20px rgba(212,175,55,0.05);
}

.form-intro {
    text-align: center;
    margin-bottom: 30px;
}

.form-intro h3 {
    color: #d4af37;
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    margin-bottom: 10px;
}

.form-intro p {
    color: #666;
    font-size: 15px;
    line-height: 1.5;
}

.form-privacy-note {
    text-align: center;
    background: #fff9f0;
    padding: 12px;
    border-radius: 6px;
    border: 1px dashed #eaddcc;
    margin-top: 25px;
}

.form-privacy-note p {
    margin: 0;
    color: #7a6345;
    font-size: 14px;
}

.form-privacy-note i {
    color: #d4af37;
    margin-right: 5px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a4a4a;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 14px;
    border: 1px solid #e0d5c1;
    border-radius: 6px;
    font-size: 15px;
    background: #ffffff;
    transition: all 0.3s ease;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212,175,55,0.1);
}

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

.problem-item {
    background: #ffffff;
    padding: 12px 18px;
    border-radius: 25px;
    border: 1px solid #e0d5c1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.problem-item:hover {
    border-color: #d4af37;
    background: #fff9f0;
    box-shadow: 0 2px 8px rgba(212,175,55,0.1);
}

.problem-item input {
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
    accent-color: #b12a2a;
}

.problem-item.selected {
    background: #b12a2a;
    color: #fff;
    border-color: #b12a2a;
    box-shadow: 0 4px 10px rgba(177,42,42,0.2);
}

.problem-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.submit-btn {
    background: linear-gradient(135deg, #b12a2a 0%, #8c1e1e 100%);
    color: #fff;
    border: none;
    padding: 16px 30px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(177,42,42,0.2);
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.5px;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #8c1e1e 0%, #6a1515 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(177,42,42,0.3);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Results Section */
.kundli-results {
    display: none;
    margin-top: 50px;
}

.parthana-kundli-navigation {
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 18px;
    padding: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 30px;
}

.pk-nav-scroll {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.pk-nav-scroll::-webkit-scrollbar {
    display: none;
}

.pk-nav-item {
    position: relative;
    appearance: none;
    -webkit-appearance: none;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none;
    outline: none;
    height: 52px;
    min-width: max-content;
    padding: 8px 18px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, transform .2s ease;
    flex: 0 0 auto;
    margin: 0;
}

.pk-nav-item.active {
    background: linear-gradient(135deg, #C83D63, #9F3150) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(200,61,99,.22);
    font-weight: 600;
}

.pk-nav-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex: 0 0 22px;
    color: #999;
}

.pk-nav-item.active .pk-nav-icon {
    color: #ffffff;
}

.pk-nav-active-indicator {
    width: 20px;
    height: 3px;
    border-radius: 999px;
    background: #ffffff;
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: .2s;
}

.pk-nav-item.active .pk-nav-active-indicator {
    opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
    .pk-nav-item:not(.active):hover {
        background: #FFF3F6 !important;
        color: #C83D63 !important;
    }
    .pk-nav-item:not(.active):hover .pk-nav-icon {
        color: #C83D63;
    }
}

@media (max-width: 768px) {
    .parthana-kundli-navigation {
        border-radius: 14px;
        padding: 5px;
    }
    .pk-nav-item {
        height: 48px;
        padding: 7px 15px;
        border-radius: 12px;
        font-size: 13px;
        gap: 7px;
    }
    .pk-nav-icon {
        width: 20px;
        height: 20px;
        font-size: 15px;
    }
}

.result-card {
    background: #ffffff;
    border: 1px solid #f2e9d8;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.result-card h3 {
    color: #333;
    border-bottom: 2px solid #ff2d37;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.data-item {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #f1f1f1;
    padding-bottom: 8px;
}

.data-item strong {
    color: #555;
}

/* North Indian Chart */
.chart-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
    border: 2px solid #ff2d37;
    background: #fffdf5;
}

.chart-line {
    position: absolute;
    background: #ff2d37;
}

.chart-line.diag1 { width: 141.4%; height: 2px; top: 50%; left: -20.7%; transform: rotate(45deg); }
.chart-line.diag2 { width: 141.4%; height: 2px; top: 50%; left: -20.7%; transform: rotate(-45deg); }
.chart-line.horiz { width: 100%; height: 2px; top: 50%; left: 0; }
.chart-line.vert { width: 2px; height: 100%; top: 0; left: 50%; }

.chart-house {
    position: absolute;
    font-size: 11px;
    text-align: center;
    width: 75px;
    height: 75px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.house-1 { top: 0; left: 50%; transform: translateX(-50%); }
.house-2 { top: 0; left: 0; }
.house-3 { top: 25%; left: 0; }
.house-4 { top: 50%; left: 0; transform: translateY(-50%); }
.house-5 { bottom: 25%; left: 0; }
.house-6 { bottom: 0; left: 0; }
.house-7 { bottom: 0; left: 50%; transform: translateX(-50%); }
.house-8 { bottom: 0; right: 0; }
.house-9 { bottom: 25%; right: 0; }
.house-10 { top: 50%; right: 0; transform: translateY(-50%); }
.house-11 { top: 25%; right: 0; }
.house-12 { top: 0; right: 0; }

.sign-number {
    font-size: 10px;
    color: #999;
    position: absolute;
    bottom: 2px;
    right: 2px;
}

/* Recommendations */
.puja-recs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.puja-card {
    border: 1px solid #eaeaea;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.puja-card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.puja-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f5f5f5;
}

.puja-details {
    padding: 20px;
}

.puja-details h4 {
    margin: 0 0 10px;
    font-size: 18px;
}

.puja-price {
    color: #ff2d37;
    font-weight: 600;
    margin-bottom: 15px;
}

.puja-btn {
    display: block;
    text-align: center;
    background: #ff2d37;
    color: white;
    padding: 10px;
    text-decoration: none;
    border-radius: 4px;
}

.puja-btn:hover {
    background: #e01e28;
    color: white;
}

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

.chart-style-tabs {
    display: flex;
    gap: 10px;
}
.chart-tab {
    padding: 8px 16px;
    background: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}
.chart-tab.active {
    background: #ff2d37;
    color: white;
    border-color: #ff2d37;
}

.table-responsive {
    overflow-x: auto;
}

/* --- Print Styles --- */
@media print {
    body {
        background: #fff;
        color: #000;
        font-family: Arial, sans-serif;
    }
    body * {
        visibility: hidden;
    }
    #kundli-results, #kundli-results * {
        visibility: visible;
    }
    #kundli-results {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    .chart-controls, #print-btn, #submit-btn, .kundli-header, .breadcrumb__section, header, footer, .kundli-nav-tabs, .mobile-menu-area, #save-kundli-banner-container, #save-kundli-btn, .action-btn {
        display: none !important;
    }
    .result-card {
        box-shadow: none !important;
        border: 1px solid #ccc;
        page-break-inside: avoid;
        margin-bottom: 20px;
        border-radius: 0;
        padding: 15px;
    }
    .k-tab-content {
        display: block !important;
        page-break-inside: auto;
    }
    h2, h3, h4, .section-title {
        page-break-after: avoid;
        color: #000 !important;
    }
    table {
        page-break-inside: auto;
    }
    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
    thead {
        display: table-header-group;
    }
    tfoot {
        display: table-footer-group;
    }
    svg {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
    .print-only-title {
        visibility: visible;
        display: block !important;
        text-align: center;
        margin-bottom: 30px;
        font-size: 24px;
        font-weight: bold;
        border-bottom: 2px solid #000;
        padding-bottom: 10px;
    }
    #tab-dasha {
        page-break-before: always;
    }
    #tab-vargas {
        page-break-before: always;
    }
    #tab-interpretation {
        page-break-before: always;
    }
}
