.kundli-match-page {
    min-height: 100vh;
    padding: 100px 20px 60px;
}

.kundli-match-container {
    max-width: 1130px;
    margin: 0 auto;
}

.kundli-match-heading {
    text-align: center;
    margin-bottom: 35px;
}

.kundli-match-heading h1 {
    font-size: 44px;
    font-weight: 700;
    margin-bottom: 12px;
}

.kundli-match-heading p {
    font-size: 17px;
    opacity: 0.7;
}


/* INTRO */

.kundli-match-intro-card {
    padding: 25px;
    margin-bottom: 16px;

    border-radius: 16px;

    background: linear-gradient(
        135deg,
        rgba(255,255,255,.08),
        rgba(255,255,255,.03)
    );

    border: 1px solid rgba(255,255,255,.15);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        0 10px 35px rgba(0,0,0,.35);
}

.kundli-match-intro-card p {
    margin: 0;
    line-height: 1.7;
    font-size: 16px;
}


/* TWO COLUMNS */

.kundli-match-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr) minmax(0, 1fr);

    gap: 24px;
}


/* NEW + SAVED CARD */

.new-match-card,
.saved-match-card {
    min-height: 430px;
    padding: 26px 24px;

    border-radius: 16px;

    background: linear-gradient(
        135deg,
        rgba(255,255,255,.08),
        rgba(255,255,255,.03)
    );

    border: 1px solid rgba(255,255,255,.15);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        0 10px 35px rgba(0,0,0,.35);
}

.new-match-card h2,
.saved-match-card h2 {
    margin: 0 0 20px;
    font-size: 22px;
}


/* PERSON SECTION */

.match-person-section {
    padding: 18px 16px;
    margin-bottom: 20px;

    border-radius: 14px;

    border: 1px solid rgba(255, 255, 255, 0.12);

    background: rgba(255, 255, 255, 0.04);
}

.match-person-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;

    margin: 0 0 16px;

    font-size: 15px;
    font-weight: 700;

    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.match-person-section.boy h3 {
    color: #7ec8ff;
}

.match-person-section.girl h3 {
    color: #ff9bc4;
}


/* MATCH TYPE */

.match-type-row {
    margin-bottom: 20px;
}

.match-type-row > label {
    display: block;

    margin-bottom: 8px;

    font-size: 12px;
    font-weight: 700;

    letter-spacing: 0.6px;

    opacity: 0.72;
}

.match-type-buttons {
    display: flex;
    gap: 8px;
}

.match-type-buttons button {
    flex: 1;

    height: 44px;

    border-radius: 11px;

    border: 1px solid rgba(255, 255, 255, 0.18);

    background: rgba(255, 255, 255, 0.08);

    color: white;

    font-weight: 600;

    cursor: pointer;
}

.match-type-buttons button.active {
    background: #ffe600;
    color: #111;
    border-color: #ffe600;
}


/* FORM ROW / FIELD (shared with free-kundli styling) */

.kundli-row {
    display: grid;
    grid-template-columns:
        1fr 1fr;

    gap: 16px;
}

.kundli-field {
    margin-bottom: 18px;
}

.kundli-field label {
    display: block;

    margin-bottom: 8px;

    font-size: 12px;
    font-weight: 700;

    letter-spacing: 0.6px;

    opacity: 0.72;
}

.kundli-field label span {
    color: #ffe600;
}

.kundli-field input {
    width: 100%;
    height: 48px;

    padding: 0 14px;

    border-radius: 11px;

    border: 1px solid rgba(255, 255, 255, 0.18);

    background:
        rgba(255, 255, 255, 0.08);

    color: white;

    outline: none;

    font-size: 14px;
}

.kundli-field input::placeholder {
    color: rgba(255, 255, 255, 0.48);
}

.kundli-field input:focus {
    border-color: #ffe600;
}

.kundli-field input[type="date"],
.kundli-field input[type="time"] {
    color-scheme: dark;
}


/* GENDER (read-only pill for matching form) */

.match-gender-pill {
    display: inline-flex;
    align-items: center;

    height: 48px;
    padding: 0 16px;

    border-radius: 11px;

    border: 1px solid rgba(255, 255, 255, 0.18);

    background: rgba(255, 255, 255, 0.08);

    font-weight: 600;
}


/* GENERATE BUTTON */

.match-kundli-btn {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 12px;

    width: 260px;
    height: 50px;

    margin: 8px auto 0;

    border: 0;

    border-radius: 30px;

    background:
        linear-gradient(90deg,
            #fff18b,
            #ffe52f);

    color: #111;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 10px 30px rgba(255, 222, 39, 0.25);
}

.match-kundli-btn span {
    font-size: 22px;
}

.match-kundli-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


/* ERROR */

.kundli-error {
    margin: 5px 0 15px;

    padding: 10px 12px;

    border-radius: 8px;

    background:
        rgba(255, 50, 50, 0.12);

    color: #ff9b9b;

    font-size: 13px;
}


/* SEARCH */

.kundli-search {
    display: flex;

    align-items: center;

    gap: 10px;

    height: 48px;

    padding: 0 14px;

    border-radius: 12px;

    border: 1px solid rgba(255, 255, 255, 0.16);

    background:
        rgba(255, 255, 255, 0.07);

    margin-bottom: 20px;
}

.kundli-search span {
    font-size: 22px;
    opacity: 0.6;
}

.kundli-search input {
    flex: 1;

    border: 0;

    outline: none;

    background: transparent;

    color: white;

    font-size: 14px;
}

.kundli-search input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.saved-match-card h3 {
    font-size: 14px;
    margin-bottom: 12px;
}


/* EMPTY */

.no-match {
    min-height: 230px;

    display: flex;

    align-items: center;
    justify-content: center;

    text-align: center;
}

.no-match p {
    opacity: 0.65;
    font-size: 14px;
}


/* LIST */

.saved-match-list {
    display: flex;

    flex-direction: column;

    gap: 8px;

    max-height: 460px;

    overflow-y: auto;
}


/* ITEM */

.saved-match-item {
    display: flex;

    align-items: center;

    gap: 12px;

    padding: 12px;

    border-radius: 12px;

    cursor: pointer;

    border: 1px solid rgba(255, 255, 255, 0.12);

    background:
        rgba(255, 255, 255, 0.07);
}

.kundli-avatar {
    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #f6a027;

    color: white;

    font-size: 17px;
    font-weight: 700;
}

.kundli-avatar.girl {
    background: #ff6f9c;
}

.match-avatars {
    display: flex;
    flex: 0 0 auto;
}

.match-avatars .kundli-avatar {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    font-size: 15px;

    border: 2px solid #150d09;
}

.match-avatars .kundli-avatar.girl {
    margin-left: -14px;
}


/* INFO */

.saved-match-info {
    min-width: 0;

    flex: 1;

    display: flex;

    flex-direction: column;

    gap: 2px;
}

.saved-match-info strong {
    font-size: 14px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

.saved-match-info span {
    font-size: 12px;

    opacity: 0.6;
}

.match-score-chip {
    flex: 0 0 auto;

    padding: 4px 10px;

    border-radius: 20px;

    font-size: 12px;
    font-weight: 700;

    background: rgba(255, 230, 0, 0.15);
    color: #ffe600;
}


/* DELETE */

.delete-kundli-btn {
    border: 0;

    background: transparent;

    color: rgba(255, 255, 255, 0.5);

    cursor: pointer;

    padding: 8px;
}

.delete-kundli-btn:hover {
    color: #ff7676;
}


/* =========================================================
    RESULT / DETAIL PAGE
========================================================= */

.match-detail-page {
    min-height: 100vh;
    padding: 100px 20px 60px;
}

.match-detail-container {
    max-width: 1000px;
    margin: 0 auto;
}

.match-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 20px;

    background: none;
    border: 0;

    color: #ffe600;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
}

/* REPORT HEADER */

.report-header {
    text-align: center;
    margin-bottom: 26px;
}

.report-header h1 {
    margin: 0 0 22px;

    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;

    background:
        linear-gradient(90deg,
            #ff9bc4,
            #ffd1ba);

    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.report-people-row {
    position: relative;

    display: flex;
    align-items: flex-start;
    justify-content: center;

    gap: 48px;
}

.report-people-line {
    position: absolute;

    top: 30px;
    left: 50%;

    transform: translateX(-50%);

    width: min(340px, 70%);
    height: 1px;

    background: rgba(255, 255, 255, 0.18);

    z-index: 0;
}

.report-person {
    position: relative;
    z-index: 1;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.report-person span {
    font-size: 13px;
    font-weight: 600;
}

.report-person.compat span {
    opacity: 0.65;
}

.report-avatar-circle {
    width: 60px;
    height: 60px;

    flex: 0 0 60px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #3a86ff;

    color: white;

    font-size: 22px;
    font-weight: 700;

    border: 3px solid #150d09;
}

.report-avatar-circle.girl {
    background: #ff6f9c;
}

.report-avatar-circle.compat-circle {
    width: 44px;
    height: 44px;

    flex: 0 0 44px;

    background: rgba(255, 255, 255, 0.08);

    font-size: 18px;

    margin-top: 8px;
}

.report-avatar-circle.small {
    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    font-size: 16px;

    border-width: 2px;
}


/* DETAIL CARDS */

.report-detail-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr) minmax(0, 1fr);

    gap: 16px;

    margin-bottom: 20px;
}

.report-detail-card {
    padding: 18px 20px;

    border-radius: 16px;

    background: linear-gradient(
        135deg,
        rgba(255,255,255,.08),
        rgba(255,255,255,.03)
    );

    border: 1px solid rgba(255,255,255,.15);
}

.report-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 14px;
}

.report-detail-header strong {
    display: block;
    font-size: 15px;
}

.report-detail-label {
    display: block;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 0.6px;
    text-transform: uppercase;

    opacity: 0.55;

    margin-bottom: 2px;
}

.report-detail-body {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 8px 16px;

    font-size: 13px;
}

.report-detail-body .full {
    grid-column: 1 / -1;
}

.report-detail-body span {
    opacity: 0.55;
    margin-right: 4px;
}


/* SCORE CARD */

.report-score-card {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 10px;

    padding: 34px 24px;
    margin-bottom: 20px;

    border-radius: 20px;

    text-align: center;

    background: linear-gradient(
        135deg,
        rgba(255, 230, 0, 0.16),
        rgba(255, 255, 255, 0.03)
    );

    border: 1px solid rgba(255, 230, 0, 0.25);
}

.report-score-title {
    font-size: 12px;
    font-weight: 700;

    letter-spacing: 0.6px;
    text-transform: uppercase;

    opacity: 0.55;
}


/* SCORE RING */

.score-ring {
    --pct: 0;

    width: 150px;
    height: 150px;

    border-radius: 50%;

    padding: 8px;
    box-sizing: border-box;

    background: conic-gradient(
        #ffcf3f calc(var(--pct) * 1%),
        rgba(255, 255, 255, 0.1) 0
    );

    display: flex;
    align-items: center;
    justify-content: center;
}

.score-ring-inner {
    width: 100%;
    height: 100%;

    border-radius: 50%;

    background: #0d0a08;

    display: flex;
    align-items: center;
    justify-content: center;
}

.score-ring-value {
    font-size: 36px;
    font-weight: 800;

    color: #ffd76a;
}

.score-ring-value small {
    font-size: 16px;
    font-weight: 700;

    opacity: 0.6;

    margin-left: 2px;
}

.score-ring-placeholder {
    width: 150px;
    height: 150px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255, 255, 255, 0.15);

    font-size: 14px;
    opacity: 0.7;
}

