/*
  Author: Yogabrata Mukhopadhyay
  Organization: Brahmexa
  Copyright: Copyright (c) 2026 Brahmexa. All rights reserved.

  Brahmexa circular-universe theme for the Vedic Horoscope & Kundali utility.
  Planet cores are dark; titles and subtitles are light. Never pair dark text
  with a dark fill, or cream text with a cream field.
*/

:root {
  --ym-void: #080b14;
  --ym-navy: #0b1c2c;
  --ym-ink: #0b1c2c;
  --ym-cream: #f6efe2;
  --ym-paper: #fffef8;
  --ym-gold: #f59e0b;
  --ym-gold-deep: #b45309;
  --ym-cyan: #38bdf8;
  --ym-purple: #8b5cf6;
  --ym-teal: #14b8a6;
  --ym-text-on-dark: #fffef8;
  --ym-sub-on-dark: #fde68a;
  --ym-muted-on-light: #44403c;
  --ym-font: "Source Sans 3", Inter, "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body.ym-kundali {
  margin: 0;
  min-height: 100vh;
  font-family: var(--ym-font);
  color: var(--ym-ink);
  background-color: var(--ym-cream);
  background-image:
    radial-gradient(circle at 50% 8%, rgba(245, 158, 11, 0.18) 0%, transparent 42%),
    radial-gradient(circle at 12% 48%, rgba(139, 92, 246, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 88% 82%, rgba(56, 189, 248, 0.14) 0%, transparent 42%);
  line-height: 1.6;
}

.ym-kundali {
  color: var(--ym-ink);
  font-family: var(--ym-font);
  background-image:
    radial-gradient(circle at 50% 8%, rgba(245, 158, 11, 0.16) 0%, transparent 42%),
    radial-gradient(circle at 12% 48%, rgba(139, 92, 246, 0.10) 0%, transparent 40%),
    radial-gradient(circle at 88% 82%, rgba(56, 189, 248, 0.12) 0%, transparent 42%);
  border-radius: 1.5rem;
}

.ym-kundali a { color: var(--ym-gold-deep); }
.ym-kundali a:hover { color: var(--ym-navy); }

.ym-kundali .crumbs {
  color: var(--ym-muted-on-light);
  margin-bottom: 1rem;
}
.ym-kundali .crumbs a { color: var(--ym-gold-deep); }

.ym-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
}

.ym-site-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  color: var(--ym-navy);
}

.ym-site-bar a {
  color: var(--ym-navy);
  text-decoration: none;
  font-weight: 700;
}

.ym-site-bar a:hover { color: var(--ym-gold-deep); }

/* ----- Orbit planet (screenshot grid, high-contrast cores) ----- */
.ym-planet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  justify-items: center;
  align-items: center;
  padding: 1rem 0 2rem;
}

.ym-planet-wrap {
  position: relative;
  width: min(280px, 86vw);
  height: min(280px, 86vw);
  display: grid;
  place-items: center;
  text-decoration: none;
  color: inherit;
}

.ym-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  border: 1.5px dashed rgba(14, 116, 144, 0.22);
}

.ym-ring--a { inset: 0; border-color: rgba(20, 184, 166, 0.28); }
.ym-ring--b { inset: 8%; border-color: rgba(139, 92, 246, 0.22); animation: ym-spin 42s linear infinite reverse; }
.ym-ring--c { inset: 16%; border-style: solid; border-color: rgba(245, 158, 11, 0.28); animation: ym-spin 28s linear infinite; }

