/* ==========================================================================
   AUM & BRAHMA MUHURTA JOURNAL - UNIFIED DESIGN SYSTEM (styles.css)
   ========================================================================== */

/* Google Fonts Imports */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700&family=Cinzel:wght@400;600;700&family=Outfit:wght@200;300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  /* LIGHT MODE (IVORY & MAROON & GOLD) */
  --bg-color: #faf7f2;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.75);
  --border-color: rgba(197, 160, 89, 0.25);
  --border-card: rgba(197, 160, 89, 0.15);
  
  --text-main: #2a050a;
  --text-muted: rgba(42, 5, 10, 0.6);
  --text-inverse: #faf7f2;
  
  --color-primary: #8a2b37;       /* Deep Maroon */
  --color-primary-rgb: 138, 43, 55;
  --color-secondary: #e28c98;     /* Lotus Pink */
  --color-gold: #c5a059;          /* Antique Gold */
  --color-gold-bright: #d4af37;   /* Bright Gold */
  --color-emerald: #10b981;       /* Auspicious Green */
  --color-amber: #f59e0b;         /* Sunrise Orange */
  
  --shadow-premium: 0 10px 30px -4px rgba(88, 17, 26, 0.05), 0 4px 12px -2px rgba(197, 160, 89, 0.1);
  --shadow-glow: 0 0 20px rgba(197, 160, 89, 0.2);
  --glass-blur: blur(15px);
  
  /* Fonts */
  --font-sacred: 'Cinzel', 'Playfair Display', Georgia, serif;
  --font-display: 'Cinzel Decorative', 'Cinzel', serif;
  --font-body: 'Outfit', 'Inter', system-ui, sans-serif;
  
  /* Text Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
}

/* DARK MODE SWAPS */
body.dark {
  --bg-color: #120e0f;
  --bg-card: #1c1617;
  --bg-glass: rgba(28, 22, 23, 0.8);
  --border-color: rgba(212, 175, 55, 0.2);
  --border-card: rgba(88, 17, 26, 0.4);
  
  --text-main: #faf7f2;
  --text-muted: rgba(250, 247, 242, 0.6);
  --text-inverse: #2a050a;
  
  --color-primary: #d4af37;       /* Gold dominates dark mode */
  --color-primary-rgb: 212, 175, 55;
  --color-secondary: #e28c98;     /* Lotus Pink */
  --color-gold: #c5a059;          /* Antique Gold */
  --color-gold-bright: #d4af37;
  
  --shadow-premium: 0 10px 30px -4px rgba(0, 0, 0, 0.5), 0 4px 12px -2px rgba(88, 17, 26, 0.3);
  --shadow-glow: 0 0 25px rgba(212, 175, 55, 0.25);
}

/* FONT SIZE SCALING */
body.font-size-large {
  --text-xs: 0.85rem;
  --text-sm: 1rem;
  --text-base: 1.15rem;
  --text-lg: 1.3rem;
  --text-xl: 1.45rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.15rem;
  --text-4xl: 2.6rem;
  --text-5xl: 3.5rem;
}

body.font-size-xlarge {
  --text-xs: 1rem;
  --text-sm: 1.15rem;
  --text-base: 1.35rem;
  --text-lg: 1.55rem;
  --text-xl: 1.75rem;
  --text-2xl: 2.1rem;
  --text-3xl: 2.55rem;
  --text-4xl: 3.1rem;
  --text-5xl: 4.2rem;
}

/* ==========================================================================
   BASE & RESET STYLES
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  transition: background-color 0.4s, color 0.4s;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
  user-select: none;
  -webkit-user-select: none;
}

body.dark {
  background-image: radial-gradient(circle at 50% 50%, #1e1316 0%, #120e0f 100%);
}

/* Paper Texture on Light Mode */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: radial-gradient(rgba(197, 160, 89, 0.08) 1px, transparent 0);
  background-size: 24px 24px;
  pointer-events: none;
}

