/* ================================================
   Smart Gold X - Premium Dark Navy + Gold Design
   ================================================ */

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

:root {
  --primary: #0066ff;
  --primary-dark: #0052cc;
  --primary-light: #4d94ff;
  --blue-gradient: linear-gradient(135deg, #0066ff 0%, #00aaff 100%);
  --blue-gradient-soft: linear-gradient(135deg, rgba(0, 102, 255, 0.1) 0%, rgba(0, 170, 255, 0.05) 100%);
  --navy: #f4f7fe;
  --navy-2: #ffffff;
  --navy-3: #f1f5f9;
  --navy-card: #ffffff;
  --navy-light: #e2e8f0;
  --glass: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(0, 102, 255, 0.12);
  --glass-hover: rgba(0, 102, 255, 0.05);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --border-radius: 18px;
  --border-radius-sm: 12px;
  --shadow: 0 4px 25px rgba(0, 0, 0, 0.06);
  --shadow-blue: 0 4px 20px rgba(0, 102, 255, 0.2);
  --transition: color 0.15s ease, transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

* {
  -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  outline: none !important;
  box-sizing: border-box; margin: 0; padding: 0;
}
html, body {
  -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
  -webkit-tap-highlight-color: transparent !important;
}
:focus, :active {
  outline: none !important;
  -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
}
a, button, div, span, img, svg, .plan-card {
  -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
  -webkit-tap-highlight-color: transparent !important;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--navy);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--navy-2); }
::-webkit-scrollbar-thumb { background: var(--primary-dark); border-radius: 10px; }

/* ---- App Wrapper (Mobile-App Style) ---- */
.app-wrapper {
  max-width: 600px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--navy-2);
  position: relative;
  overflow-x: hidden;
  box-shadow: 0 0 100px rgba(0,0,0,0.5);
}

/* ---- Header ---- */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--navy-card);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo img { width: 32px; height: 32px; object-fit: contain; }
.header-logo-text { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 15px; background: var(--blue-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.header-icons { display: flex; gap: 12px; align-items: center; }
.header-icon-btn {
  width: 36px; height: 36px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-secondary);
}
@media (hover: hover) {
  .header-icon-btn:hover { background: var(--blue-gradient-soft); border-color: var(--primary); color: var(--primary); }
}
.header-icon-btn:active { transform: scale(0.9); }
.header-icon-btn svg { width: 16px; height: 16px; }

/* ---- Bottom Navigation ---- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  background: #ffffff !important;
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  padding: 8px 0 12px;
  z-index: 9999;
  touch-action: manipulation;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.04);
  isolation: isolate;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--text-muted);
  transition: var(--transition);
  padding: 4px 0;
}
.nav-item.active { color: var(--primary); }
.nav-item:active .nav-icon { transform: scale(0.9); }
.nav-item:active span { opacity: 0.8; }
.nav-item svg { width: 22px; height: 22px; }
.nav-item span { font-size: 10px; font-weight: 500; }
.nav-item.active .nav-icon { filter: drop-shadow(0 0 6px rgba(245,197,24,0.6)); }

/* ---- Page Content ---- */
.page-content { padding: 16px 16px 140px; }

/* ---- Cards / Glass containers ---- */
.glass-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  padding: 20px;
  transition: var(--transition);
}
@media (hover: hover) {
  .glass-card:hover { background: var(--glass-hover); }
}

/* ---- Balance Card ---- */
.balance-card {
  background: #ffffff;
  border: 1px solid rgba(0, 102, 255, 0.08);
  border-radius: 24px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 102, 255, 0.06), 0 1px 3px rgba(0, 102, 255, 0.05);
  margin-bottom: 24px;
}
.balance-card::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(0, 102, 255, 0.05) 0%, transparent 70%);
  border-radius: 50%;
}
.balance-label { font-size: 13px; color: var(--text-secondary); font-weight: 600; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.8px; }
.balance-amount { font-family: 'Outfit', sans-serif; font-size: 34px; font-weight: 800; color: var(--primary); margin: 2px 0; letter-spacing: -0.5px; }
.balance-sub { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.balance-btns { display: flex; gap: 12px; margin-top: 22px; }

.icon-box-blue {
  width: 48px;
  height: 48px;
  background: var(--blue-gradient-soft);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

/* ---- Buttons ---- */
.btn-gold {
  background: var(--blue-gradient);
  color: #ffffff;
  border: none;
  border-radius: 50px;
  padding: 12px 24px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: var(--shadow-blue);
  letter-spacing: 0.5px;
  transition: var(--transition);
}
@media (hover: hover) {
  .btn-gold:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0, 102, 255, 0.3); color: #ffffff; }
}
.btn-gold:active { transform: scale(0.98) translateY(0); opacity: 0.9; }
.btn-gold-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: 50px;
  padding: 12px 24px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: var(--transition);
}
@media (hover: hover) {
  .btn-gold-outline:hover { background: var(--blue-gradient-soft); color: var(--primary-dark); border-color: var(--primary-dark); }
}
.btn-gold-outline:active { transform: scale(0.98); opacity: 0.9; }
.btn-full { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 12px; }

.btn-glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  border-radius: 50px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
}
@media (hover: hover) {
  .btn-glass:hover { background: var(--glass-hover); color: var(--primary); border-color: var(--primary); }
}
.btn-glass:active { transform: scale(0.98); }

