/*
Astrology Quest - SPA Stylesheet
Responsive dark theme styling for the astrology insights app
*/

* {
  box-sizing: border-box;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  margin: 0;
  padding: 0;
  color: #e5e7eb;
  background: radial-gradient(1200px 800px at 20% -10%, #1f2937 0%, transparent 60%),
              radial-gradient(1000px 600px at 120% 0%, #0b1324 0%, transparent 50%),
              #0b1020;
  min-height: 100vh;
  overflow-x: hidden;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =========================
   Page Layout
   ========================= */
.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
}

.page-center {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.page-header {
  text-align: center;
  margin-bottom: 2rem;
}

.page-title {
  font-size: 2rem;
  font-weight: 800;
  color: #f9fafb;
  margin: 0 0 0.5rem 0;
}

.page-subtitle {
  font-size: 1rem;
  color: #94a3b8;
  margin: 0;
}

/* =========================
   Cards
   ========================= */
.card {
  border: 1px solid rgba(255,255,255,0.06);
  padding: 1.5rem;
  border-radius: 16px;
  background: linear-gradient(180deg, #0f172a, #0b1324);
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.card-elevated {
  background: linear-gradient(180deg, #1e293b, #0f172a);
  box-shadow: 0 15px 40px rgba(0,0,0,0.35);
}

/* =========================
   Forms
   ========================= */
.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}

.form-group label {
  display: block;
  color: #cbd5e1;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.9rem;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #111827;
  color: #e5e7eb;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #4f46e5;
}

.form-group input::placeholder {
  color: #64748b;
}

.form-group input:disabled {
  background: #1e293b;
  color: #64748b;
}

.form-group-inline {
  display: flex;
  gap: 1rem;
}

.form-group-inline .form-group {
  flex: 1;
}

/* Checkbox styling */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 0.15rem;
  accent-color: #4f46e5;
}

.checkbox-group label {
  font-size: 0.9rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.4;
}

.checkbox-group label a {
  color: #6366f1;
  text-decoration: underline;
}

/* Gender selector */
.gender-selector {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.gender-option {
  flex: 1;
  cursor: pointer;
}

.gender-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.gender-option .gender-label {
  display: block;
  text-align: center;
  padding: 0.75rem 0.5rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #111827;
  color: #94a3b8;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.gender-option input[type="radio"]:checked + .gender-label {
  border-color: #4f46e5;
  background: rgba(79, 70, 229, 0.15);
  color: #a5b4fc;
}

.gender-option:hover .gender-label {
  border-color: rgba(255, 255, 255, 0.2);
  background: #1e293b;
}

.gender-option input[type="radio"]:checked + .gender-label:hover {
  background: rgba(79, 70, 229, 0.2);
}

/* Location autocomplete */
.location-search-group {
  position: relative;
}

.location-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #1e293b;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  max-height: 250px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 0.5rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.location-results:empty {
  display: none;
}

.location-result-item {
  padding: 0.85rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.15s;
}

.location-result-item:last-child {
  border-bottom: none;
}

.location-result-item:hover {
  background: #334155;
}

.location-result-item .location-name {
  color: #f1f5f9;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.location-result-item .location-details {
  color: #94a3b8;
  font-size: 0.8rem;
}

.selected-location {
  margin-top: 0.5rem;
  padding: 0.6rem;
  background: rgba(79, 70, 229, 0.1);
  border: 1px solid rgba(79, 70, 229, 0.3);
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 0.85rem;
}

.location-search-loading {
  padding: 1rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
}

/* =========================
   Buttons
   ========================= */
button {
  font-size: 1.1rem;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
  width: 100%;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: #4f46e5;
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
  background: #334155;
  color: #cbd5e1;
}

.btn-secondary:hover:not(:disabled) {
  background: #475569;
}

.btn-success {
  background: #059669;
  color: #fff;
}

.btn-success:hover:not(:disabled) {
  background: #047857;
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.3);
}

.btn-relate {
  background: transparent;
  color: #10b981;
  border: 2px solid #10b981;
}

.btn-relate:hover:not(:disabled) {
  background: rgba(16, 185, 129, 0.15);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
}

.btn-large {
  font-size: 1.25rem;
  padding: 1.25rem 2rem;
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

button:active:not(:disabled) {
  transform: scale(0.98);
}

/* =========================
   Loading / Spinner
   ========================= */
.spinner {
  border: 4px solid rgba(255,255,255,0.1);
  border-top: 4px solid #4f46e5;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* =========================
   Invite Page
   ========================= */
.invite-page .logo {
  width: 80px;
  height: 80px;
  margin-bottom: 1.5rem;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #6366f1, #4338ca);
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.4);
}

.invite-input {
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 2px;
  font-size: 1.1rem !important;
}

/* =========================
   Onboarding Page
   ========================= */
.onboarding-page .card {
  margin-top: 1rem;
}

/* =========================
   Loading Page
   ========================= */
.loading-page {
  padding: 2rem 1rem;
}

.cosmos-animation {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto 2rem;
}

.star {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #fff;
  border-radius: 50%;
  animation: twinkle 2s ease-in-out infinite;
}

.star:nth-child(1) { top: 15%; left: 25%; animation-delay: 0s; }
.star:nth-child(2) { top: 55%; left: 75%; animation-delay: 0.7s; }
.star:nth-child(3) { top: 85%; left: 35%; animation-delay: 1.4s; }
.star:nth-child(4) { top: 30%; left: 80%; animation-delay: 0.3s; }
.star:nth-child(5) { top: 70%; left: 15%; animation-delay: 1s; }

.planet {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #6366f1, #4338ca);
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.4);
  animation: float 4s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); }
}

@keyframes float {
  0%, 100% { transform: translate(-50%, -50%) translateY(0px); }
  50% { transform: translate(-50%, -50%) translateY(-12px); }
}

/* Quote display */
.quote-container {
  max-width: 400px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
  min-height: 150px;
}

.quote-text {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #e5e7eb;
  font-style: italic;
  margin-bottom: 0.75rem;
  transition: opacity 0.5s ease-in-out;
}

.quote-author {
  font-size: 0.95rem;
  color: #94a3b8;
  font-weight: 500;
  transition: opacity 0.5s ease-in-out;
}

/* Generation status */
.generation-status {
  margin-top: 1.5rem;
  color: #cbd5e1;
}

.generation-status p {
  margin: 0.5rem 0;
  font-size: 0.95rem;
}

.progress-dots {
  display: inline-flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.progress-dots span {
  width: 8px;
  height: 8px;
  background: #4f46e5;
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

.progress-dots span:nth-child(1) { animation-delay: 0s; }
.progress-dots span:nth-child(2) { animation-delay: 0.3s; }
.progress-dots span:nth-child(3) { animation-delay: 0.6s; }

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* Ready button */
.ready-button-container {
  margin-top: 2rem;
}

/* =========================
   Coach Intro Carousel
   ========================= */
.coach-intro-page {
  padding: 1.5rem 1rem;
}

.coach-carousel {
  background: linear-gradient(180deg, #1e293b, #0f172a);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 1.5rem;
  max-width: 420px;
  width: 100%;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.carousel-header {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.coach-label {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.carousel-container {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease-out;
  height: 100%;
}

.carousel-slide {
  min-width: 100%;
  padding: 0 0.5rem;
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.carousel-slide.active {
  opacity: 1;
}

.slide-content {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.slide-title {
  color: #a5b4fc;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
}

.slide-text {
  color: #e2e8f0;
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
}

/* Bundle status (loading/ready) */
.bundle-status {
  margin-top: 2rem;
  text-align: center;
  padding: 1.5rem;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.bundle-loader {
  display: inline-flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.bundle-loader span {
  width: 10px;
  height: 10px;
  background: #6366f1;
  border-radius: 50%;
  animation: bundlePulse 1.5s ease-in-out infinite;
}

.bundle-loader span:nth-child(1) { animation-delay: 0s; }
.bundle-loader span:nth-child(2) { animation-delay: 0.2s; }
.bundle-loader span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bundlePulse {
  0%, 100% { transform: scale(0.8); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 1; }
}

.bundle-status-text {
  color: #94a3b8;
  font-size: 0.95rem;
  margin: 0;
}

.bundle-status-text.bundle-ready {
  color: #4ade80;
  font-weight: 500;
}

.bundle-ready-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #4ade80, #22c55e);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: white;
  margin-bottom: 0.75rem;
}

/* Carousel navigation dots */
.carousel-nav {
  padding: 1rem 0;
  display: flex;
  justify-content: center;
}

.carousel-dots {
  display: flex;
  gap: 0.5rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dot.active {
  background: #6366f1;
  transform: scale(1.2);
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* Carousel actions */
.carousel-actions {
  padding-top: 0.5rem;
}

.carousel-actions button {
  width: 100%;
}

.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* =========================
   Quest Page - Hook Cards
   ========================= */
.quest-page {
  padding-bottom: 100px; /* Space for bottom nav */
}

.hook-card {
  background: linear-gradient(180deg, #1e293b, #0f172a);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.hook-source {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.hook-source.self {
  background: rgba(79, 70, 229, 0.2);
  color: #a5b4fc;
}

.hook-source.ab {
  background: rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
}

.hook-theme {
  color: #f9fafb;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  line-height: 1.4;
}

.hook-conversation {
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.hook-conversation p {
  margin: 0.6rem 0;
}

.hook-conversation .person {
  color: #94a3b8;
}

.hook-conversation .coach {
  color: #e2e8f0;
}

.hook-conversation strong {
  color: #f1f5f9;
  font-weight: 600;
}

.hook-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.hook-actions button {
  font-size: 1rem;
  padding: 0.9rem 1rem;
}

/* =========================
   Treatment Card
   ========================= */
.treatment-card {
  background: linear-gradient(180deg, #1a2e38, #0f1f29);
  border: 1px solid rgba(5, 150, 105, 0.3);
  border-radius: 16px;
  padding: 1.5rem;
}

.treatment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.treatment-title {
  color: #f9fafb;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}

.treatment-timer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #94a3b8;
  font-size: 0.9rem;
}

.treatment-timer.ready {
  color: #10b981;
}

.treatment-section {
  margin-bottom: 1.25rem;
}

.treatment-section-title {
  color: #6ee7b7;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.treatment-section-content {
  color: #d1d5db;
  font-size: 0.95rem;
  line-height: 1.6;
}

.treatment-section-content ul {
  margin: 0;
  padding-left: 1.25rem;
}

.treatment-section-content li {
  margin-bottom: 0.4rem;
}

.treatment-affirmation {
  background: rgba(16, 185, 129, 0.1);
  border-left: 3px solid #10b981;
  padding: 1rem;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #d1fae5;
}

.treatment-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.treatment-actions button {
  flex: 1;
}

/* Multi-Step Treatment */
.treatment-card.multi-step {
  background: linear-gradient(180deg, #1a2e38, #0f1f29);
}

.treatment-progress-bar {
  margin-bottom: 1.5rem;
  text-align: center;
}

.progress-steps {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.progress-step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.progress-step .step-num {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
}

.progress-step.completed {
  background: #10b981;
  border-color: #10b981;
}

.progress-step.completed .step-num {
  color: white;
}

.progress-step.active {
  border-color: #6ee7b7;
  background: rgba(110, 231, 183, 0.2);
}

.progress-step.active .step-num {
  color: #6ee7b7;
}

.progress-text {
  font-size: 0.8rem;
  color: #64748b;
}

/* Treatment Type Badge */
.treatment-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.treatment-type-badge.meditation {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
}

.treatment-type-badge.journaling {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.treatment-type-badge.manifesting {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}

.treatment-type-badge.visualizing {
  background: rgba(236, 72, 153, 0.2);
  color: #f9a8d4;
}

.type-icon {
  font-size: 1rem;
}

.type-label {
  text-transform: capitalize;
}

.treatment-duration {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.25rem;
}

/* Treatment Content */
.step-content {
  font-size: 1rem;
  line-height: 1.7;
  color: #e5e7eb;
}

/* Timer Section */
.treatment-timer-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 0;
  margin: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-start-treatment {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-start-treatment:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-start-treatment:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.treatment-timer.active {
  font-size: 2rem;
  font-weight: 700;
  color: #6ee7b7;
  padding: 0.5rem 1.5rem;
  background: rgba(110, 231, 183, 0.1);
  border-radius: 8px;
}

/* Multi-step header adjustments */
.treatment-card.multi-step .treatment-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.treatment-card.multi-step .treatment-title {
  font-size: 1.3rem;
}

/* =========================
   Error State
   ========================= */
.error-container {
  text-align: center;
  padding: 2rem;
}

.error-message {
  color: #fca5a5;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

/* =========================
   Bottom Navigation
   ========================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), #0b1324);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 0.75rem 1rem;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  gap: 3rem;
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: #64748b;
  font-size: 0.75rem;
  text-decoration: none;
  transition: color 0.2s;
  cursor: pointer;
}

.nav-item.active {
  color: #6366f1;
}

.nav-item svg {
  width: 24px;
  height: 24px;
}

/* =========================
   Utilities
   ========================= */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: #94a3b8;
}

.text-small {
  font-size: 0.85rem;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* =========================
   Mobile Optimizations
   ========================= */
@media (max-width: 480px) {
  .page-title {
    font-size: 1.75rem;
  }

  .quote-text {
    font-size: 1.05rem;
  }

  .cosmos-animation {
    width: 140px;
    height: 140px;
  }

  .planet {
    width: 55px;
    height: 55px;
  }

  .hook-theme {
    font-size: 1.1rem;
  }

  .hook-conversation {
    font-size: 0.88rem;
  }
}

/* Safe area for iOS */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav {
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
  }

  .quest-page {
    padding-bottom: calc(100px + env(safe-area-inset-bottom));
  }
}

/* =========================
   Debug Mode
   ========================= */
.debug-toggle {
  position: fixed;
  bottom: 80px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 20px;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s, background 0.2s;
}

.debug-toggle:hover {
  transform: scale(1.1);
  background: rgba(79, 70, 229, 1);
}

.debug-panel {
  position: fixed;
  bottom: 130px;
  right: 16px;
  width: 280px;
  max-height: 60vh;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  z-index: 999;
  overflow: hidden;
  display: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.debug-panel.open {
  display: block;
}

.debug-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(99, 102, 241, 0.2);
  border-bottom: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  font-weight: 600;
  font-size: 0.85rem;
}

.debug-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.debug-close:hover {
  color: #f9fafb;
}

.debug-panel-content {
  padding: 0.75rem 1rem;
  max-height: calc(60vh - 50px);
  overflow-y: auto;
}

.debug-section {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.debug-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.debug-highlight {
  background: rgba(99, 102, 241, 0.1);
  border-radius: 8px;
  padding: 0.75rem;
  margin: 0 -0.5rem;
}

.debug-label {
  color: #64748b;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.15rem;
}

.debug-value {
  color: #e2e8f0;
  font-size: 0.85rem;
  font-family: monospace;
  margin-bottom: 0.5rem;
  word-break: break-all;
}

.debug-self {
  color: #a5b4fc;
  background: rgba(79, 70, 229, 0.2);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  display: inline-block;
}

.debug-ab {
  color: #d8b4fe;
  background: rgba(168, 85, 247, 0.2);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  display: inline-block;
}

/* =========================
   Stage 1 Complete Page
   ========================= */
.stage1-complete-page {
  padding: 2rem 1rem;
}

.stage-complete-icon {
  margin-bottom: 1.5rem;
}

.stage-complete-icon svg {
  color: #22c55e;
  filter: drop-shadow(0 0 20px rgba(34, 197, 94, 0.4));
}

.stage1-complete-page .page-title {
  color: #f9fafb;
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
}

.stage-complete-content {
  background: linear-gradient(180deg, #1e293b, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: left;
  max-width: 400px;
}

.stage-description {
  color: #cbd5e1;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.stage-stats {
  padding: 1rem;
  background: rgba(79, 70, 229, 0.1);
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.stage-stats p {
  margin: 0;
  text-align: center;
}

.stage-next {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.5rem;
}

.stage-next h3 {
  color: #a5b4fc;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.stage-next p {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

.stage-next strong {
  color: #e2e8f0;
}

/* =========================
   Card Transitions
   ========================= */
.hook-card,
.treatment-card {
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

/* Exit animation - slide out to left */
.hook-card.card-exit,
.treatment-card.card-exit {
  transform: translateX(-30px);
  opacity: 0;
}

/* Enter animation - slide in from right */
.hook-card.card-enter,
.treatment-card.card-enter {
  transform: translateX(30px);
  opacity: 0;
}

.hook-card.card-enter-active,
.treatment-card.card-enter-active {
  transform: translateX(0);
  opacity: 1;
}

/* Button press feedback */
.hook-actions button,
.treatment-actions button {
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.hook-actions button:active:not(:disabled),
.treatment-actions button:active:not(:disabled) {
  transform: scale(0.95);
}

/* Relate button special animation */
.btn-relate.relating {
  background: rgba(16, 185, 129, 0.25);
  animation: relateGlow 0.5s ease-out;
}

@keyframes relateGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  50% {
    box-shadow: 0 0 20px 10px rgba(16, 185, 129, 0.2);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Next button animation */
.btn-secondary.skipping {
  background: #475569;
}

/* ============================================
   V2 SESSION STYLES
   ============================================ */

/* Session Page Layout */
.session-v2-page {
  padding: 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0 1rem;
}

.session-progress {
  flex: 1;
}

.progress-dots {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #334155;
  transition: all 0.3s ease;
}

.progress-dot.completed {
  background: #10b981;
}

.progress-dot.active {
  background: #8b5cf6;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

.btn-icon {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: rgba(148, 163, 184, 0.1);
  color: #e2e8f0;
}

/* V2 Card Styles */
.card-v2 {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.card-type-indicator {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 1rem;
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
}

.card-type-indicator.opener {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.card-type-indicator.closer {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

.card-theme {
  font-size: 1.25rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.card-discovery {
  margin-bottom: 2rem;
}

.card-discovery .coach-message {
  font-size: 1rem;
  line-height: 1.7;
  color: #cbd5e1;
  opacity: 1;
  transform: none;
}

.reflection-prompt {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 12px;
  color: #a78bfa;
  font-size: 0.95rem;
}

.card-actions {
  display: flex;
  gap: 1rem;
}

.btn-skip {
  flex: 1;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: transparent;
  color: #94a3b8;
  border-radius: 12px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-skip:hover:not(:disabled) {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.5);
}

.btn-skip.selected {
  background: rgba(148, 163, 184, 0.2);
}

.card-actions .btn-relate {
  flex: 1;
  padding: 1rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.card-actions .btn-relate:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.card-actions .btn-relate.selected {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Gemstone Card Styling */
.gemstone-card {
  border: 1px solid rgba(251, 191, 36, 0.3);
  background: linear-gradient(145deg, #1e293b 0%, #1a1f2e 100%);
}

.gemstone-card .card-type-indicator.gemstone {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #1a1f2e;
}

.gemstone-actions {
  gap: 1rem;
}

.gemstone-actions .btn-secondary {
  flex: 1;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: transparent;
  color: #94a3b8;
  border-radius: 12px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gemstone-actions .btn-secondary:hover:not(:disabled) {
  background: rgba(148, 163, 184, 0.1);
}

.gemstone-actions .btn-cta {
  flex: 1;
  padding: 1rem;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #1a1f2e;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gemstone-actions .btn-cta:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

/* First-time Practice Introduction */
.first-time-intro {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.first-time-intro .intro-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #a78bfa;
  margin: 0 0 0.5rem 0;
}

.first-time-intro .intro-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #cbd5e1;
  margin: 0;
}

/* Practice Layer */
.practice-layer {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  border: 1px solid rgba(139, 92, 246, 0.2);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.practice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.practice-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(139, 92, 246, 0.15);
  border-radius: 20px;
  color: #a78bfa;
  font-size: 0.9rem;
  text-transform: capitalize;
}

.practice-type-badge.large {
  font-size: 1rem;
  padding: 0.75rem 1.25rem;
}

.practice-duration {
  color: #94a3b8;
  font-size: 0.9rem;
}

.practice-intro {
  font-size: 1rem;
  line-height: 1.7;
  color: #cbd5e1;
  margin-bottom: 1.5rem;
}

.practice-instructions {
  padding: 1.5rem;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.8;
  color: #e2e8f0;
  margin-bottom: 1.5rem;
}

/* Practice Timer */
.practice-timer {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

.timer-circle {
  position: relative;
  width: 120px;
  height: 120px;
}

.timer-circle svg {
  transform: rotate(-90deg);
}

.timer-bg {
  fill: none;
  stroke: #334155;
  stroke-width: 8;
}

.timer-progress {
  fill: none;
  stroke: #8b5cf6;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}

.timer-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  font-weight: 600;
  color: #f1f5f9;
}

.practice-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.practice-actions .btn-secondary {
  flex: 1;
}

.practice-actions .btn-primary {
  flex: 2;
}

.practice-actions .btn-primary.ready {
  animation: pulseReady 1.5s infinite;
}

@keyframes pulseReady {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4);
  }
  50% {
    box-shadow: 0 0 20px 5px rgba(139, 92, 246, 0.2);
  }
}

/* Acknowledgement Layer (shown after Relate on explore cards) */
.acknowledgement-layer {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  border: 1px solid rgba(139, 92, 246, 0.15);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.acknowledgement-content {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 1rem 0;
}

.acknowledgement-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #e2e8f0;
  text-align: left;
  margin: 0;
}

.acknowledgement-action {
  margin-top: 1.5rem;
}

.acknowledgement-action .btn-primary {
  width: 100%;
}

/* Session States */
.session-empty,
.session-generating,
.session-complete,
.celebration {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
  min-height: 60vh;
}

.empty-icon,
.complete-icon,
.celebration-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
}

.session-empty h2,
.session-generating h2,
.session-complete h2,
.celebration h2 {
  font-size: 1.5rem;
  color: #f1f5f9;
  margin-bottom: 0.75rem;
}

.generating-hint {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 1rem;
}

.session-stats {
  display: flex;
  gap: 2rem;
  margin: 2rem 0;
}

.session-stats .stat {
  text-align: center;
}

.session-stats .stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: #8b5cf6;
}

.session-stats .stat-label {
  font-size: 0.8rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Generating Animation */
.generating-animation {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 2rem;
}

.generating-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
}

.pulse-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 2px solid rgba(139, 92, 246, 0.3);
  border-radius: 50%;
  animation: pulseRing 2s ease-out infinite;
}

.pulse-ring.delay-1 {
  animation-delay: 0.5s;
}

.pulse-ring.delay-2 {
  animation-delay: 1s;
}

@keyframes pulseRing {
  0% {
    transform: scale(0.5);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* Daily Practice Prompt */
.daily-practice-prompt {
  margin-top: 2rem;
  padding-top: 2rem;
}

.practice-divider {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.practice-divider::before,
.practice-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(148, 163, 184, 0.2);
}

.practice-divider span {
  padding: 0 1rem;
  color: #94a3b8;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.practice-preview {
  background: rgba(139, 92, 246, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
}

.practice-preview .practice-intro {
  margin: 1rem 0 1.5rem;
  color: #cbd5e1;
}

/* Daily Practice Full */
.daily-practice-full {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

/* Streak Badge */
.streak-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(245, 158, 11, 0.1) 100%);
  border-radius: 16px;
  margin: 1rem 0;
}

.streak-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fbbf24;
}

.streak-label {
  font-size: 0.8rem;
  color: #fcd34d;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* History Page */
.history-v2-page {
  padding: 1rem;
  min-height: 100vh;
}

.history-v2-page .page-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.btn-back {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.btn-back:hover {
  background: rgba(148, 163, 184, 0.1);
  color: #e2e8f0;
}

.history-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border-radius: 16px;
  padding: 1.25rem;
  text-align: center;
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.stat-card.primary {
  border-color: rgba(139, 92, 246, 0.3);
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.stat-card .stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: #f1f5f9;
}

.stat-card.primary .stat-value {
  color: #a78bfa;
}

.stat-card .stat-label {
  font-size: 0.75rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* History Tiles (GitHub-style) */
.history-tiles-container {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.tiles-header {
  margin-bottom: 1rem;
  color: #94a3b8;
  font-size: 0.9rem;
}

.tiles-grid {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.tiles-week {
  display: flex;
  gap: 3px;
}

.tile {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: #1e293b;
}

.tile.empty {
  background: transparent;
}

.tile.level-0 {
  background: #1e293b;
}

.tile.level-1 {
  background: rgba(16, 185, 129, 0.2);
}

.tile.level-2 {
  background: rgba(16, 185, 129, 0.4);
}

.tile.level-3 {
  background: rgba(16, 185, 129, 0.6);
}

.tile.level-4 {
  background: #10b981;
}

.tiles-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
  margin-top: 1rem;
  font-size: 0.75rem;
  color: #64748b;
}

.tiles-legend .tile {
  width: 10px;
  height: 10px;
}

/* Button Large variant */
.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

/* =========================
   Bottom Navigation (E-NAV)
   ========================= */
.main-v2-page {
  padding: 0;
  padding-bottom: 70px; /* Space for bottom nav */
}

.tab-content {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 1) 100%);
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  padding: 0.5rem 0 calc(0.5rem + env(safe-area-inset-bottom));
  backdrop-filter: blur(10px);
  z-index: 100;
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1.5rem;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 8px;
}

.nav-tab svg {
  width: 24px;
  height: 24px;
  transition: transform 0.2s ease;
}

.nav-tab span {
  font-size: 0.7rem;
  font-weight: 500;
}

.nav-tab:hover {
  color: #94a3b8;
}

.nav-tab.active {
  color: #a78bfa;
}

.nav-tab.active svg {
  transform: scale(1.1);
}

/* =========================
   Practice Tab (E-NAV.1)
   ========================= */
.practice-tab {
  max-width: 400px;
  margin: 0 auto;
  padding-top: 1rem;
}

.streak-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(168, 85, 247, 0.1) 100%);
  border-radius: 16px;
  margin-bottom: 1.5rem;
}

.streak-flame {
  font-size: 2.5rem;
  animation: flame-pulse 2s ease-in-out infinite;
}

@keyframes flame-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.streak-info {
  flex: 1;
}

.streak-count {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f8fafc;
}

.streak-message {
  font-size: 0.9rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.streak-stats {
  display: flex;
  justify-content: space-around;
  padding: 1rem;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.streak-stats .stat {
  text-align: center;
}

.streak-stats .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f8fafc;
}

.streak-stats .stat-label {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.25rem;
}

/* Calendar Grid */
.calendar-grid {
  background: rgba(30, 41, 59, 0.3);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 0.5rem;
}

.calendar-header span {
  text-align: center;
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 500;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.day-tile {
  aspect-ratio: 1;
  border-radius: 6px;
  background: rgba(71, 85, 105, 0.2);
  transition: all 0.2s ease;
}

.day-tile.empty {
  background: transparent;
}

.day-tile.full {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

.day-tile.partial {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  box-shadow: 0 0 6px rgba(139, 92, 246, 0.3);
}

.day-tile.today {
  background: rgba(251, 191, 36, 0.2);
  border: 2px solid #fbbf24;
  animation: today-pulse 2s ease-in-out infinite;
}

@keyframes today-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.3); }
  50% { box-shadow: 0 0 12px 4px rgba(251, 191, 36, 0.2); }
}

.day-tile.future {
  background: rgba(71, 85, 105, 0.1);
  border: 1px dashed rgba(71, 85, 105, 0.3);
}

/* Practice Legend */
.practice-legend {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.75rem;
  color: #64748b;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.legend-dot.full {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.legend-dot.partial {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.legend-dot.today {
  background: rgba(251, 191, 36, 0.3);
  border: 1px solid #fbbf24;
}

/* Practice Empty State */
.practice-empty .empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
}

.practice-empty .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.practice-empty h3 {
  font-size: 1.25rem;
  color: #f8fafc;
  margin: 0 0 0.5rem 0;
}

.practice-empty p {
  color: #94a3b8;
  margin: 0 0 1.5rem 0;
}

/* =========================
   Discover Tab (E-NAV.2)
   ========================= */
.discover-tab {
  max-width: 500px;
  margin: 0 auto;
}

.discover-tab .session-header {
  padding: 0.5rem 0 1rem;
}

/* =========================
   Shop Tab (E-NAV.3)
   ========================= */
.shop-tab {
  max-width: 400px;
  margin: 0 auto;
  padding-top: 1rem;
}

.shop-empty .empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.5) 0%, rgba(15, 23, 42, 0.5) 100%);
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.shop-empty .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.shop-empty h3 {
  font-size: 1.25rem;
  color: #f8fafc;
  margin: 0 0 0.5rem 0;
}

.shop-empty p {
  color: #94a3b8;
  margin: 0 0 1.5rem 0;
  line-height: 1.5;
}

/* Gemstone Card Large */
.gemstone-card-large {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  text-align: center;
}

.gemstone-card-large .gem-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.gemstone-card-large h2 {
  font-size: 1.5rem;
  color: #fbbf24;
  margin: 0 0 1rem 0;
}

.gemstone-card-large .gem-description {
  color: #cbd5e1;
  line-height: 1.6;
  margin: 0 0 1.5rem 0;
}

.gem-details {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  color: #64748b;
  font-size: 0.85rem;
}

.detail-value {
  color: #f8fafc;
  font-size: 0.85rem;
}

.belief-hedge {
  color: #64748b;
  font-size: 0.8rem;
  margin-top: 1rem;
  line-height: 1.5;
}

/* Purchase Form */
.purchase-form {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border-radius: 20px;
  padding: 2rem 1.5rem;
}

.purchase-form h2 {
  color: #f8fafc;
  margin: 0 0 0.5rem 0;
  text-align: center;
}

.purchase-form .form-subtitle {
  color: #fbbf24;
  text-align: center;
  margin: 0 0 1.5rem 0;
}

.purchase-form .form-group {
  margin-bottom: 1rem;
}

.purchase-form label {
  display: block;
  color: #94a3b8;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.purchase-form input,
.purchase-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  color: #f8fafc;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.purchase-form input:focus,
.purchase-form textarea:focus {
  outline: none;
  border-color: #a78bfa;
}

.purchase-form input::placeholder,
.purchase-form textarea::placeholder {
  color: #64748b;
}

.purchase-form button {
  width: 100%;
  margin-top: 0.5rem;
}

.purchase-form .btn-secondary {
  margin-top: 0.75rem;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

/* Purchase Success */
.purchase-success {
  text-align: center;
  padding: 3rem 1.5rem;
}

.purchase-success .success-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.purchase-success h2 {
  color: #10b981;
  margin: 0 0 1rem 0;
}

.purchase-success p {
  color: #94a3b8;
  margin: 0 0 2rem 0;
}