body.dark::before {
  background-image: radial-gradient(rgba(197, 160, 89, 0.03) 1px, transparent 0);
}

/* Cosmic Background Stars */
.cosmic-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.15;
  transition: opacity 0.5s;
}

body.dark .cosmic-bg {
  opacity: 0.85;
}

.star {
  position: absolute;
  background: #ffffff;
  border-radius: 50%;
  opacity: 0;
  animation: twinkle 5s infinite ease-in-out;
}

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 0.8; transform: scale(1.2); }
}

/* ==========================================================================
   COMMON LAYOUTS & COMPONENT CLASSES
   ========================================================================== */

.glass-panel {
  background-color: var(--bg-glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  box-shadow: var(--shadow-premium);
  padding: 1.5rem;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.glass-panel:hover {
  border-color: rgba(var(--color-primary-rgb), 0.35);
}

/* Typography Helpers */
h1, h2, h3, h4 {
  font-family: var(--font-sacred);
  letter-spacing: 0.03em;
  font-weight: 700;
}

.gold-text {
  background: linear-gradient(135deg, #ffe082 0%, var(--color-gold-bright) 50%, #b8860b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

body.dark .gold-text {
  text-shadow: 0 0 15px rgba(212, 175, 55, 0.15);
}

.violet-text {
  background: linear-gradient(135deg, #fdf5f6 0%, var(--color-secondary) 50%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Divider styling */
.spiritual-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 1.25rem 0;
}

.spiritual-divider::before,
.spiritual-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold) 50%, transparent);
}

.spiritual-divider-dot {
  background-color: var(--color-gold);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  box-shadow: 0 0 6px var(--color-gold);
}

/* Scrollbar customization */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(var(--color-primary-rgb), 0.15);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* Buttons */
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-body);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, #58111a 100%);
  color: var(--text-inverse);
  padding: 0.85rem 1.75rem;
  border-radius: 14px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(88, 17, 26, 0.2);
}

body.dark .btn-primary {
  background: linear-gradient(135deg, var(--color-gold-bright) 0%, var(--color-gold) 100%);
  color: #120e0f;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(var(--color-primary-rgb), 0.08);
  border: 1px solid rgba(var(--color-primary-rgb), 0.2);
  color: var(--text-main);
  padding: 0.6rem 1.25rem;
  border-radius: 12px;
  font-weight: 500;
}

.btn-secondary:hover {
  background: rgba(var(--color-primary-rgb), 0.15);
}

.icon-btn {
  font-size: 1.2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--color-primary-rgb), 0.05);
  border: 1px solid rgba(var(--color-primary-rgb), 0.1);
  color: var(--text-main);
}

.icon-btn:hover {
  background: rgba(var(--color-primary-rgb), 0.12);
  transform: scale(1.05);
}

/* ==========================================================================
   AUTHENTICATION OVERLAY PORTAL
   ========================================================================== */

.auth-portal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-color);
  padding: 1.5rem;
}

body.dark .auth-portal {
  background-image: radial-gradient(circle at 50% 50%, #1e1316 0%, #120e0f 100%);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  text-align: center;
  animation: float-in 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  border-width: 2px;
}

@keyframes float-in {
  0% { transform: translateY(30px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.auth-logo {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  animation: glow-pulse 3s infinite ease-in-out;
  color: var(--color-gold);
}

@keyframes glow-pulse {
  0%, 100% { text-shadow: 0 0 10px rgba(197, 160, 89, 0.2); }
  50% { text-shadow: 0 0 25px rgba(197, 160, 89, 0.6); }
}

.auth-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}

.auth-subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.auth-tabs {
  display: flex;
  background: rgba(var(--color-primary-rgb), 0.05);
  border: 1px solid rgba(var(--color-primary-rgb), 0.1);
  padding: 4px;
  border-radius: 14px;
  margin-bottom: 1.5rem;
}

.auth-tab {
  flex: 1;
  padding: 0.65rem;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: 10px;
  color: var(--text-muted);
}

.auth-tab.active {
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

body.dark .auth-tab.active {
  background: rgba(255,255,255,0.08);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  text-align: left;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input-field {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.85rem 1rem;
  border-radius: 12px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.input-field:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

.auth-error {
  font-size: var(--text-xs);
  color: #ef4444;
  text-align: center;
  min-height: 18px;
}

#authSubmitBtn {
  width: 100%;
  margin-top: 0.5rem;
}

/* ==========================================================================
   APP HEADER
   ========================================================================== */

.app-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-symbol {
  font-size: 1.8rem;
  color: var(--color-gold-bright);
}

.logo-text {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.header-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-sm);
}

#userGreeting {
  font-weight: 500;
}

#userGreeting strong {
  color: var(--color-primary);
  font-weight: 700;
}

.btn-logout {
  font-size: var(--text-xs);
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
  font-weight: 600;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.2);
}

.settings-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-left: 1px solid var(--border-color);
  padding-left: 1rem;
}

.font-size-adjuster {
  display: flex;
  background: rgba(var(--color-primary-rgb), 0.05);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 2px;
}

.font-btn {
  padding: 0.25rem 0.5rem;
  font-size: 10px;
  font-weight: bold;
  border-radius: 6px;
  color: var(--text-muted);
}

.font-btn.active {
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* ==========================================================================
   MAIN DASHBOARD GRID
   ========================================================================== */

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

@media (min-width: 868px) {
  .main-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.col-span-full {
  grid-column: 1 / -1;
}

.left-column,
.right-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ==========================================================================
   PANCHANG & BRAHMA MUHURTA CARD
   ========================================================================== */

.panchang-card {
  position: relative;
  overflow: hidden;
}

.panchang-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.live-time {
  font-family: var(--font-sacred);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-primary);
}

.live-date {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 500;
}

.gps-badge {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--color-emerald);
  display: flex;
  align-items: center;
  gap: 6px;
}

.gps-badge span {
  animation: glow-blink 2s infinite;
}

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

.gps-badge.fallback {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.2);
  color: var(--color-amber);
}

.panchang-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 576px) {
  .panchang-details-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.panchang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.5rem;
  background: rgba(var(--color-primary-rgb), 0.03);
  border-radius: 12px;
  border: 1px solid rgba(197, 160, 89, 0.08);
}

.panchang-item-icon {
  font-size: 1.4rem;
}

.panchang-item-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.panchang-item-value {
  font-size: var(--text-xs);
  font-weight: 600;
}

.brahma-muhurta-section {
  margin-top: 0.5rem;
}

.muhurta-title {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.muhurta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 576px) {
  .muhurta-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.muhurta-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.85rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: rgba(var(--color-primary-rgb), 0.02);
  text-align: center;
}

.muhurta-box.active-today {
  background: rgba(197, 160, 89, 0.08);
  border-color: var(--color-gold);
  box-shadow: 0 0 15px rgba(197, 160, 89, 0.1);
  ring: 1px solid rgba(197, 160, 89, 0.3);
}

.muhurta-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
}

.muhurta-box.active-today .muhurta-label {
  color: var(--color-primary);
  font-weight: 700;
}

.muhurta-value {
  font-family: var(--font-sacred);
  font-size: var(--text-sm);
  font-weight: 700;
  margin-top: 2px;
}

/* ==========================================================================
   BREATHING VISUALIZER & CHANT CONSOLE
   ========================================================================== */

.visualizer-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.breathing-ring-outer {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.breathing-ring-glow {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--color-primary-rgb), 0.15) 0%, transparent 70%);
  opacity: 0.5;
  transition: transform 1s, opacity 1s;
}

.breathing-symbol-btn {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 3px solid var(--color-gold);
  box-shadow: var(--shadow-premium), 0 0 15px rgba(197, 160, 89, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.breathing-symbol-text {
  font-size: 2.2rem;
  color: var(--color-primary);
  transition: transform 0.6s;
}

.breathing-instruction {
  font-family: var(--font-sacred);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-primary);
  min-height: 27px;
}

/* Visualizer Animation States */
.visualizer-card.inhale .breathing-ring-glow {
  transform: scale(1.6);
  opacity: 0.95;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.25) 0%, transparent 70%);
}

