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

:root {
  --bg-color: #05050d;
  --bg-gradient: linear-gradient(135deg, #05050d 0%, #0c0d24 50%, #15092a 100%);
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.07);
  --glass-border-glow: rgba(212, 175, 55, 0.2);
  --text-primary: #ffffff;
  --text-secondary: #a0a5c0;
  --accent-gold: #d4af37;
  --accent-gold-glow: rgba(212, 175, 55, 0.4);
  --accent-purple: #9c27b0;
  --accent-blue: #00bcd4;
  --glow-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  --border-radius: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-color);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* Background Stars Effect */
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 40px),
    radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 30px),
    radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 40px);
  background-size: 550px 550px, 350px 350px, 250px 250px;
  background-position: 0 0, 40px 60px, 130px 270px;
  opacity: 0.15;
  z-index: -1;
  pointer-events: none;
}

header {
  padding: 2.5rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  background: rgba(5, 5, 13, 0.4);
}

header h1 {
  font-family: 'Cinzel', serif;
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #fff 30%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  letter-spacing: 1px;
}

@media (max-width: 768px) {
  header {
    padding: 1.5rem 1rem;
  }
  header h1 {
    font-size: 1.8rem;
    letter-spacing: 1px;
  }
  header p {
    font-size: 0.95rem;
  }
}

main {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 2rem;
}

@media (max-width: 1024px) {
  main {
    grid-template-columns: 1fr;
  }
}

/* Glassmorphism Panel */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  padding: 1.8rem;
  box-shadow: var(--glow-shadow);
  transition: all 0.3s ease;
}

.glass-panel:hover {
  border-color: var(--glass-border-glow);
  box-shadow: 0 8px 32px 0 rgba(212, 175, 55, 0.08);
}

.section-title {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--accent-gold);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  padding-bottom: 0.5rem;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Input Form Styles */
.form-group {
  margin-bottom: 1.2rem;
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  letter-spacing: 0.5px;
}

input, select {
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  transition: all 0.3s ease;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent-gold);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.15);
}

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

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.btn {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #b8860b 0%, #8b6508 100%);
  color: #ffffff;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
  letter-spacing: 1px;
  margin-top: 1rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  -webkit-font-smoothing: antialiased;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
  filter: brightness(1.15);
}

@media (max-width: 768px) {
  .btn {
    background: linear-gradient(135deg, #a07800 0%, #7a5c00 100%);
    color: #ffffff;
    font-size: 1rem;
    padding: 0.95rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  }
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  box-shadow: none;
  margin-top: 0.5rem;
}

.btn-secondary:hover {
  background: rgba(212, 175, 55, 0.1);
  color: #fff;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.15);
}

/* Dashboard Content Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .charts-row {
    grid-template-columns: 1fr;
  }
}

.chart-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 1.5rem;
}

.chart-title {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  color: var(--accent-gold);
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

/* Table Styles */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  text-align: left;
}

th, td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.95rem;
}

th {
  color: var(--accent-gold);
  font-weight: 500;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.5px;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Tab Layout */
.tabs-header {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 2px;
}

.tab-btn {
  padding: 0.8rem 1.5rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.tab-btn:hover {
  color: #fff;
}

.tab-btn.active {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.5s ease-in-out;
}

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

/* Dasha Explorer Styles */
.dasha-tree {
  font-size: 1rem;
}

.dasha-node {
  margin-left: 1.5rem;
  border-left: 1px dashed rgba(212, 175, 55, 0.15);
  padding-left: 1rem;
  margin-top: 0.5rem;
  position: relative;
}

.dasha-node::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.9rem;
  width: 0.8rem;
  height: 1px;
  border-top: 1px dashed rgba(212, 175, 55, 0.15);
}

.dasha-header {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.8rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.dasha-header:hover {
  background: rgba(212, 175, 55, 0.05);
  border-color: rgba(212, 175, 55, 0.2);
}

.dasha-header.expanded {
  border-color: rgba(212, 175, 55, 0.2);
  background: rgba(212, 175, 55, 0.03);
}

.dasha-toggle {
  margin-right: 0.8rem;
  font-size: 0.8rem;
  transition: transform 0.2s ease;
  color: var(--accent-gold);
}

.dasha-toggle.open {
  transform: rotate(90deg);
}

.dasha-name {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  color: #fff;
  margin-right: 0.5rem;
}

.dasha-period {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-left: auto;
}

.dasha-level-badge {
  font-size: 0.75rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
  margin-right: 0.8rem;
  letter-spacing: 0.5px;
}

.badge-md { background: rgba(156, 39, 176, 0.2); border: 1px solid rgba(156, 39, 176, 0.4); color: #e040fb; }
.badge-ad { background: rgba(0, 188, 212, 0.2); border: 1px solid rgba(0, 188, 212, 0.4); color: #00e5ff; }
.badge-pd { background: rgba(76, 175, 80, 0.2); border: 1px solid rgba(76, 175, 80, 0.4); color: #69f0ae; }
.badge-sd { background: rgba(255, 152, 0, 0.2); border: 1px solid rgba(255, 152, 0, 0.4); color: #ffd740; }
.badge-prd { background: rgba(244, 67, 54, 0.2); border: 1px solid rgba(244, 67, 54, 0.4); color: #ff5252; }

.dasha-children {
  display: none;
}

.dasha-children.open {
  display: block;
}

/* Yoga List Card */
.yoga-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 1.2rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.yoga-item:hover {
  border-color: rgba(212, 175, 55, 0.15);
  background: rgba(212, 175, 55, 0.01);
}

.yoga-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.yoga-name {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.yoga-strength {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
}

.strength-strong { background: rgba(76, 175, 80, 0.15); border: 1px solid rgba(76, 175, 80, 0.3); color: #4caf50; }
.strength-moderate { background: rgba(255, 152, 0, 0.15); border: 1px solid rgba(255, 152, 0, 0.3); color: #ff9800; }
.strength-weak { background: rgba(244, 67, 54, 0.15); border: 1px solid rgba(244, 67, 54, 0.3); color: #f44336; }

.yoga-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Ashtakavarga Grid */
.ashtakavarga-grid {
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.ashtakavarga-cell {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.6rem 0.2rem;
  text-align: center;
  font-size: 0.85rem;
  min-width: 45px;
}

.ashtakavarga-cell.header {
  color: var(--accent-gold);
  font-weight: 600;
  font-family: 'Cinzel', serif;
  background: rgba(212, 175, 55, 0.05);
}

.ashtakavarga-cell.high-score {
  background: rgba(76, 175, 80, 0.1);
  color: #81c784;
  font-weight: 600;
}

.ashtakavarga-cell.low-score {
  background: rgba(244, 67, 54, 0.1);
  color: #e57373;
}

/* Text Interpretations */
.interpretation-card {
  margin-bottom: 1.5rem;
}

.interpretation-card h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.interpretation-card h3::before {
  content: "✦";
  color: var(--accent-gold);
}

.interpretation-card p {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Footer Section */
footer {
  text-align: center;
  padding: 2.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-top: 1px solid var(--glass-border);
  margin-top: 4rem;
  background: rgba(5, 5, 13, 0.5);
  backdrop-filter: blur(10px);
}

footer p.watermark {
  font-family: 'Cinzel', serif;
  color: var(--accent-gold);
  font-size: 1rem;
  margin-bottom: 0.4rem;
  letter-spacing: 1px;
}