.btn-danger { background: linear-gradient(135deg, #ff4d6d, #c9003a); color: #fff; }
.btn-success { background: linear-gradient(135deg, #00d4a8, #009977); color: #fff; }

/* ---- Quick Nav Icons ---- */
.quick-nav {
  display: flex; gap: 10px; padding: 4px 0 16px; overflow-x: auto;
  scrollbar-width: none; touch-action: pan-x;
}
.quick-nav::-webkit-scrollbar { display: none; }
.quick-nav-item {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  min-width: 72px;
}
.quick-nav-icon {
  width: 54px; height: 54px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
@media (hover: hover) {
  .quick-nav-item:hover .quick-nav-icon { background: var(--blue-gradient-soft); border-color: var(--primary); }
}
.quick-nav-item:active .quick-nav-icon { transform: scale(0.9); }
.quick-nav-icon img, .quick-nav-icon svg { width: 26px; height: 26px; }
.quick-nav-label { font-size: 11px; color: var(--text-primary); font-weight: 600; text-transform: capitalize; white-space: nowrap; margin-top: 4px; }

/* ---- Section Title ---- */
.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-title a { font-size: 12px; color: var(--primary); font-weight: 600; text-decoration: none; }

/* ---- Claim Section ---- */
/* ---- Premium Claim Section (My AI Robots) ---- */
.premium-claim-box {
  background: #fdfaf5 !important; /* Off-white / Cream background */
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 20px;
  padding: 18px 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  color: #1a0e00 !important;
  display: block;
  width: 100%;
  text-align: center;
}

.pcb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.pcb-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: #3e2723;
}
.pcb-view {
  font-size: 13px;
  color: #bca89f;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 2px;
  font-weight: 500;
}

.pcb-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.pcb-animation {
  width: 100%;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 5px;
  position: relative;
  overflow: visible;
}

.logo-money-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.solar-system-container {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
}

/* Image Assets */
.solar-img-wrap, .house-img-wrap {
  position: relative;
  z-index: 3;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.solar-img-wrap:hover, .house-img-wrap:hover {
  transform: translateY(-5px) scale(1.05);
}

.solar-img {
  width: 110px;
  height: auto;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.15));
  animation: panelTilt 6s ease-in-out infinite alternate;
}
.house-img {
  width: 130px;
  height: auto;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.15));
  animation: houseFloat 5s ease-in-out infinite alternate;
}

@keyframes panelTilt {
  from { transform: perspective(500px) rotateY(-5deg) rotateX(5deg); }
  to { transform: perspective(500px) rotateY(5deg) rotateX(-5deg); }
}
@keyframes houseFloat {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}

.solar-system-container.single-house-mode {
  flex-direction: column;
  height: 220px;
}

.house-centered-wrap {
  position: relative;
  z-index: 5;
  margin-top: 20px;
}

.house-img-large {
  width: 160px;
  height: auto;
  filter: drop-shadow(0 15px 30px rgba(0,0,0,0.2));
  animation: houseFloat 4s ease-in-out infinite alternate;
}

/* Glowing Arc (Mockup V4) */
.house-arc-svg {
  position: absolute;
  top: 10px;
  width: 240px;
  height: 120px;
  z-index: 2;
  pointer-events: none;
}
.arc-path-bg {
  fill: none;
  stroke: rgba(0, 255, 204, 0.05);
  stroke-width: 6;
  stroke-linecap: round;
}
.arc-path-pulse {
  fill: none;
  stroke: #00ffcc;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 40, 160;
  filter: blur(2px) drop-shadow(0 0 15px #00ffcc);
  animation: arcSurge 2.5s linear infinite;
}
@keyframes arcSurge {
  to { stroke-dashoffset: -200; }
}

.pcb-view {
  position: relative;
  z-index: 20; /* Ensure it's above any invisible overlays */
  pointer-events: auto !important;
  cursor: pointer;
}

/* Collect Animation Upgrades */
.collect-particle {
  position: absolute;
  z-index: 1000;
  width: 28px; height: 28px;
  background: radial-gradient(circle, #fcd34d, #d97706);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
  box-shadow: 0 4px 15px rgba(217, 119, 6, 0.5);
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Collect Animation Upgrades */
.collect-particle {
  position: absolute;
  z-index: 1000;
  width: 28px; height: 28px;
  background: radial-gradient(circle, #fcd34d, #d97706);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
  box-shadow: 0 4px 15px rgba(217, 119, 6, 0.5);
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.pcb-info {
  flex: 1;
}
.pcb-status {
  font-size: 14px;
  font-weight: 700;
  color: #8d6e63;
  margin-bottom: 3px;
}
.pcb-subtext {
  font-size: 11px;
  color: #bca89f;
  line-height: 1.4;
}

.pcb-btn {
  background: var(--blue-gradient);
  border: none;
  color: #ffffff;
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: var(--shadow-blue);
  transition: all 0.2s;
}
.pcb-btn:hover { transform: scale(1.05); box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4); }
.pcb-btn:active { transform: scale(0.95); opacity: 0.9; }
.pcb-btn.disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---- Plan Cards ---- */
.plans-list { padding: 0; display: flex; flex-direction: column; gap: 14px; }
/* ---- Premium Plan Card (Redesign) ---- */
.plan-card.premium {
  background: #fdbb2d; /* Gold/Yellow background from image */
  background: linear-gradient(135deg, #fdbb2d 0%, #f9a01b 100%);
  border: none;
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #1a0e00;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  position: relative;
}

.premium-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.premium-timer-box {
  display: flex;
  align-items: center;
  gap: 8px;
}
.premium-timer-lbl { font-size: 13px; font-weight: 700; }
.timer-units { display: flex; gap: 4px; }
.t-unit {
  background: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.premium-bonus { font-size: 13px; font-weight: 700; }

.premium-main {
  display: flex;
  gap: 16px;
  align-items: center;
}
.premium-img-wrap {
  width: 100px;
  height: 65px;
  border-radius: 12px;
  overflow: visible; /* Changed to visible for badge overflow */
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.3);
  position: relative;
}
.premium-img-wrap img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }

.plan-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff0000;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  z-index: 5;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255,255,255,0.2);
  white-space: nowrap;
}

.premium-content {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.premium-name { 
  font-family: 'Outfit', sans-serif; 
  font-size: 16px; 
  font-weight: 800; 
  color: #1a0e00; 
  margin-bottom: 2px;
  line-height: 1.2;
}
.premium-actions { 
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.premium-price {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: #1a0e00;
}
.purchase-btn {
  background: transparent;
  border: 1.5px solid #1a0e00;
  color: #1a0e00;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
@media (hover: hover) {
  .purchase-btn:hover { background: #1a0e00; color: #fff; }
}
.purchase-btn:active { transform: scale(0.95); opacity: 0.9; }
.purchase-btn.disabled { opacity: 0.5; cursor: not-allowed; }

.premium-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,0.05);
}
.p-stat { text-align: center; }
.p-val { font-size: 12px; font-weight: 700; margin-bottom: 2px; }
.p-lbl { font-size: 9px; opacity: 0.7; font-weight: 600; }

.plan-expired-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; z-index: 5;
  backdrop-filter: blur(2px);
}

/* ---- Form Styles ---- */
.form-group { margin-bottom: 14px; }
.form-label { font-size: 12px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; display: block; letter-spacing: 0.3px; }
.form-control {
  width: 100%;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
  padding: 13px 16px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--primary); background: rgba(245,197,24,0.06); box-shadow: 0 0 20px rgba(0, 102, 255, 0.2); }
.form-control::placeholder { color: var(--text-muted); opacity: 0.9; }
.input-group { position: relative; display: flex; align-items: center; width: 100%; transition: var(--transition); }
.input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); width: 18px; height: 18px; pointer-events: none; z-index: 2; transition: var(--transition); }
.form-control:focus + .input-icon, .form-control:not(:placeholder-shown) + .input-icon { color: var(--primary); }
.input-group .form-control { padding-left: 44px; position: relative; z-index: 1; }
.input-action { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); cursor: pointer; background: none; border: none; display: flex; z-index: 2; }
.prefix-group { display: flex; gap: 8px; }
.input-prefix {
  background: rgba(245,197,24,0.1);
  border: 1px solid rgba(0, 102, 255, 0.2);
  border-radius: var(--border-radius-sm);
  padding: 13px 14px;
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  flex-shrink: 0;
}
.form-select {
  width: 100%;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
  padding: 13px 16px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238892b0' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.form-select:focus { border-color: var(--primary); }
.form-select option { background: var(--navy-3); }

/* ---- Login Page ---- */
.auth-page {
  min-height: 100vh;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px 30px;
}
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo img { width: 90px; height: 90px; object-fit: contain; filter: drop-shadow(0 0 20px rgba(0,102,255,0.2)); animation: logoPulse 3s ease-in-out infinite; }
@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 0 20px rgba(0,102,255,0.2)); }
  50% { filter: drop-shadow(0 0 40px rgba(0,102,255,0.4)); }
}
.auth-title { font-family: 'Outfit', sans-serif; font-size: 26px; font-weight: 800; color: var(--text-primary); margin-bottom: 4px; }
.auth-subtitle { font-size: 13px; color: var(--text-secondary); }
.auth-tabs { display: flex; background: #fff; border: 1px solid var(--glass-border); border-radius: 50px; padding: 4px; margin: 24px 0 20px; position: relative; z-index: 1; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
.auth-tab {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 50px;
  background: transparent;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Outfit', sans-serif;
  position: relative;
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.auth-tab.active { color: #ffffff; }
.auth-tab-slider {
  position: absolute;
  top: 4px; left: 4px;
  height: calc(100% - 8px);
  width: calc(50% - 4px);
  background: var(--blue-gradient);
  border-radius: 50px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
  box-shadow: var(--shadow-blue);
}
.auth-form { width: 100%; max-width: 500px; position: relative; z-index: 10; }
.auth-box {
  background: #ffffff;
  border: 1px solid rgba(0, 102, 255, 0.08);
  border-radius: 28px;
  padding: 32px 30px;
  box-shadow: 0 28px 70px rgba(0, 76, 145, 0.08), 0 10px 20px rgba(0, 102, 255, 0.08);
}
.auth-card-title {
  font-size: 24px;
  font-weight: 800;
  color: #0d213f;
  margin-bottom: 24px;
  text-align: center;
}
.auth-switch-text {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
}
.auth-switch-link {
  border: none;
  background: none;
  color: var(--primary);
  font-weight: 800;
  cursor: pointer;
  padding: 0;
}
.auth-switch-link:hover { text-decoration: underline; }
.forgot-link { text-align: center; margin-top: 14px; }
.forgot-link a { color: var(--primary); font-size: 13px; font-weight: 600; text-decoration: none; }
.privacy-text {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  margin: 18px 0 0;
  line-height: 1.6;
}
.privacy-text a { color: var(--primary); font-weight: 700; }
.terms-row { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0; }
.terms-checkbox { width: 18px; height: 18px; accent-color: var(--primary); flex-shrink: 0; margin-top: 2px; cursor: pointer; }
.terms-text { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.terms-text a { color: var(--primary); }

/* ---- Global Professional Popups (V5) ---- */
.popup-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.45); /* Dark grey overlay */
  backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center;
  z-index: 10000000;
  padding: 24px;
  opacity: 0; visibility: hidden;
  transition: all 0.3s ease;
}
.popup-overlay.active { opacity: 1; visibility: visible; }

.popup-box {
  background: #ffffff !important;
  border-radius: 14px !important;
  padding: 20px 0 0 0 !important; /* iOS flush button style */
  width: 275px !important;
  max-width: 90% !important;
  transform: scale(0.85) translateY(10px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15) !important;
  border: none !important;
  position: relative;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}
.popup-overlay.active .popup-box { transform: scale(1) translateY(0); }

/* Hide default icons inside alert popups to match iOS screenshots */
.popup-box .popup-icon-wrap,
.popup-box .popup-green-tick,
.popup-box #confirmIconWrap,
.popup-box #successIcon,
.popup-box .error-icon-wrap {
  display: none !important;
}

.popup-title {
  font-size: 17px !important;
  font-weight: 600 !important;
  color: #000000 !important;
  margin-bottom: 4px !important;
  padding: 0 16px !important;
  letter-spacing: -0.4px !important;
  text-align: center !important;
}
.popup-msg {
  font-size: 13px !important;
  color: #8f8f93 !important; /* Lighter grey iOS style */
  margin-bottom: 20px !important;
  line-height: 1.35 !important;
  padding: 0 16px !important;
  font-weight: 400 !important;
  text-align: center !important;
}

/* iOS action buttons container */
.popup-buttons-wrap {
  display: flex !important;
  flex-direction: row !important;
  border-top: 0.5px solid rgba(0, 0, 0, 0.15) !important;
  margin-top: 16px !important;
  width: 100% !important;
}

/* iOS action buttons base style */
.popup-box .btn-glass,
.popup-box .btn-gold,
.popup-box .btn-full {
  flex: 1 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 12px 8px !important;
  font-size: 17px !important;
  color: #007aff !important; /* iOS blue link color */
  box-shadow: none !important;
  margin: 0 !important;
  cursor: pointer !important;
  height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background-color 0.2s !important;
  outline: none !important;
}

/* Separator between Cancel & Confirm buttons */
.popup-box .btn-glass {
  border-right: 0.5px solid rgba(0, 0, 0, 0.15) !important;
  font-weight: 400 !important;
}

.popup-box .btn-gold {
  font-weight: 600 !important;
}

/* For single buttons like OK/Continue */
.popup-box .btn-full {
  width: 100% !important;
  font-weight: 600 !important;
}

/* Press state visual feedback */
.popup-box .btn-glass:active,
.popup-box .btn-gold:active,
.popup-box .btn-full:active {
  background-color: rgba(0, 0, 0, 0.05) !important;
  transform: none !important;
  opacity: 1 !important;
}

/* Danger state confirmation button (e.g. Logout button in red) */
.popup-box .btn-gold.danger {
  color: #ff3b30 !important; /* iOS Danger Red */
}

/* ---- Alert / Toast ---- */
.toast {
  position: fixed;
  top: 20px; left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--navy-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
  padding: 12px 20px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  z-index: 9999;
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow);
  max-width: 90%;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }
.toast.warning { border-color: var(--warning); }

/* ---- Profile Page ---- */
.profile-page { padding: 20px 16px 80px; }
.profile-header { position: relative; text-align: center; margin-bottom: 24px; }
.profile-settings-btn { position: absolute; top: 0; right: 0; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 50%; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-secondary); transition: var(--transition); text-decoration: none; }
@media (hover: hover) {
  .profile-settings-btn:hover { color: var(--primary); border-color: var(--primary); }
}
.profile-settings-btn:active { transform: scale(0.9); }
.profile-photo-wrap { position: relative; width: 90px; height: 90px; margin: 0 auto 12px; }
.profile-photo { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; border: 3px solid var(--primary); box-shadow: var(--shadow-blue); }
.profile-photo-edit { position: absolute; bottom: 0; right: 0; width: 28px; height: 28px; background: var(--blue-gradient); border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.profile-uid { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.profile-uid span { color: var(--primary); font-weight: 700; }
.profile-links { display: flex; flex-direction: column; gap: 10px; }
.profile-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
  padding: 15px 16px;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
}
@media (hover: hover) {
  .profile-link:hover { background: var(--glass-hover); border-color: var(--primary); }
}
.profile-link:active { transform: scale(0.98); background: var(--glass-hover); }

/* ---- Animations & Utilities ---- */
.loading-spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(26,14,0,0.3);
  border-radius: 50%;
  border-top-color: #1a0e00;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.fade-in { animation: fadeIn 0.6s ease-out forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.profile-link .link-left { display: flex; align-items: center; gap: 12px; }
.profile-link .link-icon { width: 36px; height: 36px; background: var(--blue-gradient-soft); border: 1px solid rgba(0, 102, 255, 0.2); border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.profile-link svg { width: 18px; height: 18px; }
.profile-link .link-text { font-size: 14px; font-weight: 600; }
.profile-link.danger { border-color: rgba(255,77,109,0.2); }
.profile-link.danger:hover { background: rgba(255,77,109,0.07); border-color: var(--danger); }
.profile-link.danger .link-icon { background: rgba(255,77,109,0.1); border-color: rgba(255,77,109,0.2); }
.profile-link.danger .link-text { color: var(--danger); }

/* ---- Stats Row ---- */
.stats-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 0 16px; }
.stat-card { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--border-radius-sm); padding: 14px 16px; }
.stat-card-val { font-family: 'Outfit', sans-serif; font-size: 18px; font-weight: 700; color: var(--primary); }
.stat-card-label { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* ---- History Page ---- */
.history-list { padding: 0; display: flex; flex-direction: column; gap: 10px; }
.history-item {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.history-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.history-icon.deposit { background: rgba(0,212,168,0.1); color: var(--success); }
.history-icon.withdraw { background: rgba(255,77,109,0.1); color: var(--danger); }
.history-icon.bonus { background: rgba(245,197,24,0.1); color: var(--primary); }
.history-icon.referral { background: rgba(77,166,255,0.1); color: var(--info); }
.history-icon.profit { background: rgba(0,212,168,0.1); color: var(--success); }
.history-body { flex: 1; }
.history-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.history-date { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.history-amount { font-weight: 700; font-size: 14px; }
.history-amount.credit { color: var(--success); }
.history-amount.debit { color: var(--danger); }
.status-badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 10px; font-weight: 700; }
.status-badge.pending { background: rgba(255,165,0,0.15); color: var(--warning); }
.status-badge.approved, .status-badge.paid { background: rgba(0,212,168,0.15); color: var(--success); }
.status-badge.rejected { background: rgba(255,77,109,0.15); color: var(--danger); }

/* ---- Referral Page ---- */
.referral-banner { width: 100%; border-radius: var(--border-radius); overflow: hidden; margin-bottom: 16px; }
.referral-banner img { width: 100%; height: 160px; object-fit: cover; }
.referral-qr-box { background: white; border-radius: 16px; padding: 16px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.referral-qr-box img { max-width: 150px; }
.referral-link-box {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.referral-link-text { flex: 1; font-size: 12px; color: var(--text-secondary); word-break: break-all; }
.copy-btn { background: none; border: none; color: var(--primary); cursor: pointer; flex-shrink: 0; }
.commission-levels { display: flex; gap: 10px; margin: 16px 0; }
.commission-level {
  flex: 1;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
  padding: 14px 10px;
  text-align: center;
}
.commission-pct { font-family: 'Outfit', sans-serif; font-size: 22px; font-weight: 800; background: var(--blue-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.commission-label { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ---- Live Chat ---- */
.chat-container { background: #f3f4f6 !important; height: calc(100vh - 70px); height: calc(100dvh - 70px); display: flex; flex-direction: column; max-width: 600px; margin: 0 auto; position: relative; }
.chat-page { display: flex; flex-direction: column; height: 100vh; }
.chat-header {
  background: linear-gradient(90deg, #007aff 0%, #7b61ff 100%);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 56px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.chat-header .back-btn {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent !important;
  border: none !important;
  color: #ffffff !important;
  width: auto !important;
  height: auto !important;
  box-shadow: none !important;
}
.chat-header .back-btn svg {
  stroke: #ffffff;
}
.chat-admin-info {
  text-align: center;
}
.chat-admin-name {
  font-weight: 700;
  font-size: 17px;
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
}
.chat-status {
  display: none; /* Hide admin online/offline badge from header as in photo */
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #f3f4f6;
}
.chat-msg {
  display: flex;
  gap: 8px;
  max-width: 85%;
  align-items: flex-start;
}
.chat-msg.user {
  align-self: flex-end;
  justify-content: flex-end;
}
.chat-msg.admin {
  align-self: flex-start;
}
.chat-msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.08);
}
.chat-msg-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 100%;
}
.chat-msg.user .chat-msg-body {
  align-items: flex-end;
}
.chat-msg.admin .chat-msg-body {
  align-items: flex-start;
}
.chat-bubble {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  position: relative;
  word-break: break-word;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.chat-msg.user .chat-bubble {
  background: #007aff !important; /* Premium Blue */
  color: #ffffff !important;
  border-top-right-radius: 2px;
}
.chat-msg.admin .chat-bubble {
  background: #ffffff !important;
  color: #1f2937 !important;
  border-top-left-radius: 2px;
  border: 1px solid rgba(0,0,0,0.05);
}
/* Speech bubble tail pointing left to avatar */
.chat-msg.admin .chat-bubble::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 12px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-right: 6px solid #ffffff;
}
.chat-img {
  max-width: 200px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 2px;
}
.chat-time {
  display: block;
  font-size: 10px;
  margin-top: 6px;
  font-weight: 500;
}
.chat-msg.user .chat-time {
  color: rgba(255, 255, 255, 0.75);
  text-align: right;
}
.chat-msg.admin .chat-time {
  color: #9ca3af;
  text-align: left;
}
.chat-time.image-time {
  margin-top: 2px;
}
.chat-msg.user .chat-time.image-time {
  color: #9ca3af;
  text-align: right;
}
.chat-msg.admin .chat-time.image-time {
  color: #9ca3af;
  text-align: left;
}
.chat-input-wrap {
  border-top: 1px solid rgba(0,0,0,0.08);
  padding: 12px 16px;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.02);
}
.chat-input {
  flex: 1;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 16px;
  color: #111827;
  font-size: 14px;
  outline: none;
  font-family: 'Inter', sans-serif;
  box-sizing: border-box;
}
.chat-input:focus {
  border-color: #007aff;
  background: #ffffff;
}
.chat-send-btn {
  width: 44px;
  height: 44px;
  background: #007aff !important; /* Blue send button as in photo */
  border: none;
  border-radius: 8px; /* Square-ish rounded, matching the photo */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.chat-send-btn svg {
  stroke: #ffffff; /* White icon inside send button */
}
.chat-send-btn:active {
  opacity: 0.8;
}
.chat-photo-btn {
  width: 40px;
  height: 40px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  flex-shrink: 0;
}

/* ---- Chat Notification Badge ---- */
.chat-link-wrap { position: relative; display: inline-flex; }
.chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ff3b30; /* Brighter iOS style red */
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff; /* White border as requested */
  box-shadow: 0 3px 10px rgba(255, 59, 48, 0.4);
  pointer-events: none;
  z-index: 5;
  animation: badgeIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.35);
}
@keyframes badgeIn { from { transform: scale(0) rotate(-20deg); opacity: 0; } to { transform: scale(1) rotate(0deg); opacity: 1; } }

/* ---- Deposit Page ---- */
.amount-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.amount-preset {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}
@media (hover: hover) {
  .amount-preset.active, .amount-preset:hover { background: rgba(245,197,24,0.15); border-color: var(--primary); color: var(--primary); }
}
.amount-preset:active { transform: scale(0.95); }
.deposit-qr-card { background: white; border-radius: var(--border-radius); padding: 20px; text-align: center; margin-bottom: 16px; }
.deposit-qr-card img { max-width: 180px; margin-bottom: 12px; }
.deposit-number { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--border-radius-sm); padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.deposit-info-row { background: rgba(245,197,24,0.05); border: 1px solid rgba(245,197,24,0.1); border-radius: var(--border-radius-sm); padding: 12px 14px; font-size: 12px; color: var(--text-secondary); margin-bottom: 14px; line-height: 1.8; }
.countdown-box { text-align: center; padding: 14px; background: rgba(255,77,109,0.08); border: 1px solid rgba(255,77,109,0.2); border-radius: var(--border-radius-sm); margin-bottom: 14px; }
.countdown-timer { font-family: 'Outfit', sans-serif; font-size: 28px; font-weight: 800; color: var(--danger); }
.upload-box {
  border: 2px dashed var(--glass-border);
  border-radius: var(--border-radius-sm);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 14px;
}
.upload-box:hover, .upload-box.dragover { border-color: var(--primary); background: rgba(245,197,24,0.03); }
.upload-box img.preview { max-width: 100%; border-radius: 8px; max-height: 200px; object-fit: contain; }
.upload-icon { width: 48px; height: 48px; color: var(--text-muted); margin: 0 auto 10px; }
.upload-text { color: var(--text-muted); font-size: 13px; }

/* ---- Page Header ---- */
.page-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--glass-border);
}
.back-btn { background: var(--glass); border: 1px solid var(--glass-border); border-radius: 50%; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-secondary); text-decoration: none; transition: var(--transition); }
@media (hover: hover) {
  .back-btn:hover { color: var(--primary); border-color: var(--primary); }
}
.back-btn:active { transform: scale(0.9); }
.page-header-title { font-family: 'Outfit', sans-serif; font-size: 18px; font-weight: 700; }

/* ---- Animations ---- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

.fade-in { animation: fadeInUp 0.5s ease forwards; }
.slide-in { animation: slideInLeft 0.4s ease forwards; }

/* ---- Loading Skeleton ---- */
.skeleton {
  background: linear-gradient(90deg, var(--glass) 25%, rgba(255,255,255,0.06) 50%, var(--glass) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* ---- Info panel ---- */
.info-notice {
  background: rgba(77,166,255,0.07);
  border: 1px solid rgba(77,166,255,0.15);
  border-radius: var(--border-radius-sm);
  padding: 12px 14px;
  font-size: 12px;
  color: var(--info);
  line-height: 1.7;
  margin-bottom: 14px;
}
.info-notice strong { display: block; margin-bottom: 4px; font-size: 13px; }

/* ---- User ID header ---- */
.user-id-bar {
  background: var(--navy-card);
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-border);
}
.user-id-text { font-size: 11px; color: var(--text-muted); }
.user-id-text span { color: var(--primary); font-weight: 700; }

/* ---- Responsive & Mobile Optimization ---- */
@media (max-width: 480px) {
  .app-wrapper { border-radius: 0; }
  
  /* Balance Card Scaling */
  .balance-card { padding: 18px 15px; margin: 4px 0; border-radius: 8px; width: 100%; border-left: none; border-right: none; }
  .balance-amount { font-size: 24px; }
  .balance-label { font-size: 11px; }
  .balance-btns { gap: 6px; }
  
  /* Button Scaling */
  .btn-gold, .btn-gold-outline { padding: 10px 16px; font-size: 12px; }
  .btn-sm { padding: 6px 10px; font-size: 11px; }

  /* Premium Components Scaling */
  .premium-claim-box { padding: 14px 15px !important; margin: 0 0 6px !important; border-radius: 6px; border-left: none; border-right: none; }
  .claim-title-box .main-lbl { font-size: 15px; }
  
  .plan-card.premium { padding: 12px 10px; margin: 0 0 8px; border-radius: 8px; border-left: none; border-right: none; }
  .premium-header { flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
  .premium-timer-box, .premium-timer-lbl { font-size: 10px; }
  .premium-bonus { font-size: 9px; padding: 3px 6px; }
  
  .premium-name { font-size: 14px; font-weight: 800; }
  .premium-price { font-size: 16px; font-weight: 800; }
  .purchase-btn { padding: 8px 12px; font-size: 12px; height: 34px; border-radius: 8px; }
  
  .stat-val { font-size: 12px; }
  .stat-lbl { font-size: 8px; }
  
  /* Spacing */
  .section-title { font-size: 14px; padding-left: 4px; margin-bottom: 8px; }
  .plans-list { gap: 6px; padding: 0; }
}

@media (max-width: 360px) {
  .balance-amount { font-size: 20px; }
  .premium-timer-box, .premium-bonus { font-size: 9px; }
  .header-logo-text { font-size: 12px; }
}

/* ---- Purchase Modal Styles ---- */
.plan-modal-img { width: 100%; height: 160px; object-fit: cover; border-radius: 10px; margin-bottom: 12px; }
.plan-modal-info { display: flex; justify-content: space-between; margin-bottom: 10px; gap: 6px; }
.plan-modal-stat { text-align: center; flex: 1; }
.plan-modal-stat .val { font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 700; color: var(--primary); }
.plan-modal-stat .lbl { font-size: 10px; color: var(--text-muted); margin-top: 3px; }
.modal-close-row { display: flex; gap: 10px; }
.modal-close-row .btn-glass { flex: 1; justify-content: center; }
.modal-close-row .btn-gold { flex: 1; }
/* ---- VIP Membership Styles ---- */
.vip-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #f5c518 0%, #ffd700 50%, #d4a017 100%);
    color: #1a0e00;
    font-weight: 800;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    box-shadow: 0 2px 10px rgba(245, 197, 24, 0.4);
    line-height: 1;
    margin-left: 6px;
}
.vip-frame {
    position: relative;
    padding: 4px;
    background: linear-gradient(45deg, #f5c518, #ffd700, #d4a017, #f5c518);
    background-size: 300% 300%;
    animation: goldRotate 4s linear infinite;
    border-radius: 50%;
    display: flex;
}
@keyframes goldRotate { 
    0% { background-position: 0% 50%; } 
    50% { background-position: 100% 50%; } 
    100% { background-position: 0% 50%; } 
}
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-strike { text-decoration: line-through; color: var(--danger); font-size: 12px; opacity: 0.8; }
.vip-notice { font-size: 10px; color: var(--primary); font-weight: 700; display: block; margin-top: 2px; }
.vip-pro-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: vipFloat 3s ease-in-out infinite;
}

.vip-badge-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(245, 197, 24, 0.5));
}

