@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

:root {
  --primary: #6C5CE7;
  --primary-light: #A29BFE;
  --primary-dark: #5341C5;
  --secondary: #00B894;
  --secondary-light: #55EFC4;
  --accent: #FDCB6E;
  --accent-dark: #E4B04E;
  --danger: #FF6B6B;
  --danger-light: #FF8787;
  --bg: #F0EDFF;
  --bg-card: #FFFFFF;
  --bg-dark: #2D3436;
  --text: #2D3436;
  --text-secondary: #636E72;
  --text-light: #B2BEC3;
  --border: #E8E4F8;
  --shadow: 0 4px 20px rgba(108, 92, 231, 0.12);
  --shadow-lg: 0 8px 32px rgba(108, 92, 231, 0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --nav-height: 72px;
  --header-height: 56px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Nunito', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  max-width: 430px;
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 431px) {
  body {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    box-shadow: 0 0 40px rgba(108, 92, 231, 0.08);
  }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 0; height: 0; }

/* ===== ONBOARDING ===== */
.onboarding-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
  text-align: center;
  background: linear-gradient(160deg, #6C5CE7 0%, #A29BFE 50%, #DDA0DD 100%);
  color: #fff;
}

.onboarding-screen .logo {
  font-size: 64px;
  margin-bottom: 16px;
  animation: bounceIn 0.8s ease;
}

.onboarding-screen h1 {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 8px;
}

.onboarding-screen p {
  font-size: 15px;
  opacity: 0.85;
  line-height: 1.5;
  max-width: 280px;
  margin-bottom: 32px;
}

.onboarding-slides {
  width: 100%;
  max-width: 320px;
}

.onboarding-slide {
  display: none;
  flex-direction: column;
  align-items: center;
  animation: fadeSlideUp 0.5s ease;
}

.onboarding-slide.active { display: flex; }

.onboarding-slide .slide-icon {
  font-size: 80px;
  margin-bottom: 24px;
  animation: float 3s ease-in-out infinite;
}

.onboarding-slide h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
}

.onboarding-slide p {
  font-size: 14px;
  opacity: 0.8;
  margin-bottom: 32px;
}

.dots {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transition: var(--transition);
}

.dot.active {
  background: #fff;
  width: 28px;
  border-radius: 5px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 14px;
  border: none;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  gap: 8px;
  white-space: nowrap;
}

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

.btn-primary {
  background: #fff;
  color: var(--primary);
}

.btn-primary:hover { background: #F0EDFF; }

.btn-solid {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(108, 92, 231, 0.3);
}

.btn-solid:hover { background: var(--primary-dark); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--border);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-success {
  background: var(--secondary);
  color: #fff;
}

.btn-full { width: 100%; }

.btn-sm {
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 10px;
}

/* ===== QR SCAN SCREEN ===== */
.qr-scan-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
  text-align: center;
  background: linear-gradient(160deg, #2D3436 0%, #636E72 100%);
  color: #fff;
}

.qr-frame {
  width: 220px;
  height: 220px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.qr-frame::before {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--secondary-light);
  box-shadow: 0 0 20px var(--secondary);
  animation: qrScan 2s linear infinite;
}

.qr-frame .scan-icon { font-size: 64px; opacity: 0.6; }

/* ===== APP SHELL ===== */
.app-container {
  display: none;
  flex-direction: column;
  min-height: 100dvh;
  padding-bottom: var(--nav-height);
}

.app-container.active { display: flex; }

/* ===== HEADER ===== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 12px;
  padding-top: max(20px, env(safe-area-inset-top, 20px));
  min-height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
}

.app-header h1 {
  font-size: 20px;
  font-weight: 800;
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: none;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow);
  position: relative;
  transition: var(--transition);
}

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

.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: var(--nav-height);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: space-around;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.06);
  border-radius: 20px 20px 0 0;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 12px;
  transition: var(--transition);
  border: none;
  background: transparent;
  font-family: 'Nunito', sans-serif;
}

.nav-item .nav-icon {
  font-size: 24px;
  transition: var(--transition);
}

.nav-item .nav-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  transition: var(--transition);
}

.nav-item.active .nav-icon { transform: scale(1.15); }

.nav-item.active .nav-label {
  color: var(--primary);
  font-weight: 800;
}

.nav-item.active {
  background: var(--bg);
}

/* ===== SCREEN CONTAINER ===== */
.screen {
  display: none;
  flex-direction: column;
  padding: 0 20px 24px;
  animation: fadeSlideUp 0.35s ease;
  flex: 1;
}

.screen.active { display: flex; }

/* ===== DASHBOARD ===== */
.greeting {
  margin-bottom: 20px;
}

.greeting .hello {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 600;
}

.greeting h2 {
  font-size: 24px;
  font-weight: 900;
}

.balance-card {
  background: linear-gradient(135deg, var(--primary) 0%, #A29BFE 100%);
  border-radius: var(--radius);
  padding: 24px;
  color: #fff;
  margin-bottom: 20px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.balance-card::after {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}

.balance-card .label {
  font-size: 13px;
  opacity: 0.8;
  font-weight: 600;
}

.balance-card .amount {
  font-size: 36px;
  font-weight: 900;
  margin: 4px 0 16px;
}

.balance-card .points-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  background: rgba(255,255,255,0.15);
  padding: 8px 14px;
  border-radius: 10px;
  width: fit-content;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 6px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: 'Nunito', sans-serif;
}

.quick-action:active { transform: scale(0.95); }

.quick-action .qa-icon {
  font-size: 28px;
}

.quick-action .qa-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
}

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

.section-header h3 {
  font-size: 17px;
  font-weight: 800;
}

.section-header .see-all {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: 'Nunito', sans-serif;
}

/* ===== TASK CARDS ===== */
.task-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

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

.task-card .task-emoji {
  font-size: 36px;
  flex-shrink: 0;
}

.task-card .task-info {
  flex: 1;
  min-width: 0;
}

.task-card .task-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-card .task-meta {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

.task-card .task-points {
  flex-shrink: 0;
  background: var(--bg);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
}

.status-badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.overdue-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
}

/* ===== CARDS SCREEN ===== */
.card-visual {
  background: linear-gradient(135deg, var(--primary) 0%, #8B78F6 50%, #DDA0DD 100%);
  border-radius: 20px;
  padding: 28px 24px;
  color: #fff;
  margin-bottom: 20px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-visual::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
}

.card-visual::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -20px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}

.card-visual .card-brand {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 1px;
  opacity: 0.9;
}

.card-visual .card-number {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
  margin: 16px 0 20px;
}

.card-visual .card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.card-visual .card-holder {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.7;
}

.card-visual .card-holder-name {
  font-size: 15px;
  font-weight: 800;
}

.card-visual .card-expiry-label {
  font-size: 10px;
  opacity: 0.7;
}

.card-visual .card-expiry-value {
  font-size: 15px;
  font-weight: 800;
}

.card-actions-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.card-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 6px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: 'Nunito', sans-serif;
}

