/* General Reset & Variables */
:root {
  --bg-color: #0d0b18;
  --bg-gradient: linear-gradient(135deg, #090714 0%, #150f28 100%);
  --panel-bg: rgba(22, 17, 39, 0.55);
  --border-color: rgba(212, 175, 55, 0.15);
  --gold-glow: 0 0 15px rgba(212, 175, 55, 0.4);
  --accent-gold: #d4af37;
  --accent-gold-hover: #f1d26f;
  --velvet-red: #5c0f16;
  --velvet-gradient: radial-gradient(circle, #7e1721 0%, #3d070b 100%);
  --text-primary: #f0ecfa;
  --text-secondary: #a29bb8;
  --shadow-main: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --font-display: 'Cinzel', Georgia, serif;
  --font-body: 'Outfit', sans-serif;
  --fire-glow: 0 0 10px 2px rgba(226, 88, 34, 0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Ambient glow nodes */
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.18;
}

.glow-1 {
  width: 400px;
  height: 400px;
  background-color: #7b2cbf;
  top: -100px;
  left: -100px;
}

.glow-2 {
  width: 500px;
  height: 500px;
  background-color: var(--accent-gold);
  bottom: -150px;
  right: -100px;
}

/* Layout Containers */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

/* Header styling */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}

.header-main-info {
  display: flex;
  align-items: center;
  gap: 20px;
}

.mandala-icon {
  font-size: 3rem;
  text-shadow: var(--gold-glow);
  animation: float Mandala 6s ease-in-out infinite;
}

.header-titles h1 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  letter-spacing: 1.5px;
  color: var(--accent-gold);
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.header-titles .subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.lang-selector-container select {
  background: rgba(22, 17, 39, 0.7);
  border: 1px solid var(--border-color);
  color: var(--accent-gold);
  padding: 10px 16px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: all 0.3s;
}

.lang-selector-container select:hover,
.lang-selector-container select:focus {
  border-color: var(--accent-gold);
  box-shadow: var(--gold-glow);
  background: rgba(22, 17, 39, 0.9);
}

/* Tabs Navigation */
.app-nav {
  display: flex;
  gap: 15px;
  margin: 25px 0;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.nav-btn:hover {
  background: rgba(212, 175, 55, 0.08);
  color: var(--accent-gold);
  border-color: rgba(212, 175, 55, 0.3);
}

.nav-btn.active {
  background: rgba(212, 175, 55, 0.15);
  color: var(--accent-gold);
  border-color: var(--accent-gold);
  box-shadow: var(--gold-glow);
}

/* Tab contents toggling */
.tab-content {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}

.tab-content.active {
  display: block;
}

/* Glassmorphism utility card */
.glass {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-main);
}

/* Main Grid Layout */
.consultation-grid {
  display: grid;
  grid-template-columns: 320px 1fr 380px;
  gap: 20px;
}

@media (max-width: 1200px) {
  .consultation-grid {
    grid-template-columns: 1fr 1fr;
  }
  .mat-panel {
    grid-column: span 2;
    order: -1;
  }
}

@media (max-width: 768px) {
  .consultation-grid {
    grid-template-columns: 1fr;
  }
  .mat-panel {
    grid-column: span 1;
  }
  .nav-btn {
    padding: 10px 14px;
    font-size: 0.85rem;
  }
  .header-titles h1 {
    font-size: 1.6rem;
  }
}

/* Left Column: Control Panel */
.control-panel {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: fit-content;
}

.control-panel h2 {
  font-family: var(--font-display);
  color: var(--accent-gold);
  font-size: 1.4rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.panel-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-gold);
}

.input-group input[type="text"],
.input-group input[type="number"],
.input-group input[type="date"],
.input-group select {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.3s;
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.action-section {
  margin-top: 15px;
  text-align: center;
}

.instruction-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 15px;
  line-height: 1.4;
}

.glow-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #b8860b 0%, #d4af37 50%, #8b6508 100%);
  border: none;
  border-radius: 8px;
  color: #090714;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.glow-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: 0.5s;
}

.glow-btn:hover::before {
  left: 150%;
}

.glow-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--gold-glow);
}

.glow-btn:active {
  transform: translateY(1px);
}

