:root {
  --bg: #05070f;
  --card: #0f1625;
  --card-soft: rgba(255, 255, 255, 0.04);
  --accent: #2af2d8;
  --accent-strong: #f741a9;
  --text: #e7edf8;
  --muted: rgba(231, 237, 248, 0.7);
  --border: rgba(255, 255, 255, 0.08);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top right, rgba(42, 242, 216, 0.15), transparent 45%),
    radial-gradient(circle at 20% 20%, rgba(247, 65, 169, 0.15), transparent 40%),
    var(--bg);
  min-height: 100vh;
  color: var(--text);
}
#app {
  min-height: 100vh;
}
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  padding-bottom: 90px;
}
.app-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  backdrop-filter: blur(16px);
  background: rgba(5, 7, 15, 0.85);
  border-bottom: 1px solid var(--border);
  z-index: 2;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(42, 242, 216, 0.8));
}
.brand-title {
  font-size: 1.3rem;
  display: block;
  margin: 0;
}
.brand-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.header-points {
  text-align: right;
}
.points-label {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.points-display {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 1.8rem;
  font-weight: 700;
}
.points-display span {
  font-size: 0.9rem;
  opacity: 0.8;
}
.ghost-btn {
  margin-top: 6px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
}
.ghost-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.app-body {
  flex: 1;
  padding: 10px 20px 0;
}
#pages {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.page {
  display: none;
}
.page.active {
  display: block;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
}
.section-header h2,
.section-header h3 {
  margin: 4px 0;
  font-weight: 600;
}
.eyebrow {
  margin: 0;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.hint {
  font-size: 0.85rem;
  color: var(--muted);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.35);
}
.card-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}
.card-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.method-card,
.pack-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}
.method-status {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.chart-card {
  padding-bottom: 24px;
}
.round-timer {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.round-countdown {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
}
.round-meta {
  font-size: 0.85rem;
  color: var(--muted);
}
.form-row {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.form-row select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px;
  color: var(--text);
  font-size: 1rem;
}
.actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
}
.quest-meta {
  margin-top: 6px;
  font-size: 0.8rem;
  color: rgba(231, 237, 248, 0.7);
}
.quest-info {
  margin-top: 8px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}
.quest-link {
  margin-top: 6px;
}
.quest-link a {
  color: var(--accent);
  text-decoration: underline;
}
.quest-code {
  margin-top: 6px;
  padding: 8px;
  font-size: 0.75rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--muted);
  overflow-x: auto;
}
.app-toast {
  position: fixed;
  bottom: 14px;
  right: 14px;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(10, 11, 16, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
  font-size: 0.85rem;
  color: var(--text);
  z-index: 999;
}
.card-actions {
  display: flex;
  justify-content: flex-end;
}
.quest-card .card-actions {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.quest-card .card-actions .btn {
  width: 100%;
}
.quest-countdown,
.quest-hint {
  text-align: left;
}

.pack-actions {
  display: flex;
  gap: 8px;
}

.profile-panel {
  margin-top: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.profile-panel {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}
.profile-panel form {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.profile-panel label input {
  min-width: 0;
}
.profile-panel form {
  display: grid;
  gap: 10px;
}
.profile-panel label {
  display: flex;
  flex-direction: column;
  font-size: 0.8rem;
  color: var(--muted);
  gap: 4px;
}
.profile-panel input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  color: var(--text);
}

.quest-countdown {
  font-size: 0.75rem;
  color: var(--accent);
  margin-top: 6px;
}
.quest-hint {
  font-size: 0.65rem;
  color: var(--text);
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  min-height: 22px;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.quest-hint-active {
  color: #ffb347;
  background: rgba(255, 179, 71, 0.16);
  border-color: rgba(255, 179, 71, 0.4);
}

.proof-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 15, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 999;
}
.proof-modal.visible {
  opacity: 1;
  visibility: visible;
}
.proof-card {
  width: min(420px, 90vw);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.proof-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.proof-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.4rem;
  cursor: pointer;
}
.proof-card h3 {
  margin: 0;
  font-size: 1.1rem;
}
.proof-card form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.proof-card label {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.proof-card input,
.proof-card textarea {
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}
.proof-card textarea {
  min-height: 90px;
}
.proof-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.withdraw-history-panel {
  margin-top: 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}
.withdraw-history-panel table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.withdraw-history-panel {
  overflow-x: auto;
}
.withdraw-history-panel th,
.withdraw-history-panel td {
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.withdraw-history-panel thead {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.withdraw-status {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.status-pending {
  background: rgba(247, 65, 169, 0.15);
  color: #f741a9;
}
.status-paid {
  background: rgba(42, 242, 216, 0.15);
  color: #2af2d8;
}
.status-rejected {
  background: rgba(255, 126, 86, 0.15);
  color: #ff7e56;
}
.withdraw-history-panel .muted {
  margin: 0;
  color: var(--muted);
}
.btn {
  flex: 1;
  border: none;
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn.neon {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #0b0d14;
  box-shadow: 0 8px 16px rgba(42, 242, 216, 0.35), 0 0 0 1px rgba(247, 65, 169, 0.4);
}
.btn.neon.alt {
  filter: hue-rotate(30deg);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn:hover:not(:disabled) {
  transform: translateY(-2px);
}
.status-text {
  margin-top: 16px;
  font-size: 0.95rem;
  color: var(--muted);
}
.feed-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feed-item {
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--card-soft);
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.feed-item strong {
  display: block;
}
.feed-meta {
  font-size: 0.75rem;
  color: var(--muted);
}
.profile-card {
  margin-top: 12px;
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(42, 242, 216, 0.15), rgba(247, 65, 169, 0.12));
  border: 1px solid rgba(247, 65, 169, 0.3);
  padding: 18px;
  display: grid;
  gap: 10px;
}
.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
}
.profile-row span {
  color: var(--muted);
}
.nav-note {
  color: var(--muted);
  font-size: 0.8rem;
}
.nav-btn {
  background: rgba(255, 255, 255, 0.04);
  border: none;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.nav-btn.active {
  background: linear-gradient(135deg, rgba(42, 242, 216, 0.2), rgba(247, 65, 169, 0.25));
}
.nav-btn:hover {
  transform: translateY(-2px);
}
.nav-btn--play {
  background: linear-gradient(135deg, rgba(247, 65, 169, 0.25), rgba(42, 242, 216, 0.35));
  box-shadow: 0 12px 24px rgba(42, 242, 216, 0.25);
}
.app-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 16px;
  width: calc(100% - 32px);
  max-width: 520px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 10px;
  background: rgba(5, 7, 15, 0.95);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(16px);
  z-index: 3;
}
.nav-icon {
  font-size: 1.1rem;
}
.nav-label {
  font-size: 0.65rem;
}
@media (max-width: 640px) {
  .app-header {
    flex-wrap: wrap;
    gap: 12px;
  }
  .header-points {
    width: 100%;
    text-align: left;
  }
  .app-nav {
    width: calc(100% - 20px);
  }
}
.outcome-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 999;
}
.outcome-emoji {
  position: absolute;
  top: -40px;
  animation: outcome-fall 2.4s ease-in forwards;
  opacity: 0.9;
  text-shadow: 0 6px 14px rgba(0, 0, 0, 0.45);
}
.outcome-emoji:nth-child(even) {
  animation-duration: 2.1s;
}
.outcome-emoji:nth-child(odd) {
  animation-duration: 2.6s;
}
.outcome-emoji.win {
  color: #ffd447;
}
.outcome-emoji.lose {
  color: #8fa0c2;
}
@keyframes outcome-fall {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate3d(0, 120vh, 0) rotate(25deg);
    opacity: 0;
  }
}

.quest-groups {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.quest-group {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 12px 6px;
}
.quest-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
}
.quest-group-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
}
.quest-group-title i {
  font-size: 20px;
  color: var(--accent);
}
.quest-card-completed {
  opacity: 0.75;
}
.quest-completed {
  margin-top: 18px;
}

.quest-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}
.quest-tab-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.quest-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.quest-tab-btn i {
  font-size: 16px;
}
.quest-tab-btn.active {
  background: var(--accent);
  color: #0a0f1c;
  border-color: var(--accent);
}
.quest-tab-btn:active {
  transform: translateY(1px);
}
.game-tabs {
  margin: 8px 0 12px;
}
.game-tab-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.game-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.game-tab-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #0a0f1c;
  border-color: var(--accent);
}
.game-panel[hidden] {
  display: none;
}
.pill-btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.pill-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 8px 18px rgba(42, 242, 216, 0.2);
}
.plinko-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.plinko-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.plinko-board {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  padding: 18px 14px 16px;
  min-height: 220px;
  overflow: hidden;
}
.plinko-pins {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}
.plinko-row {
  display: flex;
  justify-content: center;
}
.plinko-pin {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 4px rgba(0,0,0,0.35);
}
.plinko-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
  gap: 8px;
}
.plinko-slot {
  text-align: center;
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  font-weight: 700;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
}
.plinko-slot.active {
  color: #0b0d14;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-color: transparent;
  box-shadow: 0 10px 20px rgba(42, 242, 216, 0.25);
}
.plinko-slot small {
  display: block;
  font-weight: 500;
  opacity: 0.75;
}
.plinko-risks {
  display: flex;
  gap: 8px;
  justify-content: space-between;
}
.plinko-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.plinko-controls input {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  color: var(--text);
}
.plinko-actions {
  display: flex;
  justify-content: flex-end;
}

.aviator-display {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  text-align: center;
}
.aviator-mult {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.plinko-ball {
  position: absolute;
  top: -24px;
  left: 50%;
  width: 16px;
  height: 16px;
  background: radial-gradient(circle at 35% 35%, #fff8c4, #ff9fd7);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, 0);
  opacity: 0.95;
}
.referral-box {
  display: flex;
  gap: 8px;
  align-items: center;
}
.referral-box input {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}
.referral-list {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  max-height: 180px;
  overflow-y: auto;
}
.referral-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
}
.referral-item:last-child {
  border-bottom: none;
}
