@import url('/common/css/site.css');

.container > header {
    padding: 2.5rem 1rem 1.5rem;
    margin-bottom: 1rem;
    background: transparent;
    border-bottom: none;
}

.container > header::before {
    display: none;
}

.container > header h1 {
    background: linear-gradient(135deg, #6ab8d2 0%, #4ea6ca 50%, #6b8fd1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.astro-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
}

.astro-info {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.astro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.astro-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.astro-card:hover {
    border-color: var(--border-accent);
    background: var(--bg-card-hover);
    box-shadow: var(--glow-accent);
    transform: translateY(-3px);
}

.astro-card h2,
.astro-card h3 {
    margin-bottom: 0.6rem;
    color: var(--text-primary);
}

.astro-card i {
    color: var(--accent-primary);
}

.astro-card p {
    color: var(--text-secondary);
}

/* ─── Hub Sections ──────────────────────────────────────────────────────────── */
.astro-section {
    margin-bottom: 2rem;
}

.astro-section h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

/* ─── Featured Beginner Section ─────────────────────────────────────────────── */
.astro-featured {
    margin-bottom: 2.5rem;
}

.astro-featured h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.astro-card--featured {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    border: 1px solid var(--border-accent);
    background: rgba(0, 212, 170, 0.03);
}

.astro-card--featured:hover {
    background: rgba(0, 212, 170, 0.07);
}

.astro-card__icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.15), rgba(107, 143, 209, 0.15));
    font-size: 1.1rem;
}

.astro-card__icon i {
    color: var(--accent-primary);
}

.astro-card__body {
    flex: 1;
    min-width: 0;
}

.astro-card__body h3 {
    margin-bottom: 0.4rem;
    color: var(--text-primary);
}

.astro-card__body p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.astro-cta {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent-primary);
}

/* ─── Card Wrapper (for info button overlay) ────────────────────────────────── */
.astro-card-wrap {
    position: relative;
}

.astro-info-btn {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    width: 1.6rem;
    height: 1.6rem;
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, border-color 0.2s;
    z-index: 2;
    padding: 0;
}

.astro-info-btn:hover,
.astro-info-btn:focus-visible {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    outline: none;
}

/* ─── Info Modal ────────────────────────────────────────────────────────────── */
.astro-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.astro-modal-overlay[hidden] {
    display: none;
}

.astro-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    max-width: 520px;
    width: 100%;
    padding: 1.75rem;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
}

.astro-modal__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
}

.astro-modal__close:hover { color: var(--text-primary); }

.astro-modal__content h2 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.astro-modal__content h2 i {
    color: var(--accent-primary);
    margin-right: 0.4rem;
}

.astro-modal__badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.15rem 0.55rem;
    border: 1px solid;
    border-radius: var(--radius-xl);
    margin-bottom: 1rem;
}

.astro-modal__info {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.astro-form {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.astro-form .input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.input-group label {
    font-weight: 600;
    color: var(--text-secondary);
}

.input-group input,
.input-group select {
    padding: 0.8rem 0.95rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-family: inherit;
}

.input-group select {
    min-height: 44px;
}

/* Keep native dropdown list readable across browsers/OS themes. */
.input-group select option {
    color: #111111;
    background: #ffffff;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(0, 212, 170, 0.18);
}

.result-card {
    margin-top: 1.25rem;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--accent-primary);
    background: rgba(255, 255, 255, 0.04);
}

.result-card h3 {
    margin-bottom: 0.5rem;
}

.result-card p {
    color: var(--text-secondary);
}

.result-primary {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-secondary);
}

.compat-score {
    font-size: 3rem;
    font-weight: 800;
    margin: 0.3rem 0;
    color: var(--accent-secondary);
}

.compat-band {
    display: inline-block;
    margin-top: 0.4rem;
    padding: 0.25rem 0.7rem;
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    background: rgba(0, 212, 170, 0.08);
    font-size: 0.88rem;
}

.small-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.6rem;
}

.hidden {
    display: none;
}

/* ─── Compat result card: strip default styling so report owns the layout ─── */
#compat-result {
    padding: 0;
    border-left: none;
    background: transparent;
}

/* ─── Compatibility Report Layout ─────────────────────────────────────────── */
.compat-report {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.compat-header {
    text-align: center;
    padding: 0.75rem 0 0.25rem;
}

.compat-summary {
    color: var(--text-secondary);
    margin-top: 0.35rem;
    font-size: 0.93rem;
}

.section-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-subtle);
}