/* Center Column: Casting Mat */
.mat-panel {
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 520px;
}

.diya {
  position: absolute;
  font-size: 1.8rem;
  top: 20px;
}

.left-diya { left: 25px; }
.right-diya { right: 25px; }

.flame {
  width: 6px;
  height: 14px;
  background: radial-gradient(ellipse at bottom, #ffea00 0%, #ff8000 60%, #e25822 100%);
  border-radius: 50% 50% 20% 20%;
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: var(--fire-glow);
  animation: flicker 0.15s ease-in-out infinite alternate;
}

.casting-board {
  width: 440px;
  height: 440px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.8), var(--shadow-main);
  border: 4px solid var(--accent-gold);
  overflow: hidden;
}

@media (max-width: 480px) {
  .casting-board {
    width: 320px;
    height: 320px;
  }
}

.mat-velvet {
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--velvet-gradient);
  z-index: 1;
}

/* The astrological grid drawn behind cowries */
.rashi-wheel {
  position: absolute;
  width: 90%;
  height: 90%;
  border-radius: 50%;
  border: 1.5px dashed rgba(212, 175, 55, 0.4);
  z-index: 2;
  pointer-events: none;
}

.wheel-section {
  position: absolute;
  width: 100%;
  height: 100%;
  transform: rotate(calc(var(--i) * 30deg));
  text-align: center;
}

.wheel-section span {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.65rem;
  color: rgba(212, 175, 55, 0.55);
  font-family: var(--font-display);
  letter-spacing: 0.5px;
}

.shells-layer {
  position: absolute;
  width: 80%;
  height: 80%;
  z-index: 3;
}

.mat-footer {
  margin-top: 20px;
  font-size: 0.82rem;
  font-family: var(--font-display);
  color: var(--accent-gold);
  letter-spacing: 1px;
}

/* Dynamic Cowrie Shell Styling */
.cowrie-shell {
  position: absolute;
  width: 48px;
  height: 32px;
  cursor: grab;
  user-select: none;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.6));
  transition: transform 0.1s linear;
}

.cowrie-shell.shaking {
  animation: jitter 0.12s infinite alternate;
}

/* Right Column: Result Panel */
.result-panel {
  padding: 24px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 520px;
}

.result-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  color: var(--text-secondary);
}

.placeholder-icon {
  font-size: 3.5rem;
  margin-bottom: 15px;
  opacity: 0.4;
  animation: float 4s ease-in-out infinite;
}

.result-placeholder h3 {
  font-family: var(--font-display);
  color: var(--accent-gold);
  margin-bottom: 10px;
}

.result-placeholder p {
  font-size: 0.88rem;
  line-height: 1.5;
}

.result-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 0.5s ease-out forwards;
}

.result-header h2 {
  font-family: var(--font-display);
  color: var(--accent-gold);
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.shell-stats {
  display: flex;
  gap: 10px;
}

.badge {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
}

.badge-open {
  background: rgba(40, 167, 69, 0.15);
  border: 1px solid rgba(40, 167, 69, 0.4);
  color: #2ecc71;
}

.badge-closed {
  background: rgba(220, 53, 69, 0.15);
  border: 1px solid rgba(220, 53, 69, 0.4);
  color: #e74c3c;
}

.result-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-card h3 {
  font-family: var(--font-display);
  color: var(--accent-gold);
  font-size: 1.05rem;
  border-left: 2px solid var(--accent-gold);
  padding-left: 10px;
}

.rashi-badge,
.num-badge {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
  text-shadow: 0 0 5px rgba(255,255,255,0.1);
}

.result-card p {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.guidance-text {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-primary);
  font-style: italic;
}

.mantra-box,
.parihara-box {
  background: rgba(212, 175, 55, 0.04);
  border: 1px dashed rgba(212, 175, 55, 0.25);
  border-radius: 8px;
  padding: 12px;
  margin-top: 5px;
}

.mantra-box strong,
.parihara-box strong {
  display: block;
  font-size: 0.85rem;
  color: var(--accent-gold);
  margin-bottom: 5px;
}

.mantra-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
  text-align: center;
  margin: 5px 0;
  text-shadow: var(--gold-glow);
}

.mantra-box small {
  font-size: 0.72rem;
  color: var(--text-secondary);
  display: block;
  text-align: center;
}

