/* ============================================================
   ASTRA 2.0 — COMPONENT STYLES
   Sophisticated UI Components & Responsive Layouts
   ============================================================ */

/* ------------------------------------------------------------
   DESKTOP SIDEBAR & MOBILE BOTTOM NAVIGATION
   ------------------------------------------------------------ */
.astra-sidebar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--astra-deep-navy);
  border-right: 1px solid var(--astra-border-subtle);
  padding: 30px 20px 24px;
  flex-direction: column;
  justify-content: space-between;
  z-index: 100;
}

@media (min-width: 992px) {
  .astra-sidebar {
    display: flex;
  }
}

.sidebar-brand-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--astra-border-subtle);
  margin-bottom: 24px;
}

.sidebar-logo {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.sidebar-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--astra-text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}

.nav-item-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.nav-item-btn:hover {
  color: var(--astra-text-main);
  background: var(--astra-surface);
}

.nav-item-btn.active {
  color: #FFFFFF;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.22), rgba(214, 183, 122, 0.12));
  border-color: var(--astra-border-accent);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .nav-item-btn.active {
  color: var(--astra-violet);
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.2);
}

.nav-item-btn.active svg {
  stroke: var(--astra-violet);
  transform: scale(1.08);
}

/* Bottom Navigation (Mobile & Tablet) */
.astra-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--bottom-nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(17, 24, 43, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--astra-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1000;
}

[data-theme="light"] .astra-bottom-nav {
  background: rgba(255, 255, 255, 0.92);
}

@media (min-width: 992px) {
  .astra-bottom-nav {
    display: none;
  }
}

.bottom-nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
  height: 100%;
  background: transparent;
  border: none;
  color: var(--astra-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.bottom-nav-tab svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  transition: transform var(--transition-fast), stroke var(--transition-fast);
}

.bottom-nav-tab span {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.bottom-nav-tab.active {
  color: var(--astra-violet);
}

.bottom-nav-tab.active svg {
  stroke: var(--astra-violet);
  transform: translateY(-2px);
}

/* ------------------------------------------------------------
   HEADER BAR (MOBILE & TOP DESKTOP)
   ------------------------------------------------------------ */
.astra-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0 8px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-img {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-pill-btn {
  background: var(--astra-surface);
  border: 1px solid var(--astra-border-subtle);
  color: var(--astra-text-secondary);
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.icon-pill-btn:active {
  transform: scale(0.96);
}

.streak-pill {
  color: var(--astra-gold);
  border-color: var(--astra-border-gold);
  background: var(--astra-gold-soft);
}

.streak-flame-icon {
  width: 16px;
  height: 16px;
  stroke: var(--astra-gold);
  fill: none;
}

/* ------------------------------------------------------------
   GENERIC CARDS & SURFACES
   ------------------------------------------------------------ */
.astra-card {
  background: var(--astra-surface);
  border: 1px solid var(--astra-border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--astra-shadow-card);
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.astra-card:hover {
  border-color: var(--astra-border-accent);
}

.astra-card-subtle {
  background: var(--astra-deep-navy);
  border: 1px solid var(--astra-border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

/* Section Header standard */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title-box svg {
  width: 20px;
  height: 20px;
  stroke: var(--astra-violet);
  stroke-width: 2;
}

.section-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--astra-text-main);
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 0.78rem;
  color: var(--astra-text-muted);
}

/* ------------------------------------------------------------
   CIRCULAR PROGRESS RING & COMPLETION CARD
   ------------------------------------------------------------ */
.progress-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .progress-hero-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.hero-progress-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px;
  background: linear-gradient(135deg, var(--astra-surface) 60%, var(--astra-deep-navy) 100%);
}

.ring-container {
  position: relative;
  width: 108px;
  height: 108px;
  flex-shrink: 0;
}

.ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 8;
}

[data-theme="light"] .ring-circle-bg {
  stroke: rgba(15, 23, 42, 0.08);
}

.ring-circle-fill {
  fill: none;
  stroke: url(#astraProgressGrad);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 282.74;
  stroke-dashoffset: 282.74;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.ring-inner-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ring-percentage {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--astra-text-main);
  line-height: 1;
}

.ring-subtext {
  font-size: 0.62rem;
  text-transform: uppercase;
  color: var(--astra-text-muted);
  font-weight: 700;
  margin-top: 2px;
}

.hero-stats-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.greeting-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--astra-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.headline-text {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--astra-text-main);
  line-height: 1.25;
}

.stats-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.stat-pill {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--astra-surface-elevated);
  border: 1px solid var(--astra-border-subtle);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--astra-text-secondary);
}

.stat-pill strong {
  color: var(--astra-text-main);
}

/* Quick Routine Card (Right Hero Column) */
.quick-routine-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.routine-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--astra-violet);
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid var(--astra-border-accent);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  align-self: flex-start;
}

