@font-face {
  font-family: 'Google Sans';
  src: url('./assets/GoogleSans-VariableFont_GRAD,opsz,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
}

:root {
  --font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bg-creme: #FFFDF9;
  --bg-warm: #FFF6EC;
  --bg-card: #FFFFFF;
  --text-dark: #1E1A17;
  --text-muted: #8E857E;
  
  --clay-orange-start: #FFC062;
  --clay-orange-end: #FFA338;
  --clay-card-grad: linear-gradient(135deg, #FFC46A 0%, #FFA843 60%, #FF9829 100%);
  --clay-card-shadow: 0 16px 32px -4px rgba(255, 145, 36, 0.28), 
                      0 6px 12px -2px rgba(255, 145, 36, 0.15),
                      inset 0 2px 4px rgba(255, 255, 255, 0.6),
                      inset 0 -3px 6px rgba(206, 96, 0, 0.18);
                      
  --clay-btn-grad: linear-gradient(180deg, #FFC772 0%, #FFAC42 100%);
  --clay-btn-shadow: 0 10px 22px rgba(255, 150, 44, 0.35), 
                     inset 0 2px 2px rgba(255, 255, 255, 0.7),
                     inset 0 -2px 4px rgba(189, 88, 0, 0.2);

  --clay-input-bg: #EFECE6;
  --clay-input-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.06);

  --success-grad: linear-gradient(135deg, #7CD659 0%, #4FB826 100%);
  --error-grad: linear-gradient(135deg, #FF7E70 0%, #F54336 100%);
  --accent-gold: #FFA439;
  
  --radius-pill: 9999px;
  --radius-card: 28px;
  --radius-inner: 18px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  background-color: #232221;
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  overflow-x: hidden;
}

/* Device Shell Container (Responsive Desktop & Mobile View) */
.app-container {
  width: 100%;
  max-width: 420px;
  height: 890px;
  max-height: 94vh;
  background-color: var(--bg-creme);
  border-radius: 46px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5), 0 0 0 8px #333230;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Atmospheric Organic Background Blobs (matching design Frame 1 & 2) */
.bg-blob {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.bg-blob-top-left {
  top: -60px;
  left: -50px;
  width: 220px;
  height: 220px;
  border-radius: 50% 60% 40% 70% / 60% 50% 70% 40%;
  border: 4px solid #FFE4BF;
  background: rgba(255, 243, 226, 0.6);
}

.bg-blob-bottom-right {
  bottom: -50px;
  right: -50px;
  width: 260px;
  height: 260px;
  border-radius: 60% 40% 70% 30% / 50% 60% 40% 70%;
  background: #FFE8CB;
  opacity: 0.85;
}

/* Status Bar Simulator */
.status-bar {
  position: relative;
  z-index: 10;
  padding: 14px 28px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: #383431;
}

.camera-notch {
  width: 12px;
  height: 12px;
  background-color: #1A1A1A;
  border-radius: 50%;
}

.status-icons {
  display: flex;
  gap: 6px;
}

/* Main Viewport */
.viewport {
  position: relative;
  z-index: 2;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 22px 100px;
  display: flex;
  flex-direction: column;
}

.viewport::-webkit-scrollbar {
  display: none;
}

/* SCREEN 1: LOGIN & TOTP */
.auth-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 30px;
}

.avatar-halo {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background-color: #FFECC8;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
}

.avatar-icon-svg {
  width: 72px;
  height: 72px;
  stroke: #1E1A17;
  stroke-width: 2.2;
  fill: none;
}

.screen-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 30px;
  line-height: 1.35;
  color: var(--text-dark);
}

.input-pill {
  width: 100%;
  height: 54px;
  border-radius: var(--radius-pill);
  background: var(--clay-input-bg);
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: var(--clay-input-shadow);
  padding: 0 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 14px;
  outline: none;
  transition: all 0.2s;
}

.input-pill:focus {
  background: #FFF;
  border-color: #FFA843;
  box-shadow: 0 0 0 3px rgba(255, 168, 67, 0.25);
}

.btn-pill-clay {
  width: 160px;
  height: 48px;
  border-radius: var(--radius-pill);
  background: var(--clay-btn-grad);
  box-shadow: var(--clay-btn-shadow);
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: #351C03;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  margin-top: 16px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-pill-clay:active {
  transform: scale(0.96);
  box-shadow: 0 4px 10px rgba(255, 150, 44, 0.3);
}

.btn-pill-full {
  width: 100%;
  height: 52px;
}

/* TOTP 2FA Box */
.totp-box {
  background: #FFFFFF;
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
  margin-top: 12px;
  text-align: center;
  width: 100%;
}

.totp-qr-img {
  width: 160px;
  height: 160px;
  margin: 12px auto;
  border-radius: 12px;
  border: 2px dashed #FFBE6B;
}

.totp-secret-text {
  font-family: monospace;
  background: #F8F5F0;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: #8C4700;
  user-select: all;
  margin-bottom: 14px;
}

/* SCREEN 2: COURSE TOPICS (FRAME 2 STYLE) */
.module-chip {
  align-self: center;
  background: #FCE1C2;
  border: 1px solid #F1CBA4;
  border-radius: var(--radius-pill);
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  color: #4C2F15;
  margin-bottom: 24px;
  text-align: center;
  box-shadow: 0 3px 8px rgba(200, 130, 60, 0.1);
}

.lesson-clay-card {
  width: 100%;
  height: 180px;
  border-radius: var(--radius-card);
  background: var(--clay-card-grad);
  box-shadow: var(--clay-card-shadow);
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.lesson-clay-card:hover {
  transform: translateY(-2px);
}

.lesson-clay-card:active {
  transform: scale(0.98);
}

.lesson-card-symbol {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 54px;
  font-weight: 700;
  color: #171412;
  letter-spacing: -1px;
}

.lesson-card-bottom {
  height: 52px;
  background: rgba(255, 230, 196, 0.45);
  backdrop-filter: blur(4px);
  border-top: 1px solid rgba(138, 70, 0, 0.15);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  color: #271A0E;
  padding: 0 16px;
  text-align: center;
}

.lesson-completed-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #50AF24;
  color: white;
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 8px rgba(80, 175, 36, 0.3);
}

/* FLOATING BOTTOM DOCK (FRAME 2 STYLE) */
.bottom-dock {
  position: absolute;
  bottom: 22px;
  left: 24px;
  right: 24px;
  height: 60px;
  background: rgba(255, 237, 219, 0.88);
  backdrop-filter: blur(14px);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 28px rgba(186, 107, 28, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 18px;
  z-index: 50;
}

.dock-streak {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.5);
  padding: 4px 12px 4px 6px;
  border-radius: var(--radius-pill);
}

.dock-fire-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.dock-streak-number {
  font-size: 17px;
  font-weight: 800;
  color: #E65A00;
}

.dock-nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s;
}

.dock-nav-item:hover {
  background: rgba(255, 255, 255, 0.7);
}

.dock-nav-item svg {
  width: 24px;
  height: 24px;
  stroke: #2E251E;
  fill: none;
  stroke-width: 2;
}

/* SATURDAY WARNING BANNER */
.saturday-alert {
  background: linear-gradient(135deg, #FFF1DF 0%, #FFE0B6 100%);
  border: 2px solid #FFA843;
  border-radius: 20px;
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 6px 16px rgba(255, 140, 0, 0.15);
}

.saturday-alert-fire {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  animation: pulse 1.6s infinite;
}

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

.saturday-alert-title {
  font-size: 13px;
  font-weight: 700;
  color: #B54700;
}

.saturday-alert-desc {
  font-size: 12px;
  color: #63432B;
  margin-top: 2px;
}

/* SCREEN 3: REDESIGNED LESSON & QUIZ VIEW (SOLVES USER'S COMPLAINT) */
.lesson-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.lesson-back-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #EFE8DC;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border: none;
}

.lesson-progress-bar {
  flex: 1;
  margin: 0 14px;
  height: 10px;
  background: #E8E2D7;
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
}

.lesson-progress-fill {
  height: 100%;
  width: 35%;
  background: var(--clay-btn-grad);
  border-radius: var(--radius-pill);
  transition: width 0.3s;
}

/* Interactive Theory Card */
.theory-card {
  background: #FFFFFF;
  border-radius: var(--radius-card);
  padding: 22px;
  box-shadow: 0 10px 24px rgba(200, 140, 70, 0.08);
  margin-bottom: 20px;
  border: 1px solid #F5ECE0;
}

.theory-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: #2E251E;
  margin-bottom: 12px;
}

.theory-card p {
  font-size: 15px;
  line-height: 1.65;
  color: #4A4038;
  margin-bottom: 14px;
}

/* Interactive Clickable Keywords */
.keyword-chip {
  display: inline-block;
  background: #FFF0DA;
  color: #B95300;
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  border-bottom: 2px dashed #FFA843;
  margin: 0 2px;
  transition: all 0.15s;
}

.keyword-chip:hover, .keyword-chip:active {
  background: #FFD8A3;
  transform: translateY(-1px);
}

.keyword-tooltip {
  margin-top: 10px;
  padding: 12px 16px;
  background: #FFF8EE;
  border-radius: 14px;
  border-left: 4px solid #FFA843;
  font-size: 13px;
  color: #553D2A;
  animation: fadeIn 0.2s;
}

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

/* Quiz Card Component */
.quiz-container {
  background: #FFFFFF;
  border-radius: var(--radius-card);
  padding: 22px;
  box-shadow: 0 12px 28px rgba(210, 145, 70, 0.1);
  margin-bottom: 24px;
  border: 1px solid #F7ECE0;
}

.quiz-question-badge {
  display: inline-block;
  background: #FFE9CB;
  color: #9E4B00;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 10px;
}

.quiz-question-text {
  font-size: 16px;
  font-weight: 700;
  color: #1F1914;
  margin-bottom: 18px;
  line-height: 1.4;
}

.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-option-btn {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-inner);
  background: #F8F5EF;
  border: 2px solid transparent;
  text-align: left;
  font-size: 15px;
  font-weight: 600;
  color: #38312B;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.03);
}