.vip-glow-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 110%;
  height: 110%;
  border-radius: 50%;
  border: 2px solid rgba(245, 197, 24, 0.3);
  box-shadow: 0 0 15px rgba(245, 197, 24, 0.4);
  animation: vipGlow 2s ease-in-out infinite alternate;
}

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

@keyframes vipGlow {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  100% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
}

.vip-frame {
  position: relative;
  border: 3px solid #fdbb2d;
  background: linear-gradient(135deg, #fdbb2d, #f9a01b);
  padding: 2px;
  box-shadow: 0 0 15px rgba(253, 187, 45, 0.5);
  animation: borderAnim 4s linear infinite;
}

@keyframes borderAnim {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

.vip-crown-pro {
  filter: drop-shadow(0 0 8px #ffd700);
  transition: all 0.3s ease;
}

.vip-crown-pro:hover {
  transform: scale(1.2) rotate(10deg);
  filter: drop-shadow(0 0 15px #ffd700);
}

.vip-badge-home {
    background: linear-gradient(135deg, #fdbb2d 0%, #daa520 100%);
    color: #1a0e00;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    box-shadow: 0 0 5px rgba(218, 165, 32, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    vertical-align: middle;
}

.vip-badge-home::before {
    content: '👑';
    font-size: 11px;
}

.vip-profile-taj-wrap {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    z-index: 20;
    pointer-events: none;
}

.vip-taj-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: tajGlow 2s ease-in-out infinite alternate;
}

@keyframes tajGlow {
    from { filter: drop-shadow(0 0 5px #ffd700); transform: translateY(0) scale(1); }
    to { filter: drop-shadow(0 0 15px #ffd700); transform: translateY(-3px) scale(1.1); }
}

/* ---- Referral Hero (Pro Level) ---- */
.referral-hero {
  background: var(--blue-gradient);
  border-radius: 24px;
  padding: 20px 16px;
  text-align: center;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 102, 255, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.referral-hero-img {
  width: 100%;
  max-width: 200px;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.3));
  margin-bottom: 5px;
  animation: floatHero 5s ease-in-out infinite;
}
@keyframes floatHero {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.referral-hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 4px 10px rgba(0,0,0,0.1);
  margin-top: 5px;
}
.referral-hero-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 500;
  max-width: 300px;
  line-height: 1.4;
  opacity: 0.9;
}
.referral-badge {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ---- Bonus Hero (Pro Level) ---- */
.bonus-hero {
  background: var(--blue-gradient);
  border-radius: 24px;
  padding: 0;
  text-align: center;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 102, 255, 0.2);
  display: flex;
  flex-direction: column;
  aspect-ratio: 16 / 9;
}
.bonus-hero-img-wrap {
  width: 100%;
  height: 100%;
  position: relative;
}
.bonus-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bonus-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 20px;
}
.bonus-hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.bonus-hero-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 500;
  margin-top: 4px;
  opacity: 0.9;
}

/* ---- Profile Hero (Pro Level) ---- */
.profile-hero {
  background: url('../images/profile_bg.png') no-repeat center center;
  background-size: cover;
  border-radius: 24px;
  padding: 40px 20px 30px;
  text-align: center;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}
.profile-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 15, 30, 0.4) 0%, rgba(10, 15, 30, 0.8) 100%);
  z-index: 1;
}
.profile-hero > * {
  position: relative;
  z-index: 2;
}
.profile-photo-wrap, .vip-frame {
  border: 3px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.profile-hero .profile-uid {
  color: rgba(255,255,255,0.7) !important;
}
.profile-hero .profile-uid span {
  color: #ffffff !important;
  opacity: 0.9;
}
.profile-hero .status-badge.approved {
  background: rgba(0, 212, 168, 0.2);
  border: 1px solid rgba(0, 212, 168, 0.4);
  color: #00d4a8;
  backdrop-filter: blur(5px);
}

/* ================================================
   Cloud-Node Style Plan Cards (Screenshot Match)
   ================================================ */
.cn-plans-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
}
.cn-plan-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid #f0f0f5;
  position: relative;
  overflow: hidden;
}
/* Timer/Bonus header strip */
.cn-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f5;
}
.cn-card-header .premium-timer-box {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cn-card-header .premium-timer-lbl {
  font-size: 11px;
  font-weight: 700;
  color: #555;
}
.cn-card-header .t-unit {
  background: #f0f4ff;
  color: #0066ff;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}
.cn-card-header .premium-bonus {
  font-size: 11px;
  font-weight: 700;
  color: #0066ff;
  background: rgba(0,102,255,0.08);
  padding: 3px 8px;
  border-radius: 6px;
}

/* Main body: image + info side by side */
.cn-card-body {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.cn-card-img {
  width: 90px;
  height: 90px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f5f7fa;
  position: relative;
}
.cn-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cn-card-img .plan-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 8px;
  padding: 2px 6px;
}
.cn-card-info {
  flex: 1;
  min-width: 0;
}
.cn-plan-name {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: #1a1a2e;
  margin-bottom: 6px;
  line-height: 1.2;
}
.cn-plan-name .vip-tag {
  font-size: 9px;
  font-weight: 800;
  color: #0066ff;
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
}

/* Detail grid: 2 columns */
.cn-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 16px;
}
.cn-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1px 0;
}
.cn-detail-label {
  font-size: 11px;
  color: #999;
  font-weight: 500;
  font-style: italic;
}
.cn-detail-value {
  font-size: 12px;
  color: #1a1a2e;
  font-weight: 700;
}

