:root {
  --app-bg: #050810;
  --card-bg: #0b1020;
  --card-bg-soft: #101626;
  --accent: #00ffd5;
  --accent-soft: rgba(0, 255, 213, 0.15);
  --danger-soft: rgba(255, 81, 110, 0.15);
  --text-main: #f5f7ff;
  --text-muted: #9aa4c6;
  --border-subtle: #1a2236;
  --radius-lg: 24px;
  --radius-md: 16px;
}

body.light-mode {
  --app-bg: #f5f7fa;
  --card-bg: #ffffff;
  --card-bg-soft: #f0f3f7;
  --accent: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.12);
  --danger-soft: rgba(255, 81, 110, 0.1);
  --text-main: #1a202c;
  --text-muted: #718096;
  --border-subtle: #e2e8f0;
  background: linear-gradient(135deg, #f0f4f8 0%, #fafbfc 55%, #f5f7fa 100%);
}

body.light-mode .phone-frame {
  background: linear-gradient(135deg, #e0e7ff, #f0f4f8);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

body.light-mode .phone-inner {
  background: var(--app-bg);
}

body.light-mode .status-bar {
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

body.light-mode .status-center {
  color: var(--accent);
  font-weight: 600;
}

body.light-mode .app-title {
  color: var(--accent);
  font-weight: 700;
}

body.light-mode .app-subtitle,
body.light-mode .app-kicker {
  color: var(--text-muted);
}

body.light-mode .avatar-pill {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.25);
}

body.light-mode .avatar-name {
  color: var(--text-main);
}

body.light-mode .card-soft {
  background: var(--card-bg);
  background-image: none;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

body.light-mode .section-block {
  background: var(--card-bg-soft);
  border-color: var(--border-subtle);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

body.light-mode .card-section-title {
  color: var(--text-muted);
  font-weight: 600;
}

body.light-mode .section-title {
  color: var(--text-main);
}

body.light-mode .section-subtitle {
  color: var(--text-muted);
}

body.light-mode .balance-amount {
  color: var(--accent);
}

body.light-mode .balance-label,
body.light-mode .goal-chip,
body.light-mode .item-meta,
body.light-mode .budget-summary,
body.light-mode .budget-advice {
  color: var(--text-muted);
}

body.light-mode .item-title,
body.light-mode .item-right {
  color: var(--text-main);
}

body.light-mode .progress-bar-outer {
  background: rgba(99, 102, 241, 0.1);
}

body.light-mode .progress-bar-inner {
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

body.light-mode .pill-accent {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent);
}

body.light-mode .pill-muted {
  background: rgba(99, 102, 241, 0.08);
  color: var(--text-muted);
}

body.light-mode .chat-bubble-user {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

body.light-mode .chat-bubble-bot {
  background: var(--card-bg-soft);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

body.light-mode #coachMessages {
  background: var(--card-bg-soft);
  border-color: var(--border-subtle);
}

body.light-mode .select-ghost,
body.light-mode .budget-form input,
body.light-mode .budget-form select,
body.light-mode .coach-input input {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

body.light-mode .select-ghost:focus,
body.light-mode .budget-form input:focus,
body.light-mode .budget-form select:focus,
body.light-mode .coach-input input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

body.light-mode .budget-form {
  background: var(--card-bg);
  border-color: var(--border-subtle);
}

body.light-mode .budget-form label {
  color: var(--text-muted);
}

body.light-mode .budget-form button,
body.light-mode .coach-input button {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  border: none;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

body.light-mode .quick-question-btn {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

body.light-mode .quick-question-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(99, 102, 241, 0.08);
}

body.light-mode .bottom-nav {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
}

body.light-mode .nav-btn {
  color: var(--text-muted);
}

body.light-mode .nav-btn.active {
  color: var(--accent);
  text-shadow: 0 0 0;
  font-weight: 700;
}

body.light-mode .lesson-card {
  background: var(--card-bg);
  border-color: var(--border-subtle);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

body.light-mode .lesson-card:hover {
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
  border-color: var(--accent);
}

body.light-mode .lesson-title,
body.light-mode .ebook-title {
  color: var(--text-main);
  font-weight: 700;
}

body.light-mode .lesson-meta {
  color: var(--text-muted);
}

body.light-mode .lesson-progress {
  background: rgba(99, 102, 241, 0.1);
}

body.light-mode .lesson-progress-inner {
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

body.light-mode .lesson-content {
  background: var(--card-bg);
  border-color: var(--border-subtle);
}

body.light-mode .lesson-content h3,
body.light-mode .lesson-content h2 {
  color: var(--accent);
  font-weight: 700;
}

body.light-mode .lesson-content p,
body.light-mode .lesson-content li,
body.light-mode .ebook-content p,
body.light-mode .ebook-content li {
  color: var(--text-main);
  line-height: 1.6;
}

body.light-mode .lesson-content .tip {
  background: rgba(99, 102, 241, 0.12);
  border-left: 3px solid var(--accent);
  color: var(--text-main);
}

body.light-mode .lesson-btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
}

body.light-mode .lesson-btn-secondary {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

body.light-mode .ebook-reader {
  background: var(--card-bg);
  border-color: var(--border-subtle);
}

body.light-mode .ebook-content {
  background: var(--card-bg-soft);
  border-color: var(--border-subtle);
  color: var(--text-main);
}

body.light-mode .ebook-btn {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

body.light-mode .ebook-btn:hover {
  background: var(--card-bg-soft);
  border-color: var(--accent);
}

body.light-mode .settings-section {
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 0;
}

body.light-mode .settings-title {
  color: var(--text-main);
  font-weight: 700;
}

body.light-mode .settings-label {
  color: var(--text-main);
}

body.light-mode .settings-control {
  color: var(--accent);
}

body.light-mode .settings-btn {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  border: none;
}

body.light-mode .feedback-form {
  background: var(--card-bg);
}

body.light-mode .feedback-title {
  color: var(--text-main);
  font-weight: 600;
}

body.light-mode .feedback-input {
  background: var(--card-bg-soft);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

body.light-mode .feedback-input::placeholder {
  color: var(--text-muted);
}

body.light-mode .rating-star {
  color: var(--text-muted);
}

body.light-mode .rating-star.active {
  color: var(--accent);
}

body.light-mode .feedback-btn {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
}

body.light-mode .modal-content {
  background: var(--card-bg);
  color: var(--text-main);
}

body.light-mode .modal-title {
  color: var(--text-main);
  font-weight: 700;
}

body.light-mode .modal-btn {
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

body.light-mode .modal-btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  border: none;
}

body.light-mode .modal-btn-secondary {
  background: var(--card-bg-soft);
}

body.light-mode .notification {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

body.light-mode .close-btn {
  color: var(--text-main);
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  padding: 16px;
  background: radial-gradient(circle at top, #111b3a 0, #02030a 55%, #000 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  overflow: hidden;
}

.phone-frame {
  width: 390px;
  max-width: 100%;
  border-radius: 40px;
  padding: 10px;
  background: linear-gradient(135deg, #2a3cff, #00ffd5);
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  max-height: 100%;
  display: flex;
  overflow: hidden;
}

.phone-inner {
  background: var(--app-bg);
  border-radius: 32px;
  padding: 8px 10px 6px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 8px 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.status-center {
  font-family: 'Orbitron', sans-serif;
  letter-spacing: .14em;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--accent);
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 4px 8px;
}

.app-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}

.app-subtitle {
  font-size: 11px;
  color: var(--text-muted);
}

.app-kicker {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-top: 2px;
}

.avatar-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.03);
}

.avatar-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg,#00ffd5,#4f46e5);
}

.avatar-name {
  font-size: 11px;
}

.app-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding-bottom: 8px;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.app-body::-webkit-scrollbar {
  width: 6px;
}

.app-body::-webkit-scrollbar-track {
  background: transparent;
}

.app-body::-webkit-scrollbar-thumb {
  background: rgba(0,255,213,0.35);
  border-radius: 999px;
}

.screen {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.screen.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.card-soft {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 14px 14px 12px;
  border: 1px solid var(--border-subtle);
  margin-bottom: 10px;
  backdrop-filter: blur(12px);
  background-image: linear-gradient(145deg, rgba(11,16,32,0.96), rgba(8,10,24,0.96));
}

.card-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.balance-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}

.balance-amount {
  font-size: 26px;
  font-weight: 600;
}

.balance-label {
  font-size: 11px;
  color: var(--text-muted);
}

.goal-chip {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

.progress-bar-outer {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #060918;
  overflow: hidden;
  margin-top: 6px;
}

.progress-bar-inner {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg,#00ffd5,#4f46e5);
  width: 58%;
}

.section-block {
  background: var(--card-bg-soft);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px solid var(--border-subtle);
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
}

.section-subtitle {
  font-size: 11px;
  color: var(--text-muted);
}

.item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  gap: 10px;
}

.item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.item-title {
  font-size: 12px;
}

.item-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.item-right {
  text-align: right;
  font-size: 12px;
}

.badge-level {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(0,255,213,0.08);
  color: var(--accent);
}

.pill {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pill-accent {
  background: var(--accent-soft);
  color: var(--accent);
}

.pill-muted {
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
}

.divider-soft {
  height: 1px;
  background: rgba(255,255,255,0.04);
  margin: 4px 0;
}

.chat-bubble {
  max-width: 80%;
  padding: 6px 10px;
  border-radius: 16px;
  font-size: 11px;
  margin-bottom: 4px;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.2s ease, transform 0.2s ease;
  animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.chat-bubble-user {
  margin-left: auto;
  background: linear-gradient(135deg,#00ffd5,#4f46e5);
  color: #000814;
}

.chat-bubble-bot {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}

.select-ghost {
  width: 100%;
  padding: 6px 8px;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: 8px;
  font-size: 11px;
}

.budget-summary {
  font-size: 11px;
  color: var(--text-muted);
}

.budget-advice {
  font-size: 11px;
  margin-top: 4px;
  color: var(--text-muted);
}

.budget-form {
  background: var(--card-bg);
  padding: 10px;
  border-radius: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--border-subtle);
}

.budget-form input,
.budget-form select {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 11px;
  margin-bottom: 6px;
  width: 100%;
}

.budget-form label {
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}

.budget-form button {
  background: linear-gradient(135deg,#00ffd5,#4f46e5);
  color: #000814;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  cursor: pointer;
  font-weight: 600;
  width: 100%;
}

.budget-form button:active {
  transform: translateY(1px);
  animation: pulse 0.2s ease;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.coach-chat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

#coachMessages {
  height: auto;
  max-height: 45vh;
  min-height: 140px;
  overflow-y: auto;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
}

.coach-input {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.coach-input input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 11px;
}

.coach-input button {
  background: var(--accent);
  color: #000814;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 11px;
  flex-shrink: 0;
}

.coach-input button:active {
  transform: translateY(1px);
  animation: pulse 0.2s ease;
}

.quick-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.quick-question-btn {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  color: var(--text-muted);
  cursor: pointer;
}

.quick-question-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.bottom-nav {
  margin-top: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(4,7,18,0.96);
  border: 1px solid rgba(255,255,255,0.04);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
}

.nav-btn {
  flex: 1;
  text-align: center;
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 0;
  cursor: pointer;
}

.nav-btn i {
  font-size: 15px;
}

.nav-btn.active {
  color: var(--accent);
  font-weight: 600;
  text-shadow: 0 0 6px rgba(0,255,213,0.7);
}

.learning-path {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lesson-card {
  background: var(--card-bg-soft);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lesson-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,255,213,0.15);
}

.lesson-title {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}

.lesson-meta {
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lesson-progress {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}

.lesson-progress-inner {
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}

.lesson-content {
  padding: 10px;
  background: var(--card-bg-soft);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-top: 10px;
}

.lesson-content h3 {
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--accent);
}

.lesson-content p {
  font-size: 12px;
  margin-bottom: 10px;
  line-height: 1.5;
}

.lesson-content ul {
  font-size: 12px;
  margin-bottom: 10px;
  padding-left: 20px;
}

.lesson-content li {
  margin-bottom: 4px;
}

.lesson-content .tip {
  background: rgba(0,255,213,0.08);
  border-left: 2px solid var(--accent);
  padding: 8px 10px;
  margin: 10px 0;
  font-size: 11px;
}

.lesson-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.lesson-btn {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.lesson-btn-primary {
  background: linear-gradient(135deg,#00ffd5,#4f46e5);
  color: #000814;
}

.lesson-btn-secondary {
  background: rgba(255,255,255,0.05);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.ebook-reader {
  background: var(--card-bg-soft);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
}

.ebook-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.ebook-title {
  font-size: 14px;
  font-weight: 600;
}

.ebook-controls {
  display: flex;
  gap: 8px;
}

.ebook-btn {
  padding: 4px 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 10px;
  color: var(--text-main);
  cursor: pointer;
}

.ebook-content {
  font-size: 12px;
  line-height: 1.6;
  max-height: 60vh;
  overflow-y: auto;
  padding: 10px;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06);
}

.ebook-content h2 {
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--accent);
}

.ebook-content h3 {
  font-size: 13px;
  margin-bottom: 6px;
}

.ebook-content p {
  margin-bottom: 10px;
}

.ebook-content ul {
  margin-bottom: 10px;
  padding-left: 20px;
}

.ebook-content li {
  margin-bottom: 4px;
}

.settings-section {
  margin-bottom: 15px;
}

.settings-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--accent);
}

.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.settings-label {
  font-size: 12px;
}

.settings-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255,255,255,0.1);
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.settings-btn {
  padding: 6px 12px;
  background: linear-gradient(135deg,#00ffd5,#4f46e5);
  color: #000814;
  border: none;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 10px;
}

.settings-btn:active {
  transform: translateY(1px);
  animation: pulse 0.2s ease;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 20px;
  width: 90%;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}

.modal-body {
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-btn {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.modal-btn-primary {
  background: linear-gradient(135deg,#00ffd5,#4f46e5);
  color: #000814;
  border: none;
}

.modal-btn-secondary {
  background: rgba(255,255,255,0.05);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 1000;
  max-width: 300px;
  transform: translateY(-20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.notification.show {
  transform: translateY(0);
  opacity: 1;
}

.notification-title {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--accent);
}

.notification-message {
  font-size: 11px;
  color: var(--text-muted);
}

.progress-tracker {
  background: var(--card-bg-soft);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px solid var(--border-subtle);
}

.progress-tracker-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.progress-item {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.progress-icon {
  margin-right: 8px;
  color: var(--accent);
}

.progress-text {
  flex: 1;
  font-size: 11px;
}

.progress-status {
  font-size: 10px;
  color: var(--text-muted);
}

.goal-card {
  background: var(--card-bg-soft);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px solid var(--border-subtle);
}

.goal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.goal-title {
  font-size: 12px;
  font-weight: 600;
}

.goal-amount {
  font-size: 11px;
  color: var(--text-muted);
}

.goal-progress {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}

.goal-progress-inner {
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}

.goal-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}

.goal-deadline {
  font-size: 10px;
  color: var(--text-muted);
}

.goal-saved {
  font-size: 10px;
  color: var(--accent);
}

.parent-access {
  background: var(--card-bg-soft);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
}

.parent-access-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--accent);
}

.parent-access-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.parent-access-input {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 11px;
}

.parent-access-btn {
  padding: 6px 12px;
  background: linear-gradient(135deg,#00ffd5,#4f46e5);
  color: #000814;
  border: none;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
}

.parent-access-btn:active {
  transform: translateY(1px);
  animation: pulse 0.2s ease;
}

.offline-banner {
  background: #ff516e;
  color: #000814;
  padding: 8px 12px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  display: none;
}

.customization-section {
  margin-bottom: 15px;
}

.customization-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--accent);
}

.color-picker {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.color-option {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
}

.color-option.active {
  border-color: white;
}

.font-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.font-option {
  padding: 4px 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 11px;
  cursor: pointer;
}

.font-option.active {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.feedback-form {
  background: var(--card-bg-soft);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
}

.feedback-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--accent);
}

.feedback-input {
  width: 100%;
  padding: 6px 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: 8px;
  font-size: 11px;
  margin-bottom: 8px;
}

.feedback-rating {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.rating-star {
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
}

.rating-star.active {
  color: var(--accent);
}

.feedback-btn {
  padding: 6px 12px;
  background: linear-gradient(135deg,#00ffd5,#4f46e5);
  color: #000814;
  border: none;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}

.feedback-btn:active {
  transform: translateY(1px);
  animation: pulse 0.2s ease;
}

@media (max-width: 600px) {
  body {
    padding: 0;
  }

  .phone-frame {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }

  .phone-inner {
    border-radius: 0;
  }

  .ebook-content, #coachMessages {
    max-height: 50vh;
  }
}

@media (min-width: 601px) and (max-width: 900px) {
  .phone-frame {
    width: 500px;
  }
}

.mb-1 { margin-bottom: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.text-end { text-align: right; }