.visualizer-card.inhale .breathing-symbol-btn {
  transform: scale(1.25);
  border-color: #a855f7;
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.3);
}

.visualizer-card.inhale .breathing-symbol-text {
  transform: rotate(10deg);
}

.visualizer-card.hold .breathing-ring-glow {
  transform: scale(1.25);
  opacity: 0.7;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.2) 0%, transparent 70%);
}

.visualizer-card.hold .breathing-symbol-btn {
  transform: scale(1.1);
  border-color: #06b6d4;
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.25);
}

.visualizer-card.hold .breathing-symbol-text {
  animation: hold-pulsate 1.5s infinite ease-in-out;
}

@keyframes hold-pulsate {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.visualizer-card.exhale .breathing-ring-glow {
  transform: scale(0.9);
  opacity: 0.4;
  background: radial-gradient(circle, rgba(197, 160, 89, 0.15) 0%, transparent 70%);
}

.visualizer-card.exhale .breathing-symbol-btn {
  transform: scale(0.95);
  border-color: var(--color-gold);
  animation: exhale-spin 20s infinite linear;
}

@keyframes exhale-spin {
  0% { transform: scale(0.95) rotate(0deg); }
  100% { transform: scale(0.95) rotate(-360deg); }
}

/* ==========================================================================
   MEDITATION CHANT CONSOLE
   ========================================================================== */

.console-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.audio-controls label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
}

.audio-select {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  outline: none;
}

.target-selector {
  display: flex;
  gap: 6px;
  background: rgba(var(--color-primary-rgb), 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 3px;
}

.target-btn {
  flex: 1;
  padding: 0.5rem;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: 8px;
  color: var(--text-muted);
}

.target-btn.active {
  background: var(--color-primary);
  color: var(--text-inverse);
  box-shadow: 0 2px 6px rgba(var(--color-primary-rgb), 0.2);
}

body.dark .target-btn.active {
  color: #120e0f;
}

.breathing-mode-section {
  background: rgba(var(--color-primary-rgb), 0.02);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 1rem;
}

.breathing-mode-section h4 {
  font-size: var(--text-sm);
  color: var(--color-primary);
}

.section-subtitle {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.breathing-mode-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

@media (min-width: 480px) {
  .breathing-mode-selector {
    grid-template-columns: repeat(4, 1fr);
  }
}

.mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  text-align: center;
  position: relative;
}

.mode-recommended-tag {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-gold);
  color: #120e0f;
  font-size: 6px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  white-space: nowrap;
}

.mode-btn-name {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-main);
}

.mode-btn-ratio {
  font-size: 10px;
  font-weight: 500;
  color: var(--color-primary);
  margin-top: 1px;
}

.mode-btn-cycle {
  font-size: 8px;
  color: var(--text-muted);
}

.mode-btn.active {
  border-color: var(--color-gold);
  background: rgba(197, 160, 89, 0.08);
  box-shadow: 0 2px 8px rgba(197, 160, 89, 0.1);
}

.mode-description-text {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.75rem;
  text-align: center;
}