/* Wisdom Hub Styling */
.wisdom-container {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  min-height: 480px;
}

@media (max-width: 768px) {
  .wisdom-container {
    grid-template-columns: 1fr;
  }
}

.wisdom-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wisdom-menu-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.9rem;
  padding: 14px 18px;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.wisdom-menu-btn:hover,
.wisdom-menu-btn.active {
  background: rgba(212, 175, 55, 0.1);
  color: var(--accent-gold);
  border-color: var(--accent-gold);
  padding-left: 24px;
}

.wisdom-content-area {
  padding: 30px;
  overflow-y: auto;
  max-height: 520px;
}

.wisdom-article {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}

.wisdom-article.active {
  display: block;
}

.wisdom-article h2 {
  font-family: var(--font-display);
  color: var(--accent-gold);
  font-size: 1.8rem;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.article-lead {
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--text-primary);
  font-style: italic;
  margin-bottom: 25px;
}

.article-body h3 {
  font-family: var(--font-display);
  color: var(--accent-gold);
  font-size: 1.2rem;
  margin: 20px 0 10px 0;
}

.article-body p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.article-body ul {
  margin-left: 20px;
  margin-bottom: 20px;
}

.article-body li {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.rashi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 15px 0;
}

@media (max-width: 600px) {
  .rashi-grid {
    grid-template-columns: 1fr;
  }
}

.rashi-item {
  background: rgba(255,255,255,0.01);
  border: 1px solid rgba(255,255,255,0.04);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.rashi-item strong {
  color: var(--accent-gold);
  display: block;
  font-size: 0.9rem;
  margin-bottom: 3px;
}

/* History Log Styling */
.history-container {
  padding: 30px;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.history-header h2 {
  font-family: var(--font-display);
  color: var(--accent-gold);
  font-size: 1.6rem;
}

.danger-btn {
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.4);
  color: #dc3545;
  padding: 8px 16px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s;
}

.danger-btn:hover {
  background: rgba(220, 53, 69, 0.25);
  border-color: #dc3545;
  color: #ff5f6d;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.history-empty {
  text-align: center;
  padding: 60px 0;
  color: var(--text-secondary);
}

.history-empty .icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 15px;
  opacity: 0.3;
}

.history-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: slideIn 0.3s ease-out forwards;
}

.history-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
  padding-bottom: 10px;
}

