/* ===== KUNDLI MILAN CALCULATOR - Tool Specific CSS ===== */

/* ---- Form Box ---- */
.km-form-box {
    background: linear-gradient(135deg, #1a0030, #3d0066, #1a0030);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(61, 0, 102, 0.45);
}

.km-form-box h2 {
    color: #f9a8d4;
    font-size: 22px;
    margin-bottom: 26px;
    text-align: center;
}

.km-persons-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: start;
    margin-bottom: 26px;
}

/* Person Cards */
.km-person-card {
    background: rgba(255,255,255,0.08);
    border: 1.5px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    padding: 22px 18px;
    transition: border-color 0.2s;
}

.km-person-card:hover {
    border-color: rgba(249,168,212,0.5);
}

.km-person1 { border-top: 3px solid #60a5fa; }
.km-person2 { border-top: 3px solid #f472b6; }

.km-person-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.km-person-icon { font-size: 26px; }

.km-person-label {
    font-size: 15px;
    font-weight: 700;
    color: #e2e8f0;
}

.km-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.km-field-group:last-child { margin-bottom: 0; }

.km-field-group label {
    font-size: 13px;
    font-weight: 600;
    color: #c084fc;
}

.km-field-group input {
    padding: 11px 13px;
    background: rgba(255,255,255,0.1);
    border: 1.5px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    transition: border-color 0.2s;
}

.km-field-group input::placeholder { color: rgba(255,255,255,0.35); }

.km-field-group input:focus {
    outline: none;
    border-color: #f9a8d4;
    background: rgba(255,255,255,0.15);
}

.km-field-group input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

/* Heart Divider */
.km-heart-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 40px;
    gap: 8px;
}

.km-heart-icon {
    font-size: 36px;
    animation: heartbeat 1.4s ease-in-out infinite;
}

@keyframes heartbeat {
    0%,100% { transform: scale(1); }
    50%      { transform: scale(1.2); }
}

.km-vs-text {
    font-size: 13px;
    font-weight: 800;
    color: rgba(249,168,212,0.7);
    letter-spacing: 2px;
}

/* Calc Button */
.km-calc-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #ec4899, #a855f7);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4);
}

.km-calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(236, 72, 153, 0.55);
}

