/* ==========================================================================
   Tamil Astrology (தமிழ் ஜோதிடம்) - Modern Temple & Cosmic Theme Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;900&family=Mukta+Malar:wght@400;500;600;700;800&family=Noto+Sans+Tamil:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  /* Color Palette */
  --bg-cosmic-dark: #070913;
  --bg-cosmic-gradient: radial-gradient(circle at 50% 0%, #1e112a 0%, #0c0e1a 50%, #05060b 100%);
  --temple-maroon: #881337;
  --temple-maroon-dark: #4c0519;
  --temple-gold: #f59e0b;
  --temple-gold-light: #fde68a;
  --temple-gold-glow: rgba(245, 158, 11, 0.35);
  --gold-gradient: linear-gradient(135deg, #fde68a 0%, #f59e0b 50%, #d97706 100%);
  --gold-border: linear-gradient(135deg, rgba(253, 230, 138, 0.6), rgba(245, 158, 11, 0.2));

  --card-bg: rgba(18, 22, 37, 0.75);
  --card-bg-hover: rgba(26, 32, 53, 0.85);
  --card-border: rgba(245, 158, 11, 0.2);
  --glass-highlight: rgba(255, 255, 255, 0.05);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-gold: #fbbf24;

  --accent-emerald: #10b981;
  --accent-emerald-bg: rgba(16, 185, 129, 0.15);
  --accent-ruby: #f43f5e;
  --accent-ruby-bg: rgba(244, 63, 94, 0.15);
  --accent-saffron: #ea580c;
  --accent-cyan: #06b6d4;

  /* Typography */
  --font-tamil: 'Mukta Malar', 'Noto Sans Tamil', sans-serif;
  --font-english: 'Outfit', sans-serif;
  --font-heading: 'Cinzel', 'Mukta Malar', serif;

  /* Elevation & Glows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 0 25px rgba(245, 158, 11, 0.25);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Variables (Toggleable) */
body.light-theme {
  --bg-cosmic-dark: #faf5eb;
  --bg-cosmic-gradient: radial-gradient(circle at 50% 0%, #fff1f2 0%, #fdf4e3 50%, #f7eed7 100%);
  --card-bg: rgba(255, 255, 255, 0.88);
  --card-bg-hover: rgba(255, 255, 255, 0.98);
  --card-border: rgba(180, 83, 9, 0.25);
  --text-primary: #1e1b4b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-gold: #b45309;
  --shadow-sm: 0 2px 8px rgba(180, 83, 9, 0.08);
  --shadow-md: 0 8px 24px rgba(180, 83, 9, 0.12);
  --shadow-lg: 0 16px 40px rgba(180, 83, 9, 0.15);
}

/* Base Reset & Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-cosmic-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-tamil);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Sacred Yantra / Celestial Particle Background Overlay */
.celestial-bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image: 
    radial-gradient(1px 1px at 20px 30px, #fbbf24, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 150px 180px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 320px 80px, #fbbf24, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 450px 420px, #f59e0b, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 680px 220px, #f43f5e, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 900px 500px, #67e8f9, rgba(0,0,0,0));
  background-size: 800px 800px;
}

/* Main Container */
.app-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1380px;
  margin: 0 auto;
  padding: 16px 20px 80px;
}

/* Header & Navigation */
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.brand-identity {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-emblem {
  width: 52px;
  height: 52px;
  background: var(--gold-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #451a03;
  box-shadow: 0 0 20px var(--temple-gold-glow);
  position: relative;
  animation: pulseGlow 4s infinite alternate;
}

@keyframes pulseGlow {
  0% { transform: scale(1); box-shadow: 0 0 15px rgba(245, 158, 11, 0.3); }
  100% { transform: scale(1.04); box-shadow: 0 0 25px rgba(245, 158, 11, 0.6); }
}

.brand-titles h1 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.5px;
}

.brand-titles p {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: var(--font-english);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-time-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 30px;
  font-size: 13px;
  color: var(--text-gold);
  font-weight: 600;
}

.pulsing-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.btn-ctrl {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.btn-ctrl:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--temple-gold);
  transform: translateY(-2px);
}

/* Auspicious Banner Alert */
.auspicious-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, rgba(136, 19, 55, 0.85), rgba(76, 5, 25, 0.9));
  border: 1px solid rgba(244, 63, 94, 0.3);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.auspicious-info {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
}

.lamp-icon {
  font-size: 22px;
  filter: drop-shadow(0 0 6px #f59e0b);
}

.badge-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.badge-tag.live {
  background: #10b981;
  color: #064e3b;
}

.badge-tag.alert {
  background: #f43f5e;
  color: #ffe4e6;
}

/* Nav Tabs */
.nav-tabs-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 28px;
  scrollbar-width: thin;
}

.nav-tabs-container::-webkit-scrollbar {
  height: 4px;
}

.nav-tabs-container::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.3);
  border-radius: 4px;
}

.nav-tab {
  flex: 1;
  min-width: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
  backdrop-filter: blur(8px);
  text-align: center;
}

.nav-tab .tab-icon {
  font-size: 22px;
  margin-bottom: 4px;
  transition: transform 0.3s ease;
}

.nav-tab .tab-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
}

.nav-tab .tab-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-english);
}

.nav-tab:hover {
  background: var(--card-bg-hover);
  border-color: var(--temple-gold);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.nav-tab:hover .tab-icon {
  transform: scale(1.15);
}

.nav-tab.active {
  background: linear-gradient(145deg, rgba(136, 19, 55, 0.6), rgba(30, 17, 42, 0.8));
  border-color: var(--temple-gold);
  box-shadow: 0 0 20px var(--temple-gold-glow);
}

.nav-tab.active .tab-title {
  color: var(--text-gold);
}

.nav-tab.active .tab-sub {
  color: var(--temple-gold-light);
}

/* Tab Panels */
.tab-panel {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Common Card & Section Layouts */
.section-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.section-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.section-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.astro-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.astro-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(245, 158, 11, 0.15);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-gold);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title-icon {
  font-size: 20px;
}

/* Form Styles */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input, .form-select {
  width: 100%;
  padding: 10px 14px;
  background: rgba(10, 14, 26, 0.7);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  transition: var(--transition-smooth);
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--temple-gold);
  box-shadow: 0 0 12px var(--temple-gold-glow);
  background: rgba(15, 20, 36, 0.95);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  background: var(--gold-gradient);
  color: #3b1404;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--text-gold);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--temple-gold);
}

/* ==========================================================================
   Traditional South Indian 12-House Horoscope Grid (ராசி கட்டம்)
   ========================================================================== */
.rasi-kattam-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.kattam-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1 / 1;
  border: 3px solid var(--temple-gold);
  border-radius: var(--radius-md);
  background: rgba(11, 15, 29, 0.95);
  box-shadow: var(--shadow-gold), var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.kattam-cell {
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  background: rgba(20, 26, 46, 0.4);
  transition: background 0.2s ease;
  min-height: 85px;
}

.kattam-cell:hover {
  background: rgba(245, 158, 11, 0.12);
}

.kattam-cell-center {
  grid-column: 2 / span 2;
  grid-row: 2 / span 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--temple-gold);
  background: radial-gradient(circle, rgba(136, 19, 55, 0.65) 0%, rgba(15, 19, 36, 0.9) 100%);
  text-align: center;
  padding: 12px;
}

.cell-rasi-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-gold);
  text-align: right;
  opacity: 0.8;
  display: block;
}

.cell-planets-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-content: flex-start;
  margin-top: 2px;
}

.planet-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.2);
  color: #fff;
  border: 1px solid rgba(245, 158, 11, 0.4);
  white-space: nowrap;
}

.planet-pill.lagna {
  background: #f43f5e;
  border-color: #fda4af;
  color: #fff;
}