.btn-launch-routine {
  background: linear-gradient(135deg, var(--astra-violet), #7C3AED);
  color: #FFFFFF;
  border: none;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.btn-launch-routine:active {
  transform: scale(0.97);
}

/* ------------------------------------------------------------
   WISDOM CARD (STOIC / MINDFUL QUOTE)
   ------------------------------------------------------------ */
.quote-banner-card {
  border-left: 3px solid var(--astra-gold);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quote-category-tag {
  font-size: 0.68rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--astra-gold);
}

.quote-text-main {
  font-size: 0.98rem;
  line-height: 1.55;
  font-style: italic;
  color: var(--astra-text-main);
  transition: opacity 0.22s ease;
}

.quote-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.quote-author-name {
  font-size: 0.8rem;
  font-weight: 700;
  font-style: normal;
  color: var(--astra-sage);
}

.quote-actions-row {
  display: flex;
  gap: 8px;
}

.btn-icon-subtle {
  background: var(--astra-surface-elevated);
  border: 1px solid var(--astra-border-subtle);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--astra-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon-subtle:hover {
  color: var(--astra-text-main);
  border-color: var(--astra-border-accent);
}

/* ------------------------------------------------------------
   HABIT CARDS & LIST
   ------------------------------------------------------------ */
.habits-category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.habits-category-pills::-webkit-scrollbar {
  display: none;
}

.category-filter-btn {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--astra-surface);
  border: 1px solid var(--astra-border-subtle);
  color: var(--astra-text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.category-filter-btn.active {
  background: var(--astra-surface-elevated);
  color: var(--astra-violet);
  border-color: var(--astra-border-accent);
}

.habits-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.habit-card {
  background: var(--astra-surface);
  border: 1px solid var(--astra-border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  transition: all var(--transition-fast);
  cursor: pointer;
  position: relative;
}

.habit-card:hover {
  border-color: var(--astra-border-accent);
  background: var(--astra-surface-elevated);
}

.habit-card.completed {
  background: var(--astra-sage-soft);
  border-color: rgba(141, 185, 163, 0.35);
}

.habit-left-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

/* Checkbox button */
.habit-checkbox {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  border: 2px solid var(--astra-border-accent);
  background: var(--astra-deep-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.habit-card.completed .habit-checkbox {
  background: var(--astra-sage);
  border-color: var(--astra-sage);
  box-shadow: 0 0 10px rgba(141, 185, 163, 0.4);
}

.habit-checkbox svg {
  width: 16px;
  height: 16px;
  stroke: #FFFFFF;
  stroke-width: 2.8;
  fill: none;
  opacity: 0;
  transform: scale(0.5);
  transition: all var(--transition-fast);
}

.habit-card.completed .habit-checkbox svg {
  opacity: 1;
  transform: scale(1);
}

.habit-content-box {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.habit-title {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--astra-text-main);
  transition: color var(--transition-fast);
}

.habit-card.completed .habit-title {
  color: var(--astra-text-dim);
  text-decoration: line-through;
}

.habit-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  color: var(--astra-text-muted);
}

.habit-meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--astra-lavender);
}

.habit-meta-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.habit-actions-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.habit-btn-more {
  background: transparent;
  border: none;
  color: var(--astra-text-dim);
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.habit-btn-more:hover {
  color: var(--astra-text-main);
  background: var(--astra-surface-elevated);
}

/* ------------------------------------------------------------
   CALENDAR & HEATMAP (INSIGHTS)
   ------------------------------------------------------------ */
.insights-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.stat-kpi-card {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kpi-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--astra-text-muted);
}

.kpi-value {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--astra-text-main);
}

.kpi-delta {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--astra-sage);
}

/* Calendar Matrix */
.calendar-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.calendar-month-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--astra-text-main);
}

.calendar-grid-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--astra-text-dim);
  margin-bottom: 6px;
}

.calendar-grid-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-day-cell {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background: var(--astra-deep-navy);
  border: 1px solid var(--astra-border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--astra-text-secondary);
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
}

.cal-day-cell.today {
  border-color: var(--astra-gold);
  color: var(--astra-gold);
}

.cal-day-cell.complete-100 {
  background: rgba(141, 185, 163, 0.25);
  border-color: var(--astra-sage);
  color: var(--astra-text-main);
}

.cal-day-cell.complete-partial {
  background: rgba(167, 139, 250, 0.18);
  border-color: var(--astra-violet);
  color: var(--astra-text-main);
}

.cal-day-cell.empty {
  opacity: 0.2;
  pointer-events: none;
}

/* Heatmap Grid */
.heatmap-scroll-container {
  overflow-x: auto;
  padding-bottom: 8px;
}

.heatmap-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 13px);
  gap: 4px;
  width: max-content;
}

.heatmap-cell {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  background: var(--astra-deep-navy);
  border: 1px solid var(--astra-border-subtle);
}

.heatmap-cell[data-level="1"] { background: rgba(167, 139, 250, 0.25); }
.heatmap-cell[data-level="2"] { background: rgba(167, 139, 250, 0.55); }
.heatmap-cell[data-level="3"] { background: var(--astra-violet); }
.heatmap-cell[data-level="4"] { background: var(--astra-sage); }