.quiz-option-btn:hover {
  background: #FFF2E0;
  border-color: #FFC062;
}

.quiz-option-btn.selected {
  background: #FFF0DB;
  border-color: #FFA843;
  color: #7A3600;
}

.quiz-option-btn.correct {
  background: #E8F8E2;
  border-color: #4CAF50;
  color: #1F6923;
}

.quiz-option-btn.wrong {
  background: #FEECEB;
  border-color: #F44336;
  color: #9C1F16;
}

.quiz-feedback-box {
  margin-top: 16px;
  padding: 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.5;
  animation: fadeIn 0.25s;
}

.quiz-feedback-box.correct {
  background: #E9F8E3;
  border: 1px solid #A6E39C;
  color: #226B26;
}

.quiz-feedback-box.wrong {
  background: #FEEDEC;
  border: 1px solid #F8AEAA;
  color: #A3251D;
}

/* Fill-in-the-blank interactive exercise */
.fill-blank-sentence {
  font-size: 18px;
  font-weight: 600;
  color: #2B231D;
  margin: 18px 0;
  text-align: center;
  line-height: 1.8;
}

.fill-blank-slot {
  display: inline-block;
  min-width: 90px;
  height: 38px;
  line-height: 36px;
  border-bottom: 3px solid #FFA843;
  background: #FFF4E5;
  border-radius: 8px;
  margin: 0 6px;
  color: #B25000;
  font-weight: 800;
  padding: 0 10px;
  vertical-align: middle;
}