.planet-pill.sun { background: rgba(234, 88, 12, 0.3); border-color: #fb923c; }
.planet-pill.moon { background: rgba(255, 255, 255, 0.2); border-color: #e2e8f0; }
.planet-pill.mars { background: rgba(225, 29, 72, 0.3); border-color: #f43f5e; }
.planet-pill.mercury { background: rgba(16, 185, 129, 0.3); border-color: #34d399; }
.planet-pill.jupiter { background: rgba(234, 179, 8, 0.3); border-color: #fde047; }
.planet-pill.venus { background: rgba(236, 72, 153, 0.3); border-color: #f472b6; }
.planet-pill.saturn { background: rgba(59, 130, 246, 0.3); border-color: #60a5fa; }
.planet-pill.rahu { background: rgba(100, 116, 139, 0.3); border-color: #94a3b8; }
.planet-pill.ketu { background: rgba(168, 85, 247, 0.3); border-color: #c084fc; }

.kattam-center-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-gold);
}

.kattam-center-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Planetary Longitudes Table */
.planetary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 10px;
}

.planetary-table th {
  text-align: left;
  padding: 8px 12px;
  color: var(--text-gold);
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
  font-weight: 700;
}

.planetary-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.planetary-table tr:hover td {
  background: rgba(245, 158, 11, 0.05);
}

/* Dasa Timeline Blocks */
.dasa-timeline-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.dasa-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(15, 20, 36, 0.6);
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
}

.dasa-item.active-dasa {
  border-color: var(--temple-gold);
  background: rgba(136, 19, 55, 0.35);
}

.dasa-lord {
  font-weight: 700;
  color: var(--text-gold);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dasa-years {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: var(--font-english);
}

/* ==========================================================================
   Panchangam Page Layout
   ========================================================================== */
.panchangam-hero-box {
  background: linear-gradient(135deg, rgba(76, 5, 25, 0.8) 0%, rgba(20, 26, 48, 0.9) 100%);
  border: 2px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-xl);
  padding: 30px;
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 24px;
  box-shadow: var(--shadow-gold), var(--shadow-md);
}

.panchangam-date-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 14, 26, 0.7);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
}

.tamil-year-tag {
  color: var(--text-gold);
  font-size: 16px;
  font-weight: 700;
}

.tamil-month-day {
  font-size: 38px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin: 6px 0;
}

.english-date-tag {
  color: var(--text-secondary);
  font-size: 13px;
  font-family: var(--font-english);
}

.panchangam-elements-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.panch-element-card {
  background: rgba(10, 14, 26, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.panch-label {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.panch-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
}

.timing-highlight-card {
  border-left: 4px solid var(--temple-gold);
  padding: 14px 18px;
  background: rgba(15, 20, 36, 0.65);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.timing-highlight-card.alert-rahu {
  border-left-color: #f43f5e;
}

.timing-highlight-card.success-nalla {
  border-left-color: #10b981;
}

/* ==========================================================================
   Thirumana Porutham (10 Poruthams)
   ========================================================================== */
.match-score-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(136, 19, 55, 0.7), rgba(20, 27, 46, 0.9));
  border: 2px solid var(--temple-gold);
  border-radius: var(--radius-lg);
  padding: 24px 30px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-gold);
}

.score-dial {
  display: flex;
  align-items: center;
  gap: 20px;
}

.score-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 4px solid var(--temple-gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 14, 26, 0.9);
  box-shadow: 0 0 20px var(--temple-gold-glow);
}

.score-number {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-gold);
  line-height: 1;
}

.score-total {
  font-size: 11px;
  color: var(--text-secondary);
}

.verdict-info h3 {
  font-size: 20px;
  color: #fff;
  margin-bottom: 6px;
}

.verdict-info p {
  color: var(--text-secondary);
  font-size: 14px;
  max-width: 600px;
}

.porutham-results-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.porutham-item-card {
  background: rgba(15, 20, 36, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
  transition: var(--transition-smooth);
}

.porutham-item-card.passed {
  border-left: 4px solid #10b981;
}

.porutham-item-card.failed {
  border-left: 4px solid #f43f5e;
}

.porutham-item-card.crucial {
  background: rgba(76, 5, 25, 0.4);
}

.porutham-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.porutham-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
}

.porutham-status-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

.porutham-status-badge.passed {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.porutham-status-badge.failed {
  background: rgba(244, 63, 94, 0.2);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.porutham-explanation {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   Rasi Palan Cards (12 Zodiac Grid)
   ========================================================================== */
.rasi-wheel-selector {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.rasi-badge-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 8px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.rasi-badge-btn .rasi-symbol {
  font-size: 20px;
  color: var(--text-gold);
}

.rasi-badge-btn .rasi-label {
  font-size: 12px;
  font-weight: 700;
  margin-top: 4px;
}

.rasi-badge-btn:hover, .rasi-badge-btn.active {
  background: rgba(136, 19, 55, 0.5);
  border-color: var(--temple-gold);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--temple-gold-glow);
}

.rasi-palan-detail-card {
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 30px;
  box-shadow: var(--shadow-md);
}

.rasi-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
  padding-bottom: 18px;
  margin-bottom: 20px;
}

.rasi-title-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.rasi-avatar-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gold-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: #3b1404;
}

.rasi-lucky-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 20px 0;
}

.metric-pill {
  background: rgba(10, 14, 26, 0.6);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.metric-lbl {
  font-size: 11px;
  color: var(--text-muted);
}

.metric-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-gold);
  margin-top: 2px;
}