.history-item-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-item-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.history-item-question {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.history-item-stats {
  display: flex;
  gap: 10px;
}

.history-item-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

@media (max-width: 600px) {
  .history-item-body {
    grid-template-columns: 1fr;
  }
}

.history-rashi, .history-numerology {
  background: rgba(212, 175, 55, 0.02);
  border: 1px solid rgba(212, 175, 55, 0.1);
  padding: 12px;
  border-radius: 8px;
}

.history-item-title {
  font-size: 0.78rem;
  color: var(--accent-gold);
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.history-item-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Ashtamangala Grid */
.ashtamangala-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-top: 5px;
}

@media (max-width: 600px) {
  .ashtamangala-grid {
    grid-template-columns: 1fr;
  }
}

.ashta-pile {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pile-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.yoni-badge {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-gold);
  text-shadow: var(--gold-glow);
}

.yoni-desc {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

/* Footer bar */
.app-footer-bar {
  margin-top: 40px;
  padding: 20px 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-15px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}

@keyframes floatMandala {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(3deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes flicker {
  0% { transform: translateX(-50%) rotate(-1deg) scale(0.95); opacity: 0.85; }
  100% { transform: translateX(-50%) rotate(1deg) scale(1.05); opacity: 1; }
}

@keyframes jitter {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(0px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(2px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(2px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

/* Kundali Horoscope Styles */
.horoscope-grid {
  display: grid;
  grid-template-columns: 320px 1fr 380px;
  gap: 20px;
}

@media (max-width: 1200px) {
  .horoscope-grid {
    grid-template-columns: 1fr 1fr;
  }
  .kundali-mat-panel {
    grid-column: span 2;
    order: -1;
  }
}

@media (max-width: 768px) {
  .horoscope-grid {
    grid-template-columns: 1fr;
  }
  .kundali-mat-panel {
    grid-column: span 1;
  }
}

.kundali-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1;
  border: 3px solid var(--accent-gold);
  background: rgba(0, 0, 0, 0.25);
  margin: 15px auto;
  box-shadow: var(--shadow-main);
  border-radius: 8px;
  overflow: hidden;
}

@media (max-width: 480px) {
  .kundali-grid {
    max-width: 320px;
  }
}

.kundali-cell {
  border: 1px solid var(--border-color);
  padding: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  cursor: pointer;
  transition: all 0.3s;
  min-height: 80px;
}

.kundali-cell:hover {
  background: rgba(212, 175, 55, 0.08);
}

.kundali-cell.active {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--accent-gold);
  box-shadow: inset 0 0 10px rgba(212, 175, 55, 0.2);
}

.kundali-cell .sign-name {
  font-family: var(--font-display);
  font-size: 0.65rem;
  color: var(--accent-gold);
  letter-spacing: 0.5px;
}

.kundali-cell .house-number {
  position: absolute;
  bottom: 4px;
  right: 6px;
  font-size: 0.65rem;
  color: var(--text-secondary);
}

.kundali-cell .planets-in-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 5px;
}

.planet-tag {
  background: rgba(212, 175, 55, 0.12);
  border: 1.5px solid var(--accent-gold);
  color: var(--text-primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
}

.planet-tag.lagna-tag {
  background: rgba(226, 88, 34, 0.15);
  border-color: #e25822;
  color: #ffbe76;
}

.kundali-center {
  grid-column: span 2;
  grid-row: span 2;
  border: 1.5px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 12px;
  background: rgba(212, 175, 55, 0.03);
}

.kundali-center .center-title {
  font-family: var(--font-display);
  color: var(--accent-gold);
  font-size: 1rem;
  font-weight: bold;
}

.kundali-center .center-details {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.3;
}

.kundali-panel-title {
  text-align: center;
  font-family: var(--font-display);
  color: var(--accent-gold);
  font-size: 1.15rem;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}



/* Speak Icon Button */
.speak-icon-btn {
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 10px;
}
.speak-icon-btn:hover {
  background: var(--accent-gold);
  color: var(--dark-bg);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
  transform: scale(1.08);
}
.speak-icon-btn.loading {
  animation: pulse-gold-speak 1.5s infinite;
  pointer-events: none;
}
@keyframes pulse-gold-speak {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}


/* Rashi Icons Styling */
.rashi-icon-container {
  width: 42px;
  height: 42px;
  margin: 3px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.95;
}
.rashi-icon-container svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}
.rashi-svg-icon {
  width: 35px;
  height: 35px;
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}


/* Planetary Strength Status Tags (AstroJags) */
.planet-tag.exalted-tag {
  border-color: #ffd700;
  background: rgba(212, 175, 55, 0.25);
  color: #fffdec;
  box-shadow: 0 0 5px rgba(212, 175, 55, 0.4);
}
.planet-tag.debilitated-tag {
  border-color: #ff4d4d;
  background: rgba(255, 77, 77, 0.15);
  color: #ffe6e6;
  box-shadow: 0 0 5px rgba(255, 77, 77, 0.3);
}
.planet-tag.own-tag {
  border-color: #00e5ff;
  background: rgba(0, 229, 255, 0.15);
  color: #e6ffff;
  box-shadow: 0 0 5px rgba(0, 229, 255, 0.3);
}

/* Full Horoscope Report & Timeline Styling */
.report-text-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 10px;
}

.report-section-title {
  font-family: var(--font-display);
  color: var(--accent-gold);
  font-size: 1.1rem;
  margin-top: 15px;
  margin-bottom: 5px;
  border-bottom: 1px dashed rgba(212, 175, 55, 0.3);
  padding-bottom: 4px;
}

/* Planet status table */
.horo-table-wrapper {
  overflow-x: auto;
  margin: 10px 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.horo-status-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}
.horo-status-table th, 
.horo-status-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.horo-status-table th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent-gold);
  font-family: var(--font-display);
  font-weight: 600;
}
.horo-status-table tr:last-child td {
  border-bottom: none;
}

/* Past, Present, Future Timeline Chapters */
.timeline-chapter {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 12px;
  margin-top: 8px;
}
.timeline-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.timeline-badge {
  font-size: 0.72rem;
  font-weight: bold;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
}
.timeline-badge.past {
  background: rgba(230, 126, 34, 0.15);
  color: #e67e22;
  border: 1px solid rgba(230, 126, 34, 0.4);
}
.timeline-badge.present {
  background: rgba(52, 152, 219, 0.15);
  color: #3498db;
  border: 1px solid rgba(52, 152, 219, 0.4);
}
.timeline-badge.future {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.4);
}
.timeline-title {
  font-family: var(--font-display);
  font-weight: bold;
  color: var(--text-primary);
  font-size: 0.9rem;
}
.timeline-desc {
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

/* Dasha steps timeline */
.dasha-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.dasha-step {
  font-size: 0.75rem;
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  transition: all 0.3s ease;
}
.dasha-step.active-dasha {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--accent-gold);
  color: #fff;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
  font-weight: bold;
  animation: dasha-pulse 2s infinite alternate;
}
@keyframes dasha-pulse {
  0% { box-shadow: 0 0 4px rgba(212, 175, 55, 0.2); }
  100% { box-shadow: 0 0 10px rgba(212, 175, 55, 0.5); }
}


/* ==========================================
 * 8. Hindu Next Event & Panchang Tab Styles
 * ========================================== */
.events-container {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.events-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
  margin-bottom: 10px;
}

.events-header h2 {
  font-family: var(--font-display);
  color: var(--accent-gold);
  font-size: 1.6rem;
  letter-spacing: 0.5px;
}

/* Next Event Banner Card */
.next-event-banner {
  width: 100%;
}

.next-event-card {
  background: linear-gradient(135deg, rgba(140, 20, 20, 0.45) 0%, rgba(212, 175, 55, 0.1) 100%);
  border: 1.5px solid var(--accent-gold);
  box-shadow: 0 8px 32px rgba(212, 175, 55, 0.15), var(--gold-glow);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.next-event-card::before {
  content: "🕉️";
  position: absolute;
  right: -10px;
  bottom: -20px;
  font-size: 120px;
  opacity: 0.05;
  pointer-events: none;
}

.next-event-card:hover {
  transform: translateY(-2px);
}

.next-event-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.countdown-badge {
  background: var(--accent-gold);
  color: var(--dark-bg);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 20px;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
  letter-spacing: 0.5px;
}

.event-date-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.next-event-card h3 {
  font-family: var(--font-display);
  color: var(--text-primary);
  font-size: 1.8rem;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.next-event-desc {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.next-event-remedy {
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--accent-gold);
  padding: 12px 18px;
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.next-event-remedy strong {
  color: var(--accent-gold);
  display: block;
  margin-bottom: 4px;
}

/* Grid Layout for Panchang & List */
.panchang-and-list-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .panchang-and-list-grid {
    grid-template-columns: 1fr;
  }
}

.card-glass {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  backdrop-filter: blur(10px);
}

.panchang-widget h3, .upcoming-events-list h3 {
  font-family: var(--font-display);
  color: var(--accent-gold);
  font-size: 1.25rem;
  margin-top: 0;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
}

.panchang-table {
  width: 100%;
  border-collapse: collapse;
}

.panchang-table tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.panchang-table tr:last-child {
  border-bottom: none;
}

.panchang-table td {
  padding: 10px 6px;
  font-size: 0.88rem;
}

.panchang-table td.label-cell {
  color: var(--text-secondary);
  font-weight: 500;
  width: 40%;
}

.panchang-table td.value-cell {
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
}

.panchang-table td.value-cell span {
  color: var(--accent-gold);
}

/* Upcoming Events List styling */
.events-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 6px;
}

.events-list-container::-webkit-scrollbar {
  width: 6px;
}

.events-list-container::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.2);
  border-radius: 3px;
}

.event-list-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.3s ease;
}

.event-list-item:hover {
  background: rgba(212, 175, 55, 0.04);
  border-color: rgba(212, 175, 55, 0.15);
}

.event-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.event-item-name {
  font-family: var(--font-display);
  font-weight: bold;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.event-item-countdown {
  font-size: 0.72rem;
  font-weight: bold;
  color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.event-item-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.event-item-desc {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