.ym-ring::before,
.ym-ring::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.ym-ring--a::before { top: 6%; left: 50%; background: #2dd4bf; box-shadow: 0 0 8px #2dd4bf; }
.ym-ring--a::after { bottom: 10%; right: 12%; background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.ym-ring--b::before { top: 18%; right: 8%; background: #a78bfa; box-shadow: 0 0 8px #a78bfa; }
.ym-ring--c::after { bottom: 4%; left: 22%; background: #38bdf8; box-shadow: 0 0 8px #38bdf8; }

.ym-planet {
  position: relative;
  z-index: 2;
  width: 68%;
  height: 68%;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem 0.85rem;
  color: var(--ym-text-on-dark);
  border: 2px solid rgba(255, 254, 248, 0.42);
  box-shadow:
    inset 0 2px 8px rgba(255, 255, 255, 0.22),
    inset 0 -10px 22px rgba(0, 0, 0, 0.45),
    0 14px 28px rgba(11, 28, 44, 0.28);
  transition: transform 0.25s ease;
}

a.ym-planet-wrap:hover .ym-planet,
button.ym-planet-wrap:hover .ym-planet {
  transform: scale(1.04);
}

.ym-planet__icon {
  font-size: 1.45rem;
  line-height: 1;
  margin-bottom: 0.35rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.55));
}

.ym-planet__title,
.ym-planet .zodiac-card-value,
.ym-planet .attribute-box span {
  color: var(--ym-text-on-dark);
  font-weight: 800;
  font-size: 0.98rem;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.ym-planet__sub,
.ym-planet .zodiac-card-label,
.ym-planet .attribute-box label {
  color: var(--ym-sub-on-dark);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-top: 0.3rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.ym-planet--teal {
  background: linear-gradient(160deg, #2dd4bf 0%, #115e59 48%, #042f2e 100%);
}
.ym-planet--violet {
  background: linear-gradient(160deg, #c4b5fd 0%, #6d28d9 46%, #2e1065 100%);
}
.ym-planet--navy {
  background: linear-gradient(160deg, #7dd3fc 0%, #1e3a5f 48%, #0b1c2c 100%);
}
.ym-planet--gold {
  background: linear-gradient(160deg, #b45309 0%, #7c2d12 52%, #431407 100%);
}
.ym-planet--rose {
  background: linear-gradient(160deg, #fda4af 0%, #9f1239 50%, #4c0519 100%);
}
.ym-planet--cyan {
  background: linear-gradient(160deg, #22d3ee 0%, #0e7490 50%, #083344 100%);
}

.ym-planet-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.ym-planet-grid--3 .ym-planet-wrap {
  width: min(240px, 86vw);
  height: min(240px, 86vw);
}

/* ----- Hero with circular painting ----- */
.ym-hero {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2rem;
}

.ym-hero-art {
  position: relative;
  width: min(340px, 82vw);
  height: min(340px, 82vw);
  margin: 0 auto;
}

.ym-hero-art .ym-ring { border-width: 2px; }

.ym-hero-photo {
  position: relative;
  z-index: 2;
  width: 72%;
  height: 72%;
  margin: 14% auto 0;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fffef8;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.55), 0 18px 40px rgba(11, 28, 44, 0.35);
  display: block;
}

.ym-hero-copy h1 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.15;
  margin: 0 0 0.6rem;
  color: var(--ym-navy);
}

.ym-hero-copy p {
  margin: 0;
  max-width: 52ch;
  color: var(--ym-muted-on-light);
  font-size: 1.05rem;
}

.ym-kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ym-gold-deep);
  margin-bottom: 0.4rem;
}

/* ----- Glass / paper cards on cream (dark ink, never dark-on-dark) ----- */
.ym-card {
  background: var(--ym-paper);
  color: var(--ym-ink);
  border: 1px solid rgba(11, 28, 44, 0.12);
  border-radius: 1.1rem;
  padding: 1.5rem 1.4rem;
  box-shadow: 0 16px 36px rgba(11, 28, 44, 0.08);
  margin-bottom: 1.35rem;
}

.ym-card h2,
.ym-card h3,
.ym-card .card-title {
  margin: 0 0 1rem;
  color: var(--ym-navy);
  font-size: 1.28rem;
}
.ym-util-intro {
  margin: 0 0 1.2rem;
  color: var(--ym-ink);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 68ch;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: relative;
}

.form-group label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ym-navy);
}

.form-control {
  background: #fffef8;
  color: var(--ym-navy);
  border: 1px solid rgba(11, 28, 44, 0.22);
  border-radius: 0.55rem;
  padding: 0.7rem 0.9rem;
  font: inherit;
  min-height: 44px;
}

.form-control:focus {
  outline: 3px solid rgba(245, 158, 11, 0.45);
  border-color: var(--ym-gold-deep);
}

.form-control::placeholder { color: #78716c; }

.search-results-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fffef8;
  color: var(--ym-navy);
  border: 1px solid var(--ym-gold-deep);
  border-radius: 0.5rem;
  max-height: 220px;
  overflow-y: auto;
  z-index: 40;
  box-shadow: 0 12px 28px rgba(11, 28, 44, 0.18);
}

.search-result-item {
  padding: 0.65rem 0.9rem;
  cursor: pointer;
  color: var(--ym-navy);
  border-bottom: 1px solid rgba(11, 28, 44, 0.08);
}

.search-result-item:hover {
  background: #0b1c2c;
  color: #fffef8;
}

.form-actions { margin-top: 1.2rem; display: flex; flex-wrap: wrap; gap: 0.7rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.65rem 1.3rem;
  border-radius: 999px;
  border: 0;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #fcd34d, #d97706);
  color: #0b1c2c;
  box-shadow: 0 8px 18px rgba(180, 83, 9, 0.28);
}

.btn-primary:hover { filter: brightness(1.05); }

.btn-secondary {
  background: var(--ym-navy);
  color: #fffef8;
  border: 1px solid var(--ym-navy);
}

.btn-secondary:hover { background: #12263a; }

.ym-note {
  font-size: 0.88rem;
  color: var(--ym-muted-on-light);
  margin-top: 0.8rem;
}

.dashboard-user-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(11, 28, 44, 0.1);
}

.user-name-title { margin: 0; color: var(--ym-navy); font-size: 1.7rem; }
.user-birth-subtitle { margin: 0.2rem 0 0; color: var(--ym-muted-on-light); }

.main-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
}

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

.attribute-box {
  background: var(--ym-navy);
  color: var(--ym-text-on-dark);
  border-radius: 0.85rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(255, 254, 248, 0.18);
}

.attribute-box label {
  display: block;
  color: var(--ym-sub-on-dark);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.attribute-box span {
  color: var(--ym-text-on-dark);
  font-weight: 700;
}

.strength-card { margin-bottom: 0.85rem; }
.strength-header {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  color: var(--ym-navy);
  font-size: 0.9rem;
}
.strength-bar-bg {
  height: 10px;
  background: rgba(11, 28, 44, 0.12);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.3rem;
}
.strength-bar-fill { height: 100%; border-radius: 999px; }
.strength-desc { margin: 0.25rem 0 0; font-size: 0.78rem; color: var(--ym-muted-on-light); }

.ym-score {
  background: var(--ym-navy);
  color: var(--ym-sub-on-dark);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-weight: 800;
  font-size: 0.88rem;
}

.chart-mode-toggle {
  display: flex;
  gap: 0.35rem;
  background: var(--ym-cream);
  padding: 0.25rem;
  border-radius: 999px;
  border: 1px solid rgba(11, 28, 44, 0.12);
}

.toggle-btn {
  border: 0;
  background: transparent;
  color: var(--ym-navy);
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
}

.toggle-btn.active {
  background: var(--ym-navy);
  color: #fffef8;
}

.chart-container { display: flex; justify-content: center; }
canvas#kundaliCanvas {
  max-width: 420px;
  width: 100%;
  height: auto;
  border-radius: 1rem;
  background: #fffef8;
  border: 2px solid var(--ym-navy);
}

.detail-block {
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  background: #fffaf3;
  border: 1px solid rgba(11, 28, 44, 0.1);
  border-radius: 0.85rem;
}

.detail-block h4 { margin: 0 0 0.45rem; color: var(--ym-navy); }
.detail-block p { margin: 0; color: var(--ym-ink); }

.planets-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.planets-table th, .planets-table td {
  padding: 0.7rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid rgba(11, 28, 44, 0.1);
  color: var(--ym-ink);
}
.planets-table th {
  background: var(--ym-navy);
  color: var(--ym-sub-on-dark);
}

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

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

@keyframes ym-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .ym-ring--b, .ym-ring--c { animation: none; }
}

@media (max-width: 900px) {
  .ym-hero, .main-dashboard-grid { grid-template-columns: 1fr; }
  .ym-planet-grid,
  .ym-planet-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .ym-planet-grid,
  .ym-planet-grid--3 { grid-template-columns: 1fr; }
}

@media print {
  body.ym-kundali, .ym-kundali {
    background: #fff !important;
    color: #111 !important;
  }
  .ym-site-bar, .ym-hero-art, .btn, .chart-mode-toggle, #horoscopeForm { display: none !important; }
  .ym-card, .detail-block, .attribute-box {
    background: #fff !important;
    color: #111 !important;
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
  .ym-planet, .attribute-box span, .attribute-box label,
  .ym-planet__title, .ym-planet__sub, .planets-table th {
    color: #111 !important;
    text-shadow: none !important;
    background: #fff !important;
  }
}