.chips-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 14px;
}

.word-chip-btn {
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: #FFFFFF;
  border: 1px solid #E2D9CC;
  font-size: 15px;
  font-weight: 600;
  color: #383029;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.15s;
}

.word-chip-btn:hover {
  border-color: #FFA843;
  background: #FFF7EC;
}

.word-chip-btn.used {
  opacity: 0.4;
  pointer-events: none;
}

/* Flashcards Spaced Repetition View */
.flashcard-3d {
  width: 100%;
  height: 380px;
  perspective: 1000px;
  margin: 16px 0 24px;
  cursor: pointer;
}

.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.flashcard-3d.flipped .flashcard-inner {
  transform: rotateY(180deg);
}

.flashcard-front, .flashcard-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: var(--radius-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--clay-card-shadow);
}

.flashcard-front {
  background: var(--clay-card-grad);
}

.flashcard-back {
  background: #FFFFFF;
  transform: rotateY(180deg);
  border: 2px solid #FFCE8A;
}

.flashcard-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.flashcard-title {
  font-size: 32px;
  font-weight: 800;
  color: #171310;
  margin-top: 12px;
}

.flashcard-sub {
  font-size: 15px;
  color: #4C3725;
  font-style: italic;
}

.flashcard-translation {
  font-size: 28px;
  font-weight: 700;
  color: #B54E00;
}

.flashcard-example {
  background: #FFF7ED;
  padding: 12px;
  border-radius: 12px;
  font-size: 14px;
  color: #554132;
  margin-top: 8px;
}

/* ONBOARDING TIME PICKER (DRUM WHEEL) */
.drum-picker-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
  height: 150px;
  position: relative;
}

.drum-wheel {
  width: 70px;
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  border-radius: 16px;
  background: #F1EBE0;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
}

.drum-wheel::-webkit-scrollbar {
  display: none;
}

.drum-item {
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  font-weight: 700;
  color: #4B4138;
  scroll-snap-align: center;
}

.drum-item.active {
  color: #B75200;
  font-size: 24px;
}

.drum-colon {
  font-size: 32px;
  font-weight: 800;
  color: #FFA843;
}

.days-selector {
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
}

.day-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #EFECE6;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #615851;
  cursor: pointer;
  transition: all 0.2s;
}

.day-circle.selected {
  background: var(--clay-btn-grad);
  box-shadow: var(--clay-btn-shadow);
  color: #2E1A05;
}

/* CREATIVE WRITING & AI EVALUATOR */
.creative-textarea {
  width: 100%;
  height: 180px;
  border-radius: 20px;
  background: #FFFFFF;
  border: 1px solid #E5D9CB;
  padding: 16px;
  font-size: 15px;
  line-height: 1.5;
  color: #2B241E;
  margin: 14px 0;
  resize: none;
  outline: none;
}

.creative-textarea:focus {
  border-color: #FFA843;
  box-shadow: 0 0 0 3px rgba(255, 168, 67, 0.2);
}

.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--clay-btn-grad);
  box-shadow: var(--clay-btn-shadow);
  font-size: 24px;
  font-weight: 800;
  color: #2D1804;
  margin: 12px 0;
}

/* ADMIN PANEL */
.admin-card {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

.admin-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: #382D24;
  margin-bottom: 8px;
}

/* Modals & Alerts */
.modal-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-dialog {
  background: #FFFDF9;
  border-radius: 30px;
  padding: 26px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}