/* ─── Profile Cards ─────────────────────────────────────────────────────────── */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.profile-entry {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin: 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.sign-block {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.sign-block-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.sign-icon { font-size: 0.9rem; }

.sign-title {
    font-weight: 700;
    font-size: 0.93rem;
    color: var(--text-primary);
}

.element-pill {
    font-size: 0.66rem;
    font-weight: 600;
    padding: 0.13rem 0.48rem;
    border-radius: var(--radius-xl);
    border: 1px solid;
    white-space: nowrap;
}

.el-fire  { color: #ff7043; border-color: rgba(255,112,67,.35); background: rgba(255,112,67,.1); }
.el-earth { color: #81c784; border-color: rgba(129,199,132,.35); background: rgba(129,199,132,.1); }
.el-air   { color: #64b5f6; border-color: rgba(100,181,246,.35); background: rgba(100,181,246,.1); }
.el-water { color: #9575cd; border-color: rgba(149,117,205,.35); background: rgba(149,117,205,.1); }

.sign-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.kw {
    font-size: 0.66rem;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: var(--radius-xl);
    padding: 0.1rem 0.38rem;
    color: var(--text-muted);
}

.sign-desc-text {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.62;
    margin: 0;
}

/* ─── Layer Analysis Sections ──────────────────────────────────────────────── */
.layer-analysis {
    background: rgba(255,255,255,.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.layer-analysis-header {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.layer-icon-lg { font-size: 1.3rem; flex-shrink: 0; }

.layer-header-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.layer-title-text {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.layer-signs {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.layer-pct {
    font-size: 1.2rem;
    font-weight: 800;
    flex-shrink: 0;
}

.score-bar-wrap {
    height: 4px;
    background: rgba(255,255,255,.07);
    border-radius: 2px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    border-radius: 2px;
}

.layer-narrative {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.68;
}

.element-insight {
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.9rem;
}

.element-insight strong { font-size: 0.84rem; }

.element-insight p {
    margin: 0.3rem 0 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.62;
}

.harmony-high { background: rgba(0,212,170,.06); border: 1px solid rgba(0,212,170,.2); }
.harmony-mid  { background: rgba(255,217,61,.06); border: 1px solid rgba(255,217,61,.2); }
.harmony-low  { background: rgba(255,107,107,.06); border: 1px solid rgba(255,107,107,.2); }

/* ─── Strengths & Growth Areas ─────────────────────────────────────────────── */
.sc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.sc-heading {
    font-size: 0.78rem;
    font-weight: 700;
    margin: 0 0 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.strengths-heading  { color: #00d4aa; }
.challenges-heading { color: #ffd93d; }

.sc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.sc-item {
    font-size: 0.82rem;
    line-height: 1.58;
    color: var(--text-secondary);
    padding-left: 1.2rem;
    position: relative;
}

.sc-item::before {
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 700;
}

.sc-item.strength::before  { content: "✓"; color: #00d4aa; }
.sc-item.challenge::before { content: "◆"; color: #ffd93d; font-size: 0.62rem; top: 0.24rem; }

/* ─── Narrative Reading ─────────────────────────────────────────────────────── */
.compat-narrative {
    background: rgba(0,212,170,.05);
    border: 1px solid rgba(0,212,170,.15);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.25rem;
}

.compat-narrative h5 {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin: 0 0 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.compat-narrative p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.78;
    margin: 0;
}

/* Shared result layouts for Vedic and numerology pages */
.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.75rem 0 0.9rem;
}

.info-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.22rem 0.62rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-accent);
    background: rgba(0, 212, 170, 0.08);
    color: var(--text-primary);
    font-size: 0.75rem;
    line-height: 1.2;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.8rem;
    margin: 1rem 0;
}

.metric-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.9rem 1rem;
}

.metric-card strong {
    display: block;
    margin: 0.25rem 0 0.15rem;
    color: var(--text-primary);
    font-size: 1rem;
}

.metric-label,
.metric-sub {
    display: block;
    color: var(--text-muted);
    font-size: 0.76rem;
}

.metric-sub {
    color: var(--text-secondary);
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.astro-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
}

.astro-panel h4 {
    margin-bottom: 0.55rem;
}

.astro-panel p:last-child,
.astro-panel ul:last-child {
    margin-bottom: 0;
}

.report-list {
    padding-left: 1.1rem;
    color: var(--text-secondary);
}

.report-list li + li {
    margin-top: 0.45rem;
}

.koot-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.koot-table th,
.koot-table td {
    padding: 0.8rem 0.9rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border-subtle);
}

.koot-table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.koot-table td {
    color: var(--text-secondary);
}

.koot-table tr:last-child td {
    border-bottom: none;
}

.birth-chart-shell {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.02);
}

.birth-chart-svg {
    width: 100%;
    height: auto;
}

.birth-chart-svg rect {
    fill: rgba(255, 255, 255, 0.03);
    stroke: rgba(255, 255, 255, 0.12);
    stroke-width: 1.5;
}

.birth-chart-svg .chart-house-active rect {
    stroke: rgba(0, 212, 170, 0.6);
    fill: rgba(0, 212, 170, 0.08);
}

.birth-chart-svg .chart-core {
    fill: rgba(255, 255, 255, 0.02);
    stroke: rgba(255, 255, 255, 0.08);
}

.birth-chart-svg text {
    fill: #ffffff;
    font-family: inherit;
}

.birth-chart-svg .chart-house-number {
    font-size: 12px;
    opacity: 0.55;
}

.birth-chart-svg .chart-house-label {
    font-size: 13px;
    font-weight: 600;
}

.birth-chart-svg .chart-core-title {
    font-size: 18px;
    font-weight: 700;
}

.birth-chart-svg .chart-core-sub {
    font-size: 14px;
    opacity: 0.82;
}

.section-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ─── Form Validation ───────────────────────────────────────────────────────── */
.input-error {
    border-color: #ef5350 !important;
    box-shadow: 0 0 0 2px rgba(239, 83, 80, 0.18) !important;
}

.input-error-msg {
    display: block;
    font-size: 0.78rem;
    color: #ef5350;
    min-height: 1.1em;
}

/* ─── Location Autocomplete ─────────────────────────────────────────────────── */
.autocomplete-wrap {
    position: relative;
}

.autocomplete-wrap input {
    width: 100%;
    padding: 0.8rem 0.95rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-family: inherit;
}

.autocomplete-wrap input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(0, 212, 170, 0.18);
}

.autocomplete-spinner {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    margin-top: 0.25rem;
    padding: 0;
    list-style: none;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.autocomplete-list li {
    padding: 0.6rem 0.85rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 1px solid var(--border-subtle);
}

.autocomplete-list li:last-child { border-bottom: none; }
.autocomplete-list li:hover,
.autocomplete-list li.active {
    background: rgba(0, 212, 170, 0.08);
    color: var(--text-primary);
}

.autocomplete-empty {
    cursor: default !important;
    color: var(--text-muted) !important;
    font-style: italic;
}

.manual-coords.hidden { display: none; }

.astro-link-btn {
    background: none;
    border: none;
    color: var(--accent-primary);
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0.3rem 0;
    text-decoration: underline;
    margin-bottom: 0.5rem;
}

.astro-link-btn:hover { opacity: 0.8; }

/* ─── Share / Export Actions ─────────────────────────────────────────────────── */
.share-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.share-actions.hidden { display: none; }

.share-btn,
.export-btn {
    font-size: 0.85rem;
    padding: 0.55rem 1rem;
}

.share-btn i,
.export-btn i {
    margin-right: 0.35rem;
}

.share-feedback {
    font-size: 0.82rem;
    color: var(--accent-primary);
    font-weight: 600;
}

.share-feedback.hidden { display: none; }

/* ─── Recommended Next Steps ────────────────────────────────────────────────── */
.astro-recommend {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

.astro-recommend h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.astro-recommend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.astro-recommend-card {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.15rem;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.astro-recommend-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--glow-accent);
    transform: translateY(-2px);
}

.astro-recommend-icon {
    flex-shrink: 0;
    width: 2.2rem;
    height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 212, 170, 0.1);
    color: var(--accent-primary);
    font-size: 0.95rem;
}

.astro-recommend-body {
    flex: 1;
    min-width: 0;
}

.astro-recommend-body h4 {
    margin: 0 0 0.3rem;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.astro-recommend-body p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.55;
    margin: 0 0 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .astro-content {
        padding: 0 0.25rem 1.5rem;
    }
}

@media (max-width: 620px) {
    .profile-grid,
    .sc-grid,
    .analysis-grid {
        grid-template-columns: 1fr;
    }

    .koot-table {
        display: block;
        overflow-x: auto;
    }
}