.report-score-quality {
    font-size: 14px;
    font-weight: 700;

    padding: 6px 16px;

    border-radius: 20px;

    background: rgba(255, 255, 255, 0.08);
}

.match-score-label {
    font-size: 14px;
    font-weight: 700;

    padding: 6px 16px;

    border-radius: 20px;

    background: rgba(255, 255, 255, 0.08);
}

.match-score-secondary {
    font-size: 12px;
    opacity: 0.65;
}

.match-conclusion {
    font-size: 14px;
    line-height: 1.7;

    opacity: 0.85;

    max-width: 560px;
}

.match-section-card {
    padding: 24px;
    margin-bottom: 20px;

    border-radius: 16px;

    background: linear-gradient(
        135deg,
        rgba(255,255,255,.08),
        rgba(255,255,255,.03)
    );

    border: 1px solid rgba(255,255,255,.15);
}

.match-section-card h2 {
    margin: 0 0 18px;
    font-size: 18px;
}

.koota-table {
    width: 100%;
    border-collapse: collapse;
}

.koota-table th,
.koota-table td {
    padding: 10px 12px;

    text-align: left;

    font-size: 13px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.koota-table th {
    opacity: 0.6;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.4px;
    font-size: 11px;
}

.koota-table td.koota-points {
    font-weight: 700;
    color: #ffe600;

    white-space: nowrap;
}


/* GUNA MILAN TABLE */

.koota-table-wrap {
    overflow-x: auto;
}

.guna-table {
    min-width: 640px;
}

.guna-subtitle {
    font-size: 11px;
    opacity: 0.55;
}

.guna-description {
    opacity: 0.75;
}

.guna-points-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    border-radius: 50%;

    font-size: 11px;
    font-weight: 700;

    white-space: nowrap;
}