/* SVG Trends Chart */
.chart-container {
  width: 100%;
  height: 220px;
  position: relative;
  margin-top: 10px;
}

/* ------------------------------------------------------------
   REWARDS & GAMIFICATION
   ------------------------------------------------------------ */
.rewards-header-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, var(--astra-surface), var(--astra-deep-navy));
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.badge-card {
  background: var(--astra-surface);
  border: 1px solid var(--astra-border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.badge-card.unlocked {
  border-color: var(--astra-border-gold);
  background: linear-gradient(145deg, var(--astra-surface), var(--astra-gold-soft));
}

.badge-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--astra-deep-navy);
  border: 1px solid var(--astra-border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-card.unlocked .badge-icon-box {
  background: var(--astra-gold-soft);
  border-color: var(--astra-gold);
}

.badge-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--astra-text-main);
}

.badge-desc {
  font-size: 0.68rem;
  color: var(--astra-text-muted);
  line-height: 1.3;
}

/* Quests List */
.quests-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quest-item-card {
  background: var(--astra-surface);
  border: 1px solid var(--astra-border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

/* ------------------------------------------------------------
   ASTRA JOURNAL
   ------------------------------------------------------------ */
.journal-prompts-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.journal-prompt-card {
  background: var(--astra-surface);
  border: 1px solid var(--astra-border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prompt-question-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--astra-lavender);
  display: flex;
  align-items: center;
  gap: 8px;
}

.journal-textarea {
  width: 100%;
  min-height: 90px;
  background: var(--astra-deep-navy);
  border: 1px solid var(--astra-border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--astra-text-main);
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition-fast);
}

.journal-textarea:focus {
  border-color: var(--astra-border-accent);
}

/* ------------------------------------------------------------
   ASTRA FLOW (MEDITATION, BREATHING, SOUNDS)
   ------------------------------------------------------------ */
.flow-hero-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 20px;
  gap: 20px;
}

.breathing-visualizer-circle {
  width: 170px;
  height: 170px;
  border-radius: var(--radius-full);
  background: radial-gradient(circle, rgba(167, 139, 250, 0.25) 0%, rgba(23, 31, 52, 0.4) 70%);
  border: 2px solid var(--astra-border-accent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 35px rgba(167, 139, 250, 0.15);
  transition: transform 4s cubic-bezier(0.4, 0, 0.2, 1);
}

.breathing-visualizer-circle.inhale {
  transform: scale(1.3);
  border-color: var(--astra-lavender);
  box-shadow: 0 0 50px rgba(196, 181, 253, 0.35);
}

.breathing-visualizer-circle.hold {
  transform: scale(1.3);
  border-color: var(--astra-gold);
}

.breathing-visualizer-circle.exhale {
  transform: scale(0.9);
  border-color: var(--astra-sage);
}

.breath-phase-text {
  font-size: 1.15rem;
  font-weight: 800;
  color: #FFFFFF;
}

.breath-timer-count {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--astra-gold);
}

/* Soundscapes Grid */
.soundscapes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.sound-toggle-btn {
  background: var(--astra-surface);
  border: 1px solid var(--astra-border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--astra-text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sound-toggle-btn.playing {
  border-color: var(--astra-sage);
  color: var(--astra-sage);
  background: var(--astra-sage-soft);
}

/* ------------------------------------------------------------
   MODALS, OVERLAYS & TOASTS
   ------------------------------------------------------------ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

@media (min-width: 768px) {
  .modal-overlay {
    align-items: center;
    padding: 20px;
  }
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-panel {
  background: var(--astra-surface);
  border: 1px solid var(--astra-border-subtle);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 22px calc(var(--safe-bottom) + 24px);
  transform: translateY(100%);
  transition: transform var(--transition-normal);
}

@media (min-width: 768px) {
  .modal-panel {
    border-radius: var(--radius-xl);
    transform: translateY(20px) scale(0.96);
  }
}

.modal-overlay.active .modal-panel {
  transform: translateY(0) scale(1);
}

/* Floating XP Particle */
.floating-xp-badge {
  position: fixed;
  pointer-events: none;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--astra-gold);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  z-index: 9999;
  animation: floatFadeUp 1.2s cubic-bezier(0.2, 1, 0.4, 1) forwards;
}

@keyframes floatFadeUp {
  0% { opacity: 0; transform: translateY(0) scale(0.7); }
  20% { opacity: 1; transform: translateY(-15px) scale(1.15); }
  100% { opacity: 0; transform: translateY(-50px) scale(0.9); }
}

/* Toast Message */
.astra-toast {
  position: fixed;
  top: calc(var(--safe-top) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--astra-surface-elevated);
  border: 1px solid var(--astra-border-accent);
  box-shadow: var(--astra-shadow-elevated);
  color: var(--astra-text-main);
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 3000;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: all var(--transition-normal);
  pointer-events: none;
}

.astra-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