.card-action-btn:active { transform: scale(0.95); }

.card-action-btn .ca-icon { font-size: 24px; }

.card-action-btn .ca-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
}

/* ===== TRANSACTION LIST ===== */
.tx-list { margin-bottom: 16px; }

.tx-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.tx-item:last-child { border-bottom: none; }

.tx-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.tx-info { flex: 1; min-width: 0; }

.tx-merchant {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-date {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

.tx-amount {
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
}

.tx-amount.positive { color: var(--secondary); }
.tx-amount.negative { color: var(--text); }

/* ===== GAMIFICATION ===== */
.points-header {
  background: linear-gradient(135deg, var(--accent) 0%, #F39C12 100%);
  border-radius: var(--radius);
  padding: 24px;
  color: var(--bg-dark);
  margin-bottom: 20px;
  text-align: center;
  box-shadow: var(--shadow);
}

.points-header .pts-value {
  font-size: 42px;
  font-weight: 900;
}

.points-header .pts-label {
  font-size: 14px;
  font-weight: 700;
  opacity: 0.7;
}

.video-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
}

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

.video-thumb {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.video-thumb .play-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.video-thumb .shorts-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #FF0000;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.video-thumb .duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

.video-info {
  padding: 14px 16px;
}

.video-info h4 {
  font-size: 15px;
  font-weight: 700;
}

.video-info .video-meta {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 4px;
}

/* ===== QUIZ ===== */
.quiz-container {
  padding: 20px;
}

.quiz-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
}

.quiz-progress .qp-dot {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  transition: var(--transition);
}

.quiz-progress .qp-dot.done { background: var(--secondary); }
.quiz-progress .qp-dot.current { background: var(--primary); }

.quiz-question {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.4;
}

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

.quiz-option {
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-card);
  text-align: left;
  font-family: 'Nunito', sans-serif;
}

.quiz-option:active { transform: scale(0.98); }
.quiz-option.selected { border-color: var(--primary); background: var(--bg); color: var(--primary); }
.quiz-option.correct { border-color: var(--secondary); background: #E8FFF5; color: var(--secondary); }
.quiz-option.wrong { border-color: var(--danger); background: #FFE8E8; color: var(--danger); }

/* ===== NOTIFICATIONS ===== */
.notif-item {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.notif-item:active { transform: scale(0.98); }

.notif-item.unread { border-left: 3px solid var(--primary); }

.notif-icon {
  font-size: 28px;
  flex-shrink: 0;
  margin-top: 2px;
}

.notif-content { flex: 1; }

.notif-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.notif-body {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
  line-height: 1.4;
}

.notif-time {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 600;
  margin-top: 6px;
}

/* ===== MONEY REQUEST ===== */
.money-req-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
}

.money-req-card:active { transform: scale(0.98); }

.mr-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.mr-info { flex: 1; }

.mr-amount {
  font-size: 16px;
  font-weight: 800;
}

.mr-reason {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ===== SETTINGS ===== */
.settings-group {
  margin-bottom: 20px;
}

.settings-group-title {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding-left: 4px;
}

.settings-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
}

.settings-item:active { background: var(--bg); }

.settings-item .si-icon { font-size: 22px; }

.settings-item .si-label {
  flex: 1;
  font-size: 15px;
  font-weight: 700;
}

.settings-item .si-arrow {
  font-size: 14px;
  color: var(--text-light);
}

/* ===== MODAL / BOTTOM SHEET ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.active { display: flex; }

.bottom-sheet {
  background: var(--bg-card);
  border-radius: 24px 24px 0 0;
  padding: 24px;
  width: 100%;
  max-width: 430px;
  max-height: 85dvh;
  overflow-y: auto;
  animation: slideUp 0.35s ease;
}

.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin: 0 auto 20px;
}

.sheet-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 16px;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 600;
  transition: var(--transition);
  background: var(--bg-card);
  color: var(--text);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23636E72' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

textarea.form-input {
  resize: none;
  min-height: 80px;
}

/* ===== PIN OVERLAY ===== */
.pin-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--bg-dark);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  animation: fadeIn 0.3s ease;
}

.pin-overlay.active { display: flex; }

.pin-overlay h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 8px;
}

.pin-overlay p {
  font-size: 14px;
  opacity: 0.6;
  margin-bottom: 32px;
}

.pin-dots {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
}

.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4);
  transition: var(--transition);
}

.pin-dot.filled {
  background: var(--primary-light);
  border-color: var(--primary-light);
}

.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 80px);
  gap: 12px;
}

.pin-key {
  width: 80px;
  height: 60px;
  border-radius: 14px;
  border: none;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pin-key:active {
  background: rgba(255,255,255,0.25);
  transform: scale(0.95);
}

.pin-key.empty { background: transparent; cursor: default; }

/* ===== BACK BUTTON (Sub-screens) ===== */
.sub-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 12px;
  padding-top: max(20px, env(safe-area-inset-top, 20px));
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
}

.back-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: var(--bg-card);
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.back-btn:active { transform: scale(0.9); }

.sub-header h2 {
  font-size: 18px;
  font-weight: 800;
}

/* ===== DETAIL SCREEN ===== */
.detail-block {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.detail-row:last-child { border-bottom: none; }

.detail-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}

.detail-value {
  font-size: 14px;
  font-weight: 700;
}

/* ===== QUIZ RESULT ===== */
.quiz-result {
  text-align: center;
  padding: 40px 20px;
}

.quiz-result .result-icon {
  font-size: 80px;
  margin-bottom: 16px;
  animation: bounceIn 0.6s ease;
}

.quiz-result h2 {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 8px;
}

.quiz-result .result-points {
  font-size: 36px;
  font-weight: 900;
  color: var(--accent-dark);
  margin: 16px 0;
}

/* ===== REDEEM SECTION ===== */
.redeem-card {
  background: linear-gradient(135deg, var(--secondary) 0%, #00CEC9 100%);
  border-radius: var(--radius);
  padding: 20px;
  color: #fff;
  margin-bottom: 16px;
  cursor: pointer;
  box-shadow: var(--shadow);
  text-align: center;
}

.redeem-card h4 {
  font-size: 15px;
  font-weight: 700;
  opacity: 0.9;
}

.redeem-card .redeem-value {
  font-size: 24px;
  font-weight: 900;
  margin-top: 4px;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  text-align: center;
}

.empty-state .empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--bg-dark);
  color: #fff;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  z-index: 500;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  max-width: 380px;
}

.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--secondary); }
.toast.error { background: var(--danger); }

/* ===== FILTER CHIPS ===== */
.filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}

.chip {
  padding: 8px 16px;
  border-radius: 20px;
  border: 2px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  background: var(--bg-card);
  font-family: 'Nunito', sans-serif;
  transition: var(--transition);
  color: var(--text-secondary);
}

.chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== PROFILE ===== */
.profile-avatar-section {
  text-align: center;
  padding: 24px 0 20px;
}

.profile-avatar {
  font-size: 72px;
  margin-bottom: 12px;
  animation: bounceIn 0.6s ease;
}

.profile-name {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
}

.profile-age {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 4px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes bounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes qrScan {
  0% { top: -10%; }
  100% { top: 110%; }
}

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

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