.comfortable-breath-note {
  font-size: 9px;
  font-style: italic;
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.current-rhythm-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  padding: 0.4rem 0.75rem;
  background: var(--bg-card);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.info-label {
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.info-details {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--text-main);
}

.info-details span strong.highlight {
  color: var(--color-primary);
}

/* Custom Rhythm Editor */
.custom-rhythm-editor {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-bottom: 0.75rem;
}

.custom-inputs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.custom-input-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.custom-input-box label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.input-with-unit {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-unit input {
  width: 100%;
  padding: 0.4rem;
  padding-right: 1.25rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  outline: none;
}

.input-with-unit span {
  position: absolute;
  right: 6px;
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
}

.custom-calc-summary {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 500;
  padding: 0.25rem;
}

.custom-validation-error {
  font-size: 9px;
  color: #ef4444;
  text-align: center;
  min-height: 12px;
}

/* Timer display */
.timer-counter-display {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: rgba(var(--color-primary-rgb), 0.03);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.display-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.85rem;
  text-align: center;
}

.display-box.highlight-box {
  background: rgba(var(--color-primary-rgb), 0.05);
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
}

.display-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.display-value {
  font-family: var(--font-sacred);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-main);
  margin-top: 2px;
}

.display-box.highlight-box .display-value {
  color: var(--color-primary);
  font-size: var(--text-xl);
}

#meditationCtrlBtn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.9rem;
  border-radius: 14px;
  font-weight: 700;
  font-size: var(--text-sm);
  background: linear-gradient(135deg, var(--color-primary) 0%, #58111a 100%);
  color: var(--text-inverse);
  box-shadow: 0 4px 15px rgba(88, 17, 26, 0.2);
}

body.dark #meditationCtrlBtn {
  background: linear-gradient(135deg, var(--color-gold-bright) 0%, var(--color-gold) 100%);
  color: #120e0f;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

#meditationCtrlBtn.playing {
  background: #dc2626;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
  color: #ffffff;
}

/* Completion Checkbox */
.completion-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid var(--border-card);
  border-radius: 14px;
  transition: all 0.4s;
}

.completion-checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
}

.completion-checkbox-wrapper input {
  display: none;
}

.custom-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-gold);
  border-radius: 4px;
  display: inline-block;
  position: relative;
  transition: all 0.3s;
}

.completion-checkbox-wrapper input:checked + .custom-checkbox {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.completion-checkbox-wrapper input:checked + .custom-checkbox::after {
  content: "✓";
  color: var(--text-inverse);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  font-weight: bold;
}

/* ==========================================================================
   UNIVERSE MORNING WISH
   ========================================================================== */

.universe-wish-card {
  position: relative;
}

.wish-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.75rem;
}

.wish-emoji {
  font-size: 1.5rem;
}

.wish-title {
  font-size: var(--text-sm);
  color: var(--color-secondary);
}

.wish-text {
  font-family: var(--font-sacred);
  font-size: var(--text-base);
  font-style: italic;
  line-height: 1.6;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.wish-author {
  text-align: right;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-secondary);
}

/* ==========================================================================
   DAILY CHECKLIST
   ========================================================================== */

.checklist-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.checklist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-b: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.checklist-subtitle {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.progress-ring-container {
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-ring-svg {
  transform: rotate(-90deg);
}

.progress-ring-circle {
  stroke-dasharray: 150.79; /* 2 * PI * r (r=24) */
  stroke-dashoffset: 150.79;
  transition: stroke-dashoffset 0.35s;
  stroke-linecap: round;
}

.progress-percent {
  position: absolute;
  font-size: 10px;
  font-weight: 750;
  font-family: var(--font-sacred);
}

.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checklist-item {
  border: 1px solid var(--border-card);
  border-radius: 18px;
  background-color: var(--bg-card);
  transition: all 0.3s;
}

.checklist-item.completed {
  border-color: rgba(197, 160, 89, 0.4);
  background-color: rgba(197, 160, 89, 0.03);
}

.checklist-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  cursor: pointer;
}

.checklist-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Custom Circle Checklist Checkbox */
.checklist-check-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-color);
  transition: all 0.3s;
}

.checklist-item.completed .checklist-check-circle {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.checklist-check-circle svg {
  width: 14px;
  height: 14px;
  color: var(--text-inverse);
  display: none;
}

.checklist-item.completed .checklist-check-circle svg {
  display: block;
}

.checklist-item-title {
  font-family: var(--font-sacred);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-main);
}

.checklist-item.completed .checklist-item-title {
  color: var(--color-gold);
}

.checklist-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 1px;
}

.save-badge {
  color: var(--color-emerald);
}
.save-badge.saving {
  color: var(--color-amber);
  animation: pulse 1s infinite;
}

