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

:root {
  --bg-deep: #0F001A;
  --bg-card: #1F0033;
  --bg-card-2: #2C0048;
  --accent: #A803FC;
  --accent-glow: #C04AFF;
  --accent-2: #FF3DA1;
  --gold: #FFD700;
  --rare-grand: #FFD700;
  --rare-s: #FF3DA1;
  --rare-a: #A803FC;
  --rare-b: #00D4FF;
  --rare-c: #4ADE80;
  --rare-d: #94A3B8;
  --rare-last: #FF5A36;
  --text: #F0E6FF;
  --text-dim: #B8A6D9;
}

html, body {
  background: radial-gradient(ellipse at top, #2C0048 0%, var(--bg-deep) 50%);
  color: var(--text);
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

body {
  max-width: 728px;
  margin: 0 auto;
  padding-bottom: 80px;
  position: relative;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; }

/* HEADER */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 0, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(168, 3, 252, 0.2);
  padding: 14px 16px;
}

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

.logo {
  font-weight: 900;
  font-size: 22px;
  background: linear-gradient(135deg, var(--accent-glow), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.btn-login {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 4px 20px rgba(168, 3, 252, 0.5);
}

.search {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(168, 3, 252, 0.25);
  border-radius: 999px;
  padding: 10px 16px;
  gap: 8px;
}

.search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
}

.search input::placeholder { color: var(--text-dim); }

/* HERO BANNER */
.hero {
  margin: 16px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #6B0FAA 0%, #FF3DA1 50%, #FFD700 100%);
  padding: 28px 24px;
  box-shadow: 0 12px 40px rgba(168, 3, 252, 0.4);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40'><circle cx='20' cy='20' r='1' fill='white' opacity='0.3'/></svg>");
  opacity: 0.4;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 26px;
  font-weight: 900;
  color: white;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
  margin-bottom: 6px;
}

.hero p {
  font-size: 14px;
  color: rgba(255,255,255,0.92);
  margin-bottom: 14px;
}

.hero-cta {
  display: inline-block;
  background: white;
  color: #6B0FAA;
  font-weight: 800;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 13px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

/* SECTION HEADER */
.section {
  margin: 24px 16px 8px;
}

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

.section-head h2 {
  font-size: 17px;
  font-weight: 800;
}

.section-head .arrow {
  color: var(--accent-glow);
  font-size: 20px;
}

/* CATEGORY GRID */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.cat {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-card-2));
  border: 1px solid rgba(168, 3, 252, 0.25);
  border-radius: 14px;
  padding: 16px 8px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cat:active { transform: scale(0.95); }

.cat:hover {
  box-shadow: 0 6px 20px rgba(168, 3, 252, 0.4);
  border-color: var(--accent-glow);
}

.cat-icon {
  font-size: 28px;
  margin-bottom: 6px;
}

.cat-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

/* CAMPAIGN CARDS */
.campaign-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.card {
  background: linear-gradient(180deg, var(--bg-card-2), var(--bg-card));
  border: 1px solid rgba(168, 3, 252, 0.25);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:active { transform: scale(0.97); }

.card:hover {
  box-shadow: 0 8px 24px rgba(168, 3, 252, 0.4);
  border-color: var(--accent-glow);
}

.card-img {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #4A1A6E, #1F0033);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 20px;
  color: var(--accent-glow);
  text-shadow: 0 2px 12px rgba(168, 3, 252, 0.7);
  position: relative;
}

.card-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(168, 3, 252, 0.3), transparent 60%);
}

.card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: linear-gradient(135deg, var(--gold), #FF8800);
  color: black;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  z-index: 2;
}

.card-info {
  padding: 10px 12px 12px;
}

.card-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 34px;
}

.progress {
  height: 4px;
  background: rgba(168, 3, 252, 0.2);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-glow), var(--accent-2));
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent);
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
}

.price-pill {
  background: var(--accent);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
}

/* BOTTOM NAV */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 728px;
  background: rgba(15, 0, 26, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(168, 3, 252, 0.3);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 100;
}

.nav-item {
  padding: 12px 8px 14px;
  text-align: center;
  color: var(--text-dim);
  font-size: 11px;
  transition: color 0.2s;
}

.nav-item .icon {
  font-size: 22px;
  display: block;
  margin-bottom: 2px;
}

.nav-item.active {
  color: var(--accent-glow);
  font-weight: 700;
}

.nav-item:hover { color: var(--accent-glow); }

/* DETAIL PAGE */
.detail-hero {
  margin: 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--bg-card-2), var(--bg-card));
  border: 1px solid rgba(168, 3, 252, 0.3);
  overflow: hidden;
}