.guna-points-badge.good {
    color: #6be08a;
    background: rgba(90, 220, 130, 0.12);
    border: 2px solid rgba(90, 220, 130, 0.6);
}

.guna-points-badge.partial {
    color: #ffb066;
    background: rgba(255, 176, 102, 0.12);
    border: 2px solid rgba(255, 176, 102, 0.6);
}

.guna-points-badge.bad {
    color: #ff8a8a;
    background: rgba(255, 60, 60, 0.1);
    border: 2px solid rgba(255, 100, 100, 0.55);
}


/* DOSHA PERSON CARDS */

.dosha-person-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 14px;

    margin-bottom: 14px;
}

.dosha-person-card {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 14px 16px;

    border-radius: 14px;

    background: rgba(255, 255, 255, 0.05);

    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dosha-person-card.has-dosha {
    border-color: rgba(255, 100, 100, 0.35);
    background: rgba(255, 60, 60, 0.08);
}

.dosha-person-card.no-dosha {
    border-color: rgba(90, 220, 130, 0.3);
    background: rgba(60, 200, 100, 0.08);
}

.dosha-person-info {
    min-width: 0;
    flex: 1;

    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dosha-person-info strong {
    font-size: 14px;
}

.dosha-person-value {
    font-size: 11px;
    opacity: 0.65;
}

.dosha-status-dot {
    width: 10px;
    height: 10px;

    flex: 0 0 10px;

    border-radius: 50%;
}

.dosha-status-dot.good {
    background: #5adc82;
    box-shadow: 0 0 8px rgba(90, 220, 130, 0.6);
}

.dosha-status-dot.bad {
    background: #ff5c5c;
    box-shadow: 0 0 8px rgba(255, 92, 92, 0.6);
}

.dosha-description {
    margin: 0;

    font-size: 13px;
    line-height: 1.6;

    opacity: 0.75;
}

.match-raw-json {
    max-height: 420px;
    overflow: auto;

    padding: 16px;

    border-radius: 12px;

    background: rgba(0, 0, 0, 0.35);

    font-size: 12px;
    line-height: 1.6;

    white-space: pre-wrap;
    word-break: break-word;
}

.match-detail-loading,
.match-not-found {
    min-height: 60vh;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;
}


/* MOBILE */

@media (max-width: 768px) {
    .kundli-match-page,
    .match-detail-page {
        padding: 90px 14px 40px;
    }

    .kundli-match-heading h1 {
        font-size: 30px;
    }

    .kundli-match-intro-card {
        padding: 22px;
    }

    .kundli-match-grid {
        grid-template-columns: 1fr;
    }

    .kundli-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .new-match-card,
    .saved-match-card {
        min-height: auto;
    }

    .match-kundli-btn {
        width: 100%;
    }

    .report-people-row {
        gap: 24px;
    }

    .report-avatar-circle {
        width: 48px;
        height: 48px;
        flex: 0 0 48px;
        font-size: 18px;
    }

    .report-detail-grid {
        grid-template-columns: 1fr;
    }

    .score-ring,
    .score-ring-placeholder {
        width: 120px;
        height: 120px;
    }

    .score-ring-value {
        font-size: 28px;
    }

    .dosha-person-grid {
        grid-template-columns: 1fr;
    }
}