/* ==========================================================================
   Navagrahas & Pariharam
   ========================================================================== */
.graha-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.graha-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.graha-card:hover {
  transform: translateY(-4px);
  border-color: var(--temple-gold);
  box-shadow: var(--shadow-gold);
}

.graha-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.graha-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--temple-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-gold);
}

.graha-meta-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.graha-mantra-box {
  margin-top: 14px;
  padding: 10px 12px;
  background: rgba(136, 19, 55, 0.25);
  border: 1px solid rgba(244, 63, 94, 0.3);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--temple-gold-light);
  line-height: 1.5;
  font-style: italic;
}

/* ==========================================================================
   Numerology View
   ========================================================================== */
.numerology-result-card {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}

.num-badge-box {
  background: rgba(10, 14, 26, 0.8);
  border: 2px solid var(--temple-gold);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  box-shadow: 0 0 15px var(--temple-gold-glow);
}

.num-big-digit {
  font-size: 56px;
  font-weight: 900;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

/* Modal Styling */
.astro-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.astro-modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-cosmic-dark);
  border: 2px solid var(--temple-gold);
  border-radius: var(--radius-xl);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px;
  box-shadow: var(--shadow-lg), var(--shadow-gold);
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
}

.modal-close-btn:hover {
  color: var(--accent-ruby);
}

/* Footer */
.app-footer {
  margin-top: 60px;
  border-top: 1px solid rgba(245, 158, 11, 0.2);
  padding-top: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* Print Stylesheet for Horoscope Charts */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .header-top, .auspicious-banner, .nav-tabs-container, .btn-primary, .btn-ctrl, .app-footer {
    display: none !important;
  }
  .astro-card {
    border: 1px solid #000 !important;
    box-shadow: none !important;
    background: #fff !important;
    color: #000 !important;
  }
  .kattam-grid {
    border: 2px solid #000 !important;
    background: #fff !important;
  }
  .kattam-cell {
    border: 1px solid #333 !important;
    color: #000 !important;
  }
  .planet-pill {
    background: #f0f0f0 !important;
    color: #000 !important;
    border: 1px solid #666 !important;
  }
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .section-grid-2, .section-grid-3, .section-grid-4, .graha-cards-grid {
    grid-template-columns: 1fr;
  }
  .panchangam-hero-box {
    grid-template-columns: 1fr;
  }
  .porutham-results-list {
    grid-template-columns: 1fr;
  }
  .rasi-wheel-selector {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 640px) {
  .header-top {
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
  }
  .header-controls {
    width: 100%;
    justify-content: space-between;
  }
  .rasi-wheel-selector {
    grid-template-columns: repeat(3, 1fr);
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .match-score-banner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  .numerology-result-card {
    grid-template-columns: 1fr;
  }
}