.detail-img {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #4A1A6E, #1F0033);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 900;
  color: var(--accent-glow);
  text-shadow: 0 4px 20px rgba(168, 3, 252, 0.7);
}

.detail-body { padding: 16px 20px; }

.detail-title {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 6px;
  line-height: 1.2;
}

.detail-meta {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.detail-meta span {
  background: rgba(168, 3, 252, 0.15);
  padding: 3px 10px;
  border-radius: 999px;
}

.detail-progress {
  background: rgba(168, 3, 252, 0.12);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 14px;
}

.dp-label {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
}

.dp-bar {
  height: 8px;
  background: rgba(0,0,0,0.4);
  border-radius: 999px;
  overflow: hidden;
}

.dp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-glow), var(--accent-2), var(--gold));
  border-radius: 999px;
  box-shadow: 0 0 12px var(--accent-glow);
}

.detail-desc {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 16px;
}

.cta-pull {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--gold));
  color: white;
  font-weight: 900;
  font-size: 16px;
  padding: 16px;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(168, 3, 252, 0.5);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.cta-pull::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: translateX(-100%);
  animation: shimmer 2.5s infinite;
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

/* TIER LIST */
.tiers {
  margin: 16px;
}

.tiers h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 12px;
}

.tier {
  background: var(--bg-card);
  border: 1px solid rgba(168, 3, 252, 0.2);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.tier.GRAND { border-left-color: var(--rare-grand); background: linear-gradient(90deg, rgba(255,215,0,0.12), var(--bg-card)); }
.tier.S { border-left-color: var(--rare-s); }
.tier.A { border-left-color: var(--rare-a); }
.tier.B { border-left-color: var(--rare-b); }
.tier.C { border-left-color: var(--rare-c); }
.tier.D { border-left-color: var(--rare-d); }
.tier.LAST { border-left-color: var(--rare-last); background: linear-gradient(90deg, rgba(255,90,54,0.12), var(--bg-card)); }

.tier-rank {
  font-weight: 900;
  font-size: 18px;
  width: 36px;
  text-align: center;
}

.tier-rank.GRAND { color: var(--gold); }
.tier-rank.S { color: var(--rare-s); }
.tier-rank.A { color: var(--rare-a); }
.tier-rank.B { color: var(--rare-b); }
.tier-rank.C { color: var(--rare-c); }
.tier-rank.D { color: var(--rare-d); }
.tier-rank.LAST { color: var(--rare-last); font-size: 12px; line-height: 1.1; }

.tier-info { flex: 1; min-width: 0; }
.tier-name { font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.tier-meta { font-size: 11px; color: var(--text-dim); display: flex; gap: 10px; }
.tier-prob { color: var(--accent-glow); font-weight: 700; }
.tier-stock-out { color: #FF6B6B; }

/* MODAL OVERLAY for pull animation */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(10px);
  animation: fadeIn 0.3s;
}

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

.modal-content {
  text-align: center;
  padding: 30px;
}

.pull-anim {
  width: 220px;
  height: 220px;
  margin: 0 auto 24px;
  border-radius: 30px;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--gold), var(--accent-glow), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  animation: spin 1.5s ease-in-out;
  box-shadow: 0 0 80px var(--accent-glow);
}

@keyframes spin { 0% { transform: rotate(0); } 100% { transform: rotate(720deg) scale(1.1); } }

.modal h2 {
  color: var(--gold);
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 6px;
  text-shadow: 0 0 20px var(--gold);
}

.modal .reward-name {
  color: white;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.modal .reward-value {
  color: var(--accent-glow);
  font-size: 14px;
  margin-bottom: 24px;
}

.modal-close {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-weight: 800;
  padding: 12px 32px;
  border-radius: 999px;
  font-size: 14px;
}

/* DASHBOARD / ABOUT */
.page-pad { padding: 16px; }

.dash-card {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 8px 28px rgba(168, 3, 252, 0.4);
}

.dash-card .label { font-size: 12px; color: rgba(255,255,255,0.85); }
.dash-card .value { font-size: 28px; font-weight: 900; color: white; }

.about-section {
  background: var(--bg-card);
  border: 1px solid rgba(168, 3, 252, 0.25);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
}

.about-section h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--accent-glow);
  margin-bottom: 10px;
}

.about-section p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.about-section ul { padding-left: 22px; }
.about-section li { font-size: 14px; line-height: 1.7; color: var(--text-dim); }

.disclaimer {
  background: rgba(255, 90, 54, 0.12);
  border: 1px solid rgba(255, 90, 54, 0.4);
  border-radius: 12px;
  padding: 14px;
  margin: 16px;
  font-size: 12px;
  color: #FFB199;
  line-height: 1.6;
}