.checklist-toggle-btn {
  font-size: var(--text-xs);
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-card);
}

.checklist-item-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  border-top: 0px solid transparent;
}

.checklist-item.expanded .checklist-item-content {
  max-height: 1200px;
  border-top: 1px solid var(--border-card);
}

.checklist-item-inner {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sanskrit-box {
  background: rgba(197, 160, 89, 0.05);
  border-left: 3px solid var(--color-gold);
  padding: 0.85rem;
  border-radius: 8px;
  text-align: center;
  font-family: var(--font-sacred);
  font-size: var(--text-sm);
  line-height: 1.6;
  white-space: pre-line;
  color: var(--text-main);
}

.section-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.block-label {
  font-size: 8px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.block-value {
  font-size: var(--text-xs);
  line-height: 1.5;
}

.block-value.italic {
  font-family: var(--font-sacred);
  font-style: italic;
}

.benefits-box {
  background: rgba(var(--color-primary-rgb), 0.03);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border-left: 2px solid var(--color-secondary);
}

.note-input-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.note-textarea {
  width: 100%;
  min-height: 60px;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  resize: vertical;
  outline: none;
}

.note-textarea:focus {
  border-color: var(--color-gold);
}

/* Reflections Summary */
.reflections-summary-card h4 {
  font-size: var(--text-sm);
  color: var(--color-primary);
  margin-bottom: 4px;
}

.summary-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.summary-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.summary-box {
  padding: 0.75rem;
  border-radius: 12px;
  background: rgba(197, 160, 89, 0.04);
  border: 1px solid rgba(197, 160, 89, 0.08);
}

.summary-box-title {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-secondary);
}

.summary-box-text {
  font-family: var(--font-sacred);
  font-size: var(--text-xs);
  font-style: italic;
  margin-top: 2px;
  color: var(--text-main);
  line-height: 1.4;
}

/* ==========================================================================
   MILESTONES & STREAKS
   ========================================================================== */

.streaks-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.streak-badges-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.streak-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.85rem;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
}

.streak-icon {
  font-size: 1.8rem;
}

.streak-info-box {
  display: flex;
  flex-direction: column;
}

.streak-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.streak-value {
  font-family: var(--font-sacred);
  font-size: var(--text-lg);
  font-weight: 700;
}

.streak-badge.total-badge {
  width: 100%;
}

.streak-badge.total-badge .streak-value {
  font-size: var(--text-xl);
  color: var(--text-main);
}

/* ==========================================================================
   ANALYTICS CHARTS
   ========================================================================== */

.analytics-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chart-tabs {
  display: flex;
  gap: 4px;
  background: rgba(var(--color-primary-rgb), 0.05);
  border-radius: 10px;
  padding: 2px;
  border: 1px solid var(--border-color);
}

.chart-tab {
  flex: 1;
  padding: 0.4rem;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: 8px;
  color: var(--text-muted);
}