/* Subordinate rebate row (full width) */
.cn-rebate-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1px 0;
  grid-column: 1 / -1;
}
.cn-rebate-label {
  font-size: 10px;
  color: #999;
  font-style: italic;
}
.cn-rebate-value {
  font-size: 11px;
  color: #1a1a2e;
  font-weight: 700;
}

/* Footer: price + button */
.cn-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #f0f0f5;
}
.cn-price {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #1a1a2e;
}
.cn-price .cn-price-old {
  font-size: 13px;
  color: #ff4d6d;
  text-decoration: line-through;
  font-weight: 600;
  margin-right: 6px;
}
.cn-price .cn-price-free {
  font-size: 14px;
  color: #10b981;
  font-weight: 800;
}
.cn-rent-btn {
  background: linear-gradient(135deg, #2196F3 0%, #1e88e5 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 28px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 3px 10px rgba(33,150,243,0.3);
  letter-spacing: 0.5px;
}
.cn-rent-btn:active {
  transform: scale(0.96);
  opacity: 0.9;
}
.cn-rent-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
/* Free plan link btn */
.cn-rent-btn.cn-contact-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

/* Expired overlay */
.cn-plan-card.cn-expired {
  opacity: 0.6;
}
.cn-plan-card .cn-expired-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  z-index: 5;
  backdrop-filter: blur(2px);
}