/* ---- Result ---- */
.km-result {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    box-shadow: 0 6px 30px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

/* Result Header */
.km-res-header {
    padding: 28px 32px 24px;
    text-align: center;
    color: #fff;
}

.km-header-excellent { background: linear-gradient(135deg, #7c3aed, #ec4899); }
.km-header-good      { background: linear-gradient(135deg, #1d4ed8, #7c3aed); }
.km-header-average   { background: linear-gradient(135deg, #d97706, #ea580c); }
.km-header-low       { background: linear-gradient(135deg, #374151, #6b7280); }

.km-res-names {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.km-res-name1 { font-size: 16px; font-weight: 700; }
.km-res-name2 { font-size: 16px; font-weight: 700; }
.km-res-heart { font-size: 28px; animation: heartbeat 1.4s ease-in-out infinite; }

.km-res-score-big {
    font-size: 80px;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 4px 20px rgba(0,0,0,0.2);
    margin-bottom: 6px;
}

.km-res-score-max {
    font-size: 32px;
    opacity: 0.7;
}

.km-res-rating {
    display: inline-block;
    padding: 6px 22px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.km-rating-excellent { background: rgba(255,255,255,0.25); }
.km-rating-good      { background: rgba(255,255,255,0.2); }
.km-rating-average   { background: rgba(255,255,255,0.2); }
.km-rating-low       { background: rgba(255,255,255,0.15); }

.km-res-pct-bar {
    height: 12px;
    background: rgba(255,255,255,0.2);
    border-radius: 999px;
    overflow: hidden;
    max-width: 400px;
    margin: 0 auto 8px;
}

.km-res-pct-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 1s ease;
}

.km-pct-excellent { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.km-pct-good      { background: linear-gradient(90deg, #34d399, #10b981); }
.km-pct-average   { background: linear-gradient(90deg, #fcd34d, #f59e0b); }
.km-pct-low       { background: linear-gradient(90deg, #f87171, #ef4444); }

.km-res-pct-text {
    font-size: 14px;
    opacity: 0.85;
    margin-bottom: 12px;
    font-weight: 600;
}

.km-res-msg {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

/* Nakshatras row */
.km-nk-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: center;
    padding: 20px 28px;
    background: linear-gradient(135deg, #fdf4ff, #fce4f6);
    border-bottom: 2px solid #f3e8ff;
}

.km-nk-box { text-align: center; }

.km-nk-who {
    font-size: 13px;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 4px;
}

.km-nk-name {
    font-size: 16px;
    font-weight: 800;
    color: #4c1d95;
    margin-bottom: 4px;
}

.km-nk-detail {
    font-size: 12px;
    color: #7c3aed;
}

.km-nk-sep {
    font-size: 28px;
    opacity: 0.6;
}

/* Areas */
.km-areas-section {
    padding: 22px 28px;
    border-bottom: 2px solid #f3f4f6;
}

.km-sec-title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
}

.km-areas-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.km-area-card {
    border-radius: 14px;
    padding: 16px 12px;
    text-align: center;
    border: 2px solid transparent;
}

.km-area-card.area-good  { background: #f0fdf4; border-color: #bbf7d0; }
.km-area-card.area-avg   { background: #fefce8; border-color: #fde68a; }
.km-area-card.area-low   { background: #fff5f5; border-color: #fecaca; }

.km-area-icon  { font-size: 26px; margin-bottom: 6px; }
.km-area-label { font-size: 12px; font-weight: 700; color: #374151; margin-bottom: 6px; }

.km-area-score {
    font-size: 20px;
    font-weight: 900;
    color: #1f2937;
}

.area-good  .km-area-score { color: #166534; }
.area-avg   .km-area-score { color: #92400e; }
.area-low   .km-area-score { color: #991b1b; }

/* Manglik */
.km-manglik-box {
    padding: 16px 28px;
    border-bottom: 2px solid #f3f4f6;
}

.km-manglik-box.manglik-none { background: #f0fdf4; }
.km-manglik-box.manglik-both { background: #f0fdf4; }
.km-manglik-box.manglik-one  { background: #fff7ed; }

.km-manglik-title {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
}

.km-manglik-msg { font-size: 14px; color: #374151; line-height: 1.6; }

/* Koots Section */
.km-koots-section {
    padding: 22px 28px;
    border-bottom: 2px solid #f3f4f6;
}

.km-koot-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #f3f4f6;
}

.km-koot-row:last-child { border-bottom: none; }

.km-koot-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.km-koot-icon2 { font-size: 22px; flex-shrink: 0; }

.km-koot-title {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 2px;
}

.km-koot-detail-text {
    font-size: 12px;
    color: #6b7280;
}

.km-koot-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.km-koot-bar-wrap {
    width: 120px;
    height: 8px;
    background: #f3f4f6;
    border-radius: 999px;
    overflow: hidden;
}

.km-koot-bar {
    height: 100%;
    border-radius: 999px;
    transition: width 0.8s ease;
}

.bar-good { background: linear-gradient(90deg, #34d399, #10b981); }
.bar-avg  { background: linear-gradient(90deg, #fcd34d, #f59e0b); }
.bar-low  { background: linear-gradient(90deg, #f87171, #ef4444); }

.km-koot-score {
    font-size: 14px;
    font-weight: 800;
    color: #1f2937;
    min-width: 36px;
    text-align: right;
}

/* Advice */
.km-advice-box {
    background: linear-gradient(135deg, #fffbf0, #fef3c7);
    padding: 20px 28px;
    border-top: 2px solid #fde68a;
}

.km-advice-title {
    font-size: 16px;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 12px;
}

.km-adv-line {
    font-size: 14px;
    color: #78350f;
    line-height: 1.7;
    padding: 5px 0;
    border-bottom: 1px solid #fde68a;
}

.km-adv-line:last-child { border-bottom: none; }

/* ---- Koot Info Grid ---- */
.km-koot-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.km-koot-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    border: 2px solid #f3e8ff;
    transition: all 0.2s;
}

.km-koot-card:hover {
    border-color: #c084fc;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(192, 132, 252, 0.2);
}

.km-koot-num {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
}

.km-koot-name {
    font-size: 14px;
    font-weight: 800;
    color: #4c1d95;
    margin-bottom: 4px;
}

.km-koot-pts {
    font-size: 12px;
    color: #a855f7;
    font-weight: 700;
    margin-bottom: 6px;
    background: #f5f3ff;
    border-radius: 12px;
    padding: 2px 8px;
    display: inline-block;
}

.km-koot-desc {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
}

/* ---- Info / Features shared ---- */
.info-box {
    background: linear-gradient(135deg, #fdf4ff, #fce4f6);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
}

.info-box h4 {
    color: #6b21a8;
    font-size: 20px;
    margin-bottom: 18px;
}

.features-box {
    background: linear-gradient(135deg, #fff1f2, #ffe4e6);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
}

.features-box h4 {
    color: #881337;
    font-size: 20px;
    margin-bottom: 16px;
}

.features-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.features-box ul li {
    font-size: 14px;
    color: #374151;
    padding-left: 20px;
    position: relative;
    line-height: 1.6;
}

.features-box ul li::before {
    content: '💖';
    position: absolute;
    left: 0;
    font-size: 12px;
}

.features-box ul li strong { color: #9f1239; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .km-koot-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
    .km-persons-grid { grid-template-columns: 1fr; gap: 12px; }
    .km-heart-divider { flex-direction: row; padding-top: 0; padding: 6px 0; justify-content: center; }
    .km-koot-grid { grid-template-columns: repeat(2, 1fr); }
    .km-areas-grid { grid-template-columns: repeat(2, 1fr); }
    .km-nk-row { grid-template-columns: 1fr; text-align: center; gap: 10px; }
    .km-nk-sep { display: none; }
    .km-koot-bar-wrap { width: 80px; }
    .km-res-score-big { font-size: 60px; }
    .km-koots-section,
    .km-areas-section { padding: 16px 18px; }
    .km-advice-box { padding: 18px 18px; }
    .km-res-names { flex-direction: column; gap: 8px; }
}

@media (max-width: 480px) {
    .km-form-box { padding: 22px 14px; }
    .km-koot-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .km-areas-grid { grid-template-columns: repeat(2, 1fr); }
    .km-koot-bar-wrap { width: 60px; }
    .km-res-header { padding: 22px 18px; }
    .km-res-score-big { font-size: 52px; }
}