/* ============================================
   LEARN EARN — CLEAN CSS v3
   Layout konsisten, mobile-first
   ============================================ */

:root {
  --green: #58cc02; --green-dark: #46a302; --green-light: #89e219;
  --blue: #1cb0f6; --blue-dark: #1899d6;
  --red: #ff4b4b; --red-dark: #ea2b2b;
  --yellow: #ffc800; --purple: #ce82ff; --orange: #ff9600;
  --gray: #e5e5e5; --gray-dark: #afafaf;
  --text: #1a1a1a; --text-light: #666; --text-muted: #999;
  --bg: #ffffff; --bg-alt: #f7f8fa; --border: #e8eaed;
  --radius: 16px; --radius-sm: 12px; --radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
  --grad-primary: linear-gradient(135deg, #58cc02 0%, #89e219 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-alt);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 90px;
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

/* Animated background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(at 20% 20%, rgba(88,204,2,0.12) 0%, transparent 50%),
    radial-gradient(at 80% 40%, rgba(28,176,246,0.1) 0%, transparent 50%),
    radial-gradient(at 40% 80%, rgba(206,130,255,0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* ============================================
   HEADER
   ============================================ */
.app-header {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1.5px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.brand-logo {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #ec4899 100%);
  background-size: 200% 200%;
  animation: logoGamingShine 3s ease infinite;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 22px;
  box-shadow: 0 6px 20px rgba(124,58,237,0.4), 0 0 30px rgba(236,72,153,0.2);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.brand-logo::before {
  content: '';
  position: absolute;
  top: -50%; right: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.3), transparent 60%);
  animation: rotate 10s linear infinite;
}
@keyframes logoGamingShine {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.brand-name {
  font-size: 18px;
  font-weight: 900;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.header-stats {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.stat {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-alt);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  border: 1.5px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
}

.stat-icon { font-size: 13px; }
.stat-val { color: var(--text); font-size: 12px; }

/* Level bar */
.level-bar-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.level-bar {
  flex: 1;
  height: 10px;
  background: var(--gray);
  border-radius: 999px;
  overflow: hidden;
  min-width: 0;
}

.level-progress {
  height: 100%;
  width: 0%;
  background: var(--grad-primary);
  border-radius: 999px;
  transition: width 0.5s ease;
}

.level-info-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.level-badge {
  background: var(--green);
  color: white;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  white-space: nowrap;
}

.level-info { color: var(--text-light); white-space: nowrap; }

/* ============================================
   MAIN
   ============================================ */
.app-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px;
  width: 100%;
}

.tab-page { display: none; }
.tab-page.active { display: block; animation: fadeIn 0.4s ease; }

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

.page-header { margin-bottom: 16px; }

.page-header h1 {
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 4px;
  color: var(--text);
  letter-spacing: -0.8px;
}

.page-header h2 { font-size: 20px; font-weight: 900; }
.page-header p { color: var(--text-light); font-size: 14px; font-weight: 500; }

.mt-32 { margin-top: 32px; }
.empty-msg { text-align: center; color: var(--text-muted); padding: 40px 20px; font-weight: 600; font-size: 14px; }

/* ============================================
   TOP UP GRID
   ============================================ */
.topup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  width: 100%;
  overflow: hidden;
}

.game-card:hover {
  transform: translateY(-3px);
  border-color: var(--game-color, var(--green));
  box-shadow: var(--shadow);
}

.game-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6px;
  background: var(--bg-alt);
  flex-shrink: 0;
}

.game-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.game-icon-fallback {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 22px;
}

.game-info h3 {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 2px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.game-info p {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* ============================================
   MODAL
   ============================================ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 200;
}

.modal.active { display: flex; }

.modal-content {
  background: var(--bg);
  width: 100%;
  max-width: 720px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  animation: slideUp 0.3s ease;
}

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

.modal-header {
  padding: 20px;
  color: white;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: relative;
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  font-weight: 900;
}

.modal-icon-wrap {
  width: 80px;
  height: 80px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 10px;
}

.modal-icon-img { width: 100%; height: 100%; object-fit: contain; }

.modal-icon-fallback {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 32px;
}

.modal-header h2 { font-size: 20px; font-weight: 900; margin-bottom: 4px; }
.modal-header p { font-size: 13px; opacity: 0.9; font-weight: 500; }
.modal-body { padding: 20px; }

.section-title {
  font-size: 15px;
  font-weight: 900;
  margin: 16px 0 10px;
}

.section-title:first-child { margin-top: 0; }

/* ============================================
   PRODUCTS & PAYMENTS
   ============================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.product-card {
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.product-card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
  background: var(--bg);
}

.product-name { font-size: 13px; font-weight: 800; margin-bottom: 3px; }
.product-bonus { font-size: 11px; color: var(--green-dark); font-weight: 800; margin-bottom: 3px; }
.product-price { font-size: 14px; font-weight: 900; color: var(--green); }

.payments-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.payment-card {
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.payment-card:hover {
  border-color: var(--green);
  background: var(--bg);
}

.payment-name { font-size: 13px; font-weight: 800; margin-bottom: 2px; }
.payment-fee { font-size: 11px; color: var(--text-light); font-weight: 700; }

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: all 0.2s;
}

.form-group input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(88,204,2,0.15);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary, .btn-secondary, .btn-danger, .btn-google {
  font-family: inherit;
  font-size: 14px;
  font-weight: 900;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
}

.btn-full { width: 100%; margin-top: 8px; }

.btn-primary {
  background: var(--green);
  color: white;
  box-shadow: 0 4px 0 var(--green-dark);
}

.btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--green-dark);
}

.btn-secondary {
  background: var(--bg-alt);
  color: var(--text);
  border: 1.5px solid var(--border);
  box-shadow: 0 4px 0 var(--border);
}

.btn-secondary:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--border);
}

.btn-danger {
  background: var(--red);
  color: white;
  box-shadow: 0 4px 0 var(--red-dark);
}

.btn-google {
  background: linear-gradient(135deg, #4285f4, #34a853);
  color: white;
  box-shadow: 0 4px 0 #2c5aa0;
}

.btn-google:active { transform: translateY(2px); box-shadow: 0 2px 0 #2c5aa0; }

/* ============================================
   ORDER SUMMARY
   ============================================ */
.order-summary {
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 14px;
}

.order-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
  gap: 12px;
  align-items: center;
}

.order-row span { color: var(--text-light); font-weight: 700; flex-shrink: 0; }
.order-row strong { font-weight: 800; text-align: right; word-break: break-word; }

.order-row.total {
  border-top: 2px dashed var(--border);
  margin-top: 6px;
  padding-top: 10px;
  font-size: 16px;
}

.order-row.total strong { color: var(--green); font-size: 20px; }

/* ============================================
   PROFILE
   ============================================ */
.profile-card {
  background: var(--grad-primary);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  color: white;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(88,204,2,0.3);
  position: relative;
  overflow: hidden;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  margin: 0 auto 10px;
  background: rgba(255,255,255,0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  border: 3px solid rgba(255,255,255,0.4);
  position: relative;
  z-index: 1;
}

.profile-name-big {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 4px;
  color: white;
  position: relative;
  z-index: 1;
}

.profile-status {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.9;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.profile-level-big { font-size: 18px; font-weight: 900; margin-bottom: 10px; position: relative; z-index: 1; }

.profile-level-bar {
  height: 10px;
  background: rgba(0,0,0,0.15);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.profile-level-progress {
  height: 100%;
  width: 0%;
  background: white;
  border-radius: 999px;
  transition: width 0.5s ease;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
  overflow: hidden;
}

.stat-card-icon { font-size: 18px; margin-bottom: 4px; }
.stat-card-val { font-size: 16px; font-weight: 900; color: var(--text); margin-bottom: 2px; word-break: break-word; }
.stat-card-label { font-size: 10px; color: var(--text-light); font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ============================================
   ORDERS
   ============================================ */
.order-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 2px dashed var(--border);
  gap: 8px;
}

.order-card-header strong { font-size: 14px; font-weight: 900; flex: 1; min-width: 0; }

.order-status {
  font-size: 10px;
  font-weight: 900;
  padding: 4px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-pending { background: #fff7e0; color: #b07800; }
.status-processing { background: #e8f6ff; color: var(--blue); }
.status-success { background: #d7ffb8; color: var(--green-dark); }
.status-failed { background: #ffdfe0; color: var(--red); }

.order-info {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
  gap: 8px;
}

.order-info span { color: var(--text-light); font-weight: 600; flex-shrink: 0; }
.order-info strong { font-weight: 800; text-align: right; word-break: break-word; }

/* ============================================
   BOTTOM NAV
   ============================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1.5px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
  z-index: 100;
  width: 100%;
}

.nav-btn {
  flex: 1;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 2px;
  cursor: pointer;
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 800;
  transition: color 0.15s;
  min-width: 0;
}

.nav-btn.active { color: var(--green); }

.nav-icon { font-size: 20px; line-height: 1; }
.nav-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.3px; white-space: nowrap; }

/* ============================================
   HELP
   ============================================ */
.help-content { display: flex; flex-direction: column; gap: 10px; }

.help-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.help-card h3 { font-size: 15px; font-weight: 900; margin-bottom: 6px; }
.help-card p { font-size: 13px; color: var(--text-light); font-weight: 500; line-height: 1.5; }

/* ============================================
   TOAST & ANIMATIONS
   ============================================ */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transform: scale(0);
  animation: rippleEffect 0.6s ease-out;
  pointer-events: none;
  width: 20px;
  height: 20px;
  margin-left: -10px;
  margin-top: -10px;
}

@keyframes rippleEffect { to { transform: scale(15); opacity: 0; } }

.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: white;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-success { background: var(--green); }
.toast-error { background: var(--red); }

@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.achievement-popup {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: linear-gradient(135deg, var(--yellow), var(--orange));
  color: white;
  padding: 12px 18px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  max-width: 90vw;
}

.achievement-popup.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.achievement-popup-icon { width: 32px; height: 32px; border-radius: 8px; background: rgba(255,255,255,0.3); display: flex; align-items: center; justify-content: center; font-weight: 900; flex-shrink: 0; }
.achievement-popup-info strong { font-size: 10px; text-transform: uppercase; display: block; }
.achievement-popup-info span { font-size: 14px; font-weight: 900; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 480px) {
  .page-header h1 { font-size: 22px; }
  .topup-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .payments-grid { grid-template-columns: repeat(2, 1fr); }
  .achievements-list { grid-template-columns: 1fr; }
  .brand-name { font-size: 16px; }
  .stat { padding: 5px 8px; font-size: 11px; }
  .stat-icon { font-size: 12px; }
  .stat-val { font-size: 11px; }
  .level-info-wrap { font-size: 10px; }
}

/* Success icon */
.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 12px;
  background: var(--grad-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 900;
}

.success-body { text-align: center; }
.success-body h2 { font-size: 22px; font-weight: 900; margin-bottom: 6px; }
.success-sub { font-size: 13px; color: var(--text-light); font-weight: 600; margin-bottom: 16px; }

/* Payment notice */
.payment-notice {
  background: #fff9e6;
  border: 1.5px solid #ffe58f;
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 12px;
}

.payment-notice p { font-size: 12px; color: #7a5d00; font-weight: 600; line-height: 1.4; }
.payment-notice strong { color: #5c4600; font-weight: 900; }


/* Tanggal di riwayat pesanan */
.order-info-date {
  background: #f0fff0;
  border-radius: 8px;
  padding: 8px 12px !important;
  margin: 4px 0;
  border-left: 4px solid #58cc02;
}
.order-info-date strong {
  color: #2c5a00;
  font-size: 13px;
}


/* ===== REWARDS PAGE ===== */
.reward-hero {
  background: linear-gradient(135deg, #58cc02, #89e219);
  border-radius: 20px;
  padding: 28px 20px;
  text-align: center;
  color: white;
  margin-bottom: 16px;
  box-shadow: 0 12px 32px rgba(88,204,2,0.3);
  position: relative;
  overflow: hidden;
}
.reward-hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.15), transparent 50%);
  animation: rotate 20s linear infinite;
}
.reward-balance-label {
  font-size: 12px; font-weight: 700; opacity: 0.9;
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 6px; position: relative; z-index: 1;
}
.reward-balance {
  font-size: 38px; font-weight: 900;
  margin-bottom: 4px; position: relative; z-index: 1;
  text-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.reward-coin {
  font-size: 15px; font-weight: 800; opacity: 0.95;
  margin-bottom: 8px; position: relative; z-index: 1;
}
.reward-convert-info {
  font-size: 11px; font-weight: 700; opacity: 0.85;
  background: rgba(255,255,255,0.2);
  display: inline-block; padding: 4px 12px;
  border-radius: 999px; position: relative; z-index: 1;
}

.reward-missions, .reward-ads-section, .reward-history, .reward-withdraw-section {
  background: white;
  border: 1.5px solid #e8eaed;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}
.reward-missions h3, .reward-ads-section h3, .reward-history h3, .reward-withdraw-section h3 {
  font-size: 16px; font-weight: 900; margin-bottom: 12px;
}

.mission-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; background: #f7f8fa;
  border-radius: 12px; margin-bottom: 8px;
}
.mission-icon { font-size: 22px; flex-shrink: 0; }
.mission-info { flex: 1; }
.mission-title { font-size: 13px; font-weight: 800; margin-bottom: 2px; }
.mission-reward { font-size: 12px; color: #58cc02; font-weight: 800; }

.ad-counter {
  text-align: center; font-size: 13px; font-weight: 800;
  color: #666; margin: 10px 0; padding: 8px;
  background: #f7f8fa; border-radius: 999px;
}
.btn-ad {
  width: 100%; padding: 16px;
  background: linear-gradient(135deg, #ff9600, #ffb84d);
  color: white; border: none; border-radius: 12px;
  font-family: inherit; font-size: 15px; font-weight: 900;
  cursor: pointer; box-shadow: 0 4px 0 #cc7800;
  transition: all 0.2s;
}
.btn-ad:active { transform: translateY(2px); box-shadow: 0 2px 0 #cc7800; }
.btn-ad:disabled {
  background: #ccc; box-shadow: 0 4px 0 #999; cursor: not-allowed;
}

.history-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; border-bottom: 1px solid #f0f0f0;
}
.history-item:last-child { border-bottom: none; }
.history-icon { font-size: 18px; flex-shrink: 0; }
.history-info { flex: 1; min-width: 0; }
.history-reason { font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-date { font-size: 10px; color: #999; font-weight: 500; }
.history-amount { font-size: 14px; font-weight: 900; flex-shrink: 0; }

.referral-box {
  display: flex; gap: 8px; align-items: center;
}
.referral-box input {
  flex: 1; padding: 12px; border: 2px dashed #58cc02;
  border-radius: 10px; font-family: monospace;
  font-weight: 900; font-size: 14px; text-align: center;
  background: #f0fff0; color: #2c5a00;
}


/* ============ TOP BAR ============ */
.wa-topbar {
  background: #075e54;
  color: white;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  z-index: 10;
  flex-shrink: 0;
}
.wa-back {
  background: none;
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  font-weight: 900;
  line-height: 1;
}
.wa-avatar {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.wa-contact { flex: 1; min-width: 0; }
.wa-name {
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wa-status { font-size: 11px; opacity: 0.85; font-weight: 500; }
.wa-hearts {
  background: rgba(255,255,255,0.2);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  flex-shrink: 0;
}

/* ============ PROGRESS ============ */
.wa-progress {
  height: 3px;
  background: rgba(255,255,255,0.2);
  position: relative;
  flex-shrink: 0;
}
.wa-progress-fill {
  height: 100%;
  background: #25d366;
  transition: width 0.4s ease;
  border-radius: 0 2px 2px 0;
}

/* ============ CHAT BODY ============ */
.wa-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
  background: #e5ddd5;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.2) 0%, transparent 50%);
  scroll-behavior: smooth;
}

.wa-date {
  text-align: center;
  margin: 8px auto 16px;
  background: rgba(255,255,255,0.8);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 11px;
  color: #666;
  font-weight: 700;
  width: fit-content;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.wa-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
  max-width: 85%;
  animation: waPop 0.3s ease;
}

@keyframes waPop {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.wa-row-bot {
  align-self: flex-start;
  margin-right: auto;
  align-items: flex-start;
}

.wa-row-user {
  align-self: flex-end;
  margin-left: auto;
  align-items: flex-end;
}

.wa-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  word-wrap: break-word;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  max-width: 100%;
  overflow-wrap: break-word;
}

.wa-bubble-bot {
  background: white;
  color: #333;
  border-top-left-radius: 4px;
}

.wa-bubble-user {
  background: #dcf8c6;
  color: #333;
  border-top-right-radius: 4px;
}

.wa-bubble-user.correct {
  background: #dcf8c6;
}
.wa-bubble-user.wrong {
  background: #ffd6d6;
  color: #8b1a1a;
}

.wa-bubble-bot.reply-correct {
  background: #d4edda;
  border-left: 4px solid #25d366;
}
.wa-bubble-bot.reply-wrong {
  background: #f8d7da;
  border-left: 4px solid #dc3545;
}

.wa-time {
  font-size: 10px;
  color: #999;
  margin-top: 3px;
  padding: 0 4px;
  font-weight: 500;
}

/* ============ INPUT AREA ============ */
.wa-input-area {
  background: #f0f0f0;
  padding: 12px;
  border-top: 1px solid #d0d0d0;
  flex-shrink: 0;
  max-height: 55vh;
  overflow-y: auto;
}

.wa-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wa-option-btn {
  background: white;
  border: 1px solid #d0d0d0;
  border-radius: 20px;
  padding: 12px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #333;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.wa-option-btn:hover,
.wa-option-btn:active {
  background: #075e54;
  color: white;
  transform: scale(1.02);
  border-color: #075e54;
}

.wa-send-btn {
  width: 100%;
  background: #25d366;
  color: white;
  border: none;
  border-radius: 20px;
  padding: 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: all 0.2s;
}

.wa-send-btn:hover {
  background: #1fa855;
  transform: translateY(-1px);
}

/* Responsive mobile */
@media (max-width: 480px) {
  .wa-row { max-width: 88%; }
  .wa-bubble { font-size: 14px; padding: 9px 13px; }
  .wa-option-btn { font-size: 13px; padding: 11px 16px; }
  .wa-name { font-size: 14px; }
  .wa-hearts { font-size: 12px; padding: 3px 8px; }
}


/* ===== ACHIEVEMENT TIER STYLING ===== */
.achievement-tier-common { border-left: 4px solid #94a3b8 !important; }
.achievement-tier-rare { border-left: 4px solid #3b82f6 !important; }
.achievement-tier-epic { border-left: 4px solid #a855f7 !important; }
.achievement-tier-legendary { border-left: 4px solid #f59e0b !important; }
.achievement-tier-mythic {
  border-left: 4px solid #ef4444 !important;
  background: linear-gradient(135deg, #fff1f2, #ffe4e6) !important;
}

.achievement-tier-rare.unlocked { background: linear-gradient(135deg, #eff6ff, #dbeafe) !important; }
.achievement-tier-epic.unlocked { background: linear-gradient(135deg, #faf5ff, #f3e8ff) !important; }
.achievement-tier-legendary.unlocked {
  background: linear-gradient(135deg, #fffbeb, #fef3c7) !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}
.achievement-tier-mythic.unlocked {
  background: linear-gradient(135deg, #fef2f2, #fee2e2) !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.4);
  animation: mythicPulse 2s infinite;
}

@keyframes mythicPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 24px rgba(239, 68, 68, 0.7); }
}

.achievement-tier-badge {
  display: inline-block;
  color: white;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.achievement-reward {
  display: inline-block;
  margin-top: 6px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
}

.achievement-card.locked .achievement-reward {
  background: #ccc;
  opacity: 0.6;
}


/* ===== WITHDRAW INFO ===== */
.wd-info-box {
  background: linear-gradient(135deg, #f0fff0, #e6ffe6);
  border: 1.5px solid #89e219;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}
.wd-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
}
.wd-info-row span { color: #666; font-weight: 600; }
.wd-info-row strong { font-weight: 900; }
.wd-info-row.next {
  border-top: 1px dashed #89e219;
  margin-top: 6px;
  padding-top: 8px;
}
.wd-note {
  font-size: 11px;
  color: #666;
  font-weight: 700;
  text-align: center;
  margin-top: 8px;
  padding: 6px;
  background: white;
  border-radius: 8px;
}

/* Modal */
.wd-number-badge {
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 14px;
  padding: 10px;
  background: linear-gradient(135deg, #fff9e6, #ffefb3);
  border-radius: 12px;
  border: 1.5px solid #ffc800;
}
.wd-number-badge strong { color: #7a5d00; font-size: 18px; }

.wd-info-modal {
  background: #f7f8fa;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
}
.wd-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
}
.wd-row span { color: #666; font-weight: 600; }
.wd-row strong { font-weight: 900; color: #333; }
.wd-row.highlight {
  border-top: 1px dashed #e5e5e5;
  margin-top: 6px;
  padding-top: 8px;
}
.wd-row.highlight strong { color: #ff9600; font-size: 15px; }