/* Free plan badge on image */
.cn-free-badge {
  position: absolute;
  bottom: -4px;
  left: -4px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
/* Sale badge */
.cn-sale-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: #ff4d6d;
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.cn-vip-notice {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 2px;
}

/* Plan Card Style Matching Screenshot */
.cn-plans-list { display: grid; gap: 16px; width: 100%; box-sizing: border-box; }
.cn-plan-card {
  background: #ffffff !important;
  border-radius: 20px !important;
  padding: 18px !important;
  box-shadow: 0 16px 32px rgba(17, 24, 39, 0.06) !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
}
.cn-card-body {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
  width: 100%;
}
.cn-card-img {
  width: 96px;
  min-width: 96px;
  height: 96px;
  border-radius: 18px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f7f9fc;
  position: relative;
}
.cn-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cn-card-info {
  flex: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cn-plan-name {
  font-size: 16px;
  font-weight: 800;
  color: #111827 !important;
  line-height: 1.2;
  margin-bottom: 4px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.cn-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}
.cn-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.cn-detail-label {
  font-size: 11px;
  font-weight: 500;
  color: #6b7280 !important;
}
.cn-detail-value {
  font-size: 14px;
  font-weight: 700;
  color: #111827 !important;
}
.cn-rebate-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: #475569 !important;
  border-top: 1px solid #f3f4f6;
  padding-top: 10px;
}
.cn-rebate-label { color: #6b7280 !important; font-size: 12px; }
.cn-rebate-value { font-weight: 700; color: #111827 !important; }
.cn-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
  width: 100%;
}
.cn-price {
  font-size: 18px;
  font-weight: 800;
  color: #111827 !important;
}
.cn-price-old {
  font-size: 13px;
  color: #6b7280 !important;
  text-decoration: line-through;
  margin-right: 6px;
}
.cn-rent-btn {
  min-width: 90px;
  padding: 11px 20px;
  border-radius: 20px;
  border: none;
  background: #007aff !important;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.35);
  text-align: center;
  text-decoration: none;
  display: inline-block;
}
.cn-rent-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,122,255,0.45); }
.cn-rent-btn.disabled { background: #e5e7eb !important; color: #9ca3af !important; cursor: not-allowed; box-shadow: none; }
.cn-contact-btn { background: #f3f4f6 !important; color: #111827 !important; box-shadow: none; }
.cn-plan-name .vip-tag { margin-top: 6px; display: inline-flex; gap: 5px; align-items: center; padding: 3px 8px; border-radius: 999px; background: rgba(245,158,11,0.12); color: #b45309; font-size: 10px; font-weight: 700; }
.cn-sale-badge, .cn-free-badge, .plan-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  font-size: 10px; padding: 4px 9px; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(15,23,42,0.1);
  font-weight: 700;
}
.cn-sale-badge { background: #fff7ed !important; color: #c2410c !important; }
.cn-free-badge { background: #ecfdf5 !important; color: #16a34a !important; }
.plan-badge { background: rgba(59,130,246,0.1) !important; color: #1d4ed8 !important; }
.cn-expired-overlay {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.7);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #6b7280;
  z-index: 3; border-radius: 20px;
}
.cn-card-header { margin-bottom: 12px; }
.premium-timer-box { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.premium-timer-lbl { font-size: 12px; color: #475569; font-weight: 600; }
.timer-units { display: inline-flex; gap: 5px; }
.t-unit { background: #e2e8f0; border-radius: 8px; padding: 3px 7px; font-size: 11px; color: #0f172a; font-weight: 600; }
.premium-bonus { font-size: 12px; font-weight: 700; color: #065f46; background: #ecfdf5; border-radius: 999px; padding: 4px 10px; }
.home-section-title {
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'Outfit', sans-serif; font-size: 15px; font-weight: 700;
  color: #1a1a2e; margin-bottom: 12px;
}
.home-section-title a { font-size: 12px; color: #0066ff; font-weight: 600; text-decoration: none; }

/* ---- Bottom Sheet Modal Styles ---- */
.bottom-sheet-popup {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.bottom-sheet-popup.active { opacity: 1; pointer-events: auto; }
.bottom-sheet-container {
  background: #fff; border-radius: 24px 24px 0 0;
  width: 100%; max-width: 600px;
  transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.32,0.72,0,1);
  max-height: 85vh; display: flex; flex-direction: column;
}
.bottom-sheet-popup.active .bottom-sheet-container { transform: translateY(0); }

.bottom-sheet-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(90deg, #1e62ec 0%, #0099ff 100%);
  border-radius: 24px 24px 0 0;
  flex-shrink: 0;
}
.bottom-sheet-title { font-size: 16px; font-weight: 800; color: #fff; }
.bottom-sheet-close {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.2); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff; transition: background 0.2s;
  font-size: 16px;
}
.bottom-sheet-close:active { background: rgba(255,255,255,0.3); }

.bottom-sheet-body { padding: 20px 20px 0; overflow-y: auto; flex: 1; }

/* ================================================
   Coupon Ticket System Styles
   ================================================ */
.coupon-ticket {
  display: flex;
  background: linear-gradient(135deg, #fdbb2d, #ff8c00);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(253, 140, 0, 0.15);
  margin-bottom: 16px;
  position: relative;
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  height: 96px;
  text-align: left;
}
.coupon-ticket::before, .coupon-ticket::after {
  content: '';
  position: absolute;
  left: 70%;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  z-index: 6;
}
.coupon-ticket::before {
  top: -7px;
  box-shadow: inset 0 -2px 3px rgba(0,0,0,0.05);
}
.coupon-ticket::after {
  bottom: -7px;
  box-shadow: inset 0 2px 3px rgba(0,0,0,0.05);
}

/* Stamp Scallops Edge */
.coupon-scallops {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: -5px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: calc(100% - 12px);
  z-index: 5;
}
.coupon-scallops span {
  width: 10px;
  height: 10px;
  background: #fff; /* matches background of popup container */
  border-radius: 50%;
  display: block;
}

.coupon-left {
  width: 70%;
  padding: 10px 14px 10px 18px; /* Extra padding left for scallops */
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  box-sizing: border-box;
}
.coupon-left::after {
  content: '';
  position: absolute;
  right: 0;
  top: 12px;
  bottom: 12px;
  border-right: 1.5px dashed rgba(255, 255, 255, 0.6);
  z-index: 4;
}
.coupon-right {
  width: 30%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-sizing: border-box;
  z-index: 3;
}
.coupon-percent {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.2);
  border: 1.5px solid #fff;
  color: #fff;
  padding: 3px 10px;
  border-radius: 6px;
  display: inline-block;
  align-self: flex-start;
  margin-top: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.coupon-title-text {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  opacity: 0.95;
}
.coupon-code-text {
  font-family: monospace;
  font-size: 11px;
  font-weight: 700;
  margin-top: 6px;
  color: #d84315;
  background: #fbe9e7;
  padding: 2px 6px;
  border-radius: 4px;
  align-self: flex-start;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.08);
  border: 1px solid rgba(216,67,21,0.15);
}
.coupon-plan-limit {
  font-size: 9px;
  opacity: 0.9;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.coupon-use-btn {
  background: #ef4444 !important;
  color: #fff !important;
  border: none;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s;
  box-shadow: 0 3px 8px rgba(239, 68, 68, 0.35);
  text-transform: uppercase;
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
}
.coupon-use-btn:active {
  transform: scale(0.95);
}

/* Coupon Select in Modal */
.coupon-ticket-select {
  display: flex;
  background: linear-gradient(135deg, #fdbb2d, #ff8c00);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(253, 140, 0, 0.15);
  margin-bottom: 12px;
  position: relative;
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  height: 86px;
  cursor: pointer;
  text-align: left;
}
.coupon-ticket-select::before, .coupon-ticket-select::after {
  content: '';
  position: absolute;
  left: 75%;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  z-index: 6;
}
.coupon-ticket-select::before { top: -6px; }
.coupon-ticket-select::after { bottom: -6px; }
.coupon-ticket-select .coupon-left {
  width: 75%;
  padding: 8px 12px 8px 18px; /* Extra padding left for scallops */
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}
.coupon-ticket-select .coupon-left::after {
  content: '';
  position: absolute;
  right: 0;
  top: 10px;
  bottom: 10px;
  border-right: 1.5px dashed rgba(255,255,255,0.5);
  z-index: 4;
}
.coupon-right-select {
  width: 25%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  box-sizing: border-box;
  z-index: 3;
}
.coupon-select-indicator {
  background: #10b981;
  color: #fff;
  border: none;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 5px;
  text-transform: uppercase;
  text-align: center;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}