.chart-tab.active {
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.chart-container {
  width: 100%;
  height: 180px;
  position: relative;
}

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

/* Chart Styles */
.chart-grid-line {
  stroke: var(--border-card);
  stroke-dasharray: 2 4;
}

.chart-bar {
  fill: url(#chart-bar-gradient);
  cursor: pointer;
  transition: fill 0.3s;
}

.chart-bar:hover {
  fill: url(#chart-bar-hover-gradient);
}

.chart-axis-text {
  font-family: var(--font-body);
  font-size: 8px;
  font-weight: 500;
  fill: var(--text-muted);
}

.chart-tooltip {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--color-gold);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 9px;
  font-weight: 600;
  box-shadow: var(--shadow-premium);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
}

.chart-summary-info {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
}

.summary-item {
  display: flex;
  flex-direction: column;
}

.summary-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.summary-value {
  font-family: var(--font-sacred);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 2px;
}

/* ==========================================================================
   HISTORY LOGS
   ========================================================================== */

.history-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.history-search-row {
  width: 100%;
}

.history-search-row input {
  width: 100%;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  outline: none;
}

.history-search-row input:focus {
  border-color: var(--color-gold);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 4px;
}

.empty-history-text {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
  padding: 2rem;
}

.history-item {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.history-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-item-date {
  font-family: var(--font-sacred);
  font-size: var(--text-xs);
  font-weight: 700;
}

.history-delete-btn {
  font-size: 10px;
  color: #ef4444;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.08);
}

.history-delete-btn:hover {
  background: rgba(239, 68, 68, 0.15);
}

.history-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  text-align: center;
}

.history-metric-box {
  background: rgba(var(--color-primary-rgb), 0.02);
  padding: 4px;
  border-radius: 6px;
}

.history-metric-label {
  font-size: 7px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.history-metric-value {
  font-size: 10px;
  font-weight: 700;
}

.history-reflections-block {
  font-family: var(--font-sacred);
  font-size: var(--text-xs);
  font-style: italic;
  line-height: 1.4;
  padding-left: 6px;
  border-left: 2px solid var(--color-gold);
}

/* ==========================================================================
   VEDANTIC WISDOM TAB PANEL
   ========================================================================== */

.wisdom-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tabs-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.wisdom-tab {
  padding: 0.5rem 1rem;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: 8px;
  color: var(--text-muted);
}

.wisdom-tab.active {
  background: var(--color-primary);
  color: var(--text-inverse);
}

body.dark .wisdom-tab.active {
  color: #120e0f;
}

.wisdom-content {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--text-main);
  animation: fade-in 0.4s ease-out;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.wisdom-content h5 {
  font-family: var(--font-sacred);
  font-size: var(--text-base);
  font-weight: 700;
  margin: 1rem 0 0.25rem 0;
  color: var(--color-primary);
}

.wisdom-content p {
  margin-bottom: 0.75rem;
}

.wisdom-content ul {
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.wisdom-content li {
  margin-bottom: 0.25rem;
}

/* ==========================================================================
   VEDANTA CELEBRATION MODAL
   ========================================================================== */

.celebration-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1.5rem;
}

.celebration-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 151;
}

.celebration-card {
  width: 100%;
  max-width: 460px;
  background-color: var(--bg-card);
  text-align: center;
  z-index: 152;
  position: relative;
  overflow: hidden;
  border: 2px solid var(--color-gold);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  animation: pop-up 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@keyframes pop-up {
  0% { transform: scale(0.8) translateY(50px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.celebration-symbol {
  font-size: 4rem;
  animation: scale-bounce 2s infinite ease-in-out;
  color: var(--color-gold-bright);
}

@keyframes scale-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.celebration-title {
  font-size: var(--text-2xl);
  color: var(--color-primary);
  font-weight: 700;
}

.celebration-message {
  font-family: var(--font-sacred);
  font-size: var(--text-sm);
  line-height: 1.6;
  font-style: italic;
}

.celebration-message small {
  color: var(--color-gold);
  font-family: var(--font-sacred);
}

.celebration-stats-summary {
  display: flex;
  justify-content: center;
  background: rgba(var(--color-primary-rgb), 0.03);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1rem;
}

.celebration-stat-box {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.celebration-stat-box.border-left {
  border-left: 1px solid var(--border-color);
}

.celebration-stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
}

.celebration-stat-value {
  font-family: var(--font-sacred);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 2px;
}

.btn-celebration-close {
  width: 100%;
  padding: 0.85rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: var(--text-sm);
  background: var(--color-primary);
  color: var(--text-inverse);
  box-shadow: 0 4px 15px rgba(var(--color-primary-rgb), 0.3);
}

body.dark .btn-celebration-close {
  background: var(--color-gold);
  color: #120e0f;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.app-footer {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   ACCESSIBILITY & UTILITIES
   ========================================================================== */

.hidden {
  display: none !important;
}

/* Spin animation for icons */
.animate-spin-slow {
  animation: spin 15s infinite linear;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
