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

:root {
  --red: #f51e39;
  --red-dark: #c9102b;
  --black: #030303;
  --panel: #111111;
  --line: #292929;
  --muted: #a8a8a8;
}

body {
  background: var(--black);
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* VIBRANT FAST TWINKLING DEEP RED BACKGROUND PARTICLES */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background-image: 
    radial-gradient(circle at 12% 20%, rgba(255, 0, 51, 0.65) 2.5px, transparent 3.5px),
    radial-gradient(circle at 80% 12%, rgba(201, 16, 43, 0.75) 3px, transparent 4px),
    radial-gradient(circle at 45% 55%, rgba(255, 30, 57, 0.6) 2px, transparent 3px),
    radial-gradient(circle at 70% 85%, rgba(255, 0, 51, 0.7) 3px, transparent 4px),
    radial-gradient(circle at 20% 82%, rgba(201, 16, 43, 0.65) 2.5px, transparent 3.5px),
    radial-gradient(circle at 90% 50%, rgba(255, 30, 57, 0.5) 2px, transparent 3px);
  background-size: 240px 240px;
  animation: twinklingBg 1.8s infinite ease-in-out;
}

@keyframes twinklingBg {
  0%, 100% { opacity: 0.3; transform: scale(1); filter: drop-shadow(0 0 2px rgba(255,0,51,0.4)); }
  50% { opacity: 1; transform: scale(1.03); filter: drop-shadow(0 0 8px rgba(255,0,51,0.9)); }
}

button, input {
  font: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible, input:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.app {
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 18px 35px;
  position: relative;
  z-index: 1;
}

.page {
  width: 100%;
  animation: appear .25s ease;
}

.hidden {
  display: none !important;
}

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

.logo {
  margin: 60px auto 12px;
  color: var(--red);
  font-size: 110px;
  line-height: 1.25;
  text-align: center;
  transform: rotate(-12deg);
  text-shadow: 0 0 20px #f51e3950;
}

h1 {
  font-size: 27px;
  line-height: 1.3;
  text-align: center;
}

h1 span {
  color: var(--red);
}

.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  margin: 9px 0 22px;
}

.auth-box {
  margin-top: 55px;
}

.auth-box h2, #platformPage > h2, #roundsPage > h2 {
  margin-bottom: 24px;
  font-size: 25px;
  text-align: center;
}

label {
  display: block;
  margin: 16px 0 8px;
  color: #ddd;
  font-size: 14px;
}

input {
  width: 100%;
  min-height: 58px;
  padding: 15px;
  border: 1px solid #404040;
  border-radius: 7px;
  background: #181818;
  color: #fff;
  font-size: 16px;
}

input::placeholder {
  color: #888;
}

.primary, .activate {
  width: 100%;
  min-height: 60px;
  border: 0;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  margin-top: 22px;
  transition: background .2s, transform .15s;
  box-shadow: 0 0 15px rgba(245, 30, 57, 0.4);
}

.primary:active, .activate:active {
  transform: scale(.98);
}

.primary:hover, .activate:hover {
  background: #ff3650;
}

.text-button {
  border: 0;
  background: transparent;
  color: #ddd;
  font-size: 14px;
  padding: 12px 0;
}

#forgotBtn {
  display: block;
  margin-left: auto;
}

.red {
  color: var(--red);
  font-weight: 700;
}

.switch-text {
  text-align: center;
  margin-top: 28px;
  color: #ddd;
  font-size: 15px;
}

.switch-text .text-button {
  padding-left: 5px;
}

.message {
  margin-top: 14px;
  color: #ffb4be;
  font-size: 14px;
  line-height: 1.5;
}

.small-note {
  color: #8f8f8f;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
  margin-top: 20px;
}

.topbar {
  min-height: 45px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #222;
  margin-bottom: 32px;
}

.predictor-topbar {
  justify-content: space-between;
  align-items: center;
}

.predictor-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ROUNDS COUNTER PILL WIDGET */
.rounds-counter-pill {
  display: flex;
  align-items: center;
  background: #111;
  border: 1px solid #292929;
  border-radius: 30px;
  padding: 6px 12px;
  gap: 8px;
}

.pill-icon {
  font-size: 10px;
}

.pill-divider {
  color: #444;
  font-size: 12px;
}

.pill-bolt {
  color: #f2ce20;
  font-size: 14px;
}

.pill-count {
  color: #f2ce20;
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.small-logo {
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
}

#platformPage > h2 {
  margin-bottom: 0;
}

#platformPage > .muted {
  margin-bottom: 30px;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.platform {
  min-height: 145px;
  padding: 15px 8px;
  border: 1px solid #222;
  border-radius: 10px;
  background: #101010;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 14px;
  transition: border-color .2s, background .2s;
}

.platform:active, .platform:hover {
  border-color: var(--red);
  background: #1b1012;
}

.platform b {
  font-size: 12px;
}

.brand {
  display: grid;
  place-items: center;
  width: 65px;
  height: 65px;
  border-radius: 10px;
  font-size: 30px;
  font-weight: 900;
}

.blue { background: #064786; }
.deep-red { background: #f51e39; color: #fff; }
.orange { background: #ed5127; }
.cyan { background: #00a6b0; color: #071111; }
.yellow { background: #f2ce20; color: #111; }
.white { background: #f3f3f3; color: #111; }
.purple { background: #653d95; }

/* PACKAGE / ROUNDS CARDS */
.package-card {
  background: #111;
  border: 1px solid #252525;
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 20px;
}

.package-card.popular {
  background: #004d20;
  border-color: #008548;
}

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

.package-card h3 {
  font-size: 20px;
  color: #fff;
}

.package-desc {
  font-size: 13px;
  color: #aaa;
  margin-top: 2px;
}

.popular-badge {
  background: #fff;
  color: #111;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.value-badge {
  background: #333;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.package-price {
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 2px;
}

.payment-type {
  font-size: 12px;
  color: #aaa;
  margin-bottom: 16px;
}

.divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  margin-bottom: 16px;
}

.package-codes {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.code-rate {
  font-size: 12px;
  color: #ccc;
  margin-bottom: 16px;
}

.package-btn {
  margin-top: 0 !important;
  background: #00aa45 !important;
  color: #fff !important;
}

.package-card.popular .package-btn {
  background: #fff !important;
  color: #111 !important;
}

.plane {
  text-align: center;
  font-size: 100px;
  color: var(--red);
  transform: rotate(-12deg);
  margin: 30px 0 16px;
  text-shadow: 0 0 24px #f51e3940;
}

.home-title {
  color: var(--red);
  font-size: 25px;
  margin-bottom: 4px;
}

.home-title span {
  font-size: 18px;
}

#homePage > .muted {
  margin-bottom: 22px;
}

.multiplier-card {
  border: 1px solid #252525;
  border-radius: 15px;
  background: linear-gradient(150deg, #111, #070707);
  padding: 28px 10px 24px;
  text-align: center;
}

.status {
  color: #aaa;
  font-size: 11px;
  letter-spacing: 2px;
}

.multiplier {
  font-size: clamp(70px, 19vw, 105px);
  font-weight: 800;
  line-height: 1.25;
  margin: 12px 0;
  font-variant-numeric: tabular-nums;
}

.multiplier span {
  color: var(--red);
  font-size: .55em;
}

#resultNote {
  color: #aaa;
  font-size: 13px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 18px;
  margin-bottom: 18px;
}

.panel h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.panel > .muted {
  text-align: left;
  margin: 0 0 13px;
}

.panel input {
  background: #181818;
  border-color: #383838;
}

.panel .primary {
  margin-top: 14px;
}

footer {
  color: #777;
  text-align: center;
  font-size: 11px;
  padding: 20px 0;
}

/* MODAL OVERLAY STYLING */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  padding: 16px;
  overflow-y: auto;
}

.modal-box {
  width: 100%;
  max-width: 420px;
  background: #111;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  animation: modalAppear 0.2s ease;
  max-height: 90vh;
  overflow-y: auto;
}

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

.modal-header h3 {
  font-size: 18px;
  color: #fff;
}

.close-btn {
  background: transparent;
  border: 0;
  color: #888;
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
}

.close-btn:hover {
  color: var(--red);
}

.payment-details-box {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 14px;
  margin: 12px 0;
}

.pay-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid #252525;
}

.pay-row:last-child {
  border-bottom: 0;
}

.pay-row span {
  color: #aaa;
}

.payment-warning {
  background: rgba(245, 30, 57, 0.15);
  border: 1px solid rgba(245, 30, 57, 0.4);
  color: #ffb4be;
  font-size: 12px;
  padding: 10px;
  border-radius: 8px;
  line-height: 1.4;
  margin-bottom: 12px;
}

.timer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1a1a1a;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: #aaa;
}

.timer-row span:last-child {
  color: #51ff86;
  font-weight: bold;
}

@keyframes modalAppear {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* BLUE SCANNER BAR STYLING */
.scanner-container {
  width: 85%;
  height: 4px;
  background: #1a1a1a;
  margin: 16px auto 0;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.scanner-container.active {
  opacity: 1;
}

.scanner-bar {
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #00bfff, #1e90ff, #00bfff, transparent);
  position: absolute;
  top: 0;
  left: -40%;
  border-radius: 4px;
  box-shadow: 0 0 10px #00bfff, 0 0 20px #1e90ff;
  animation: none;
}

.scanner-container.active .scanner-bar {
  animation: scanAnimation 1.2s infinite linear;
}

@keyframes scanAnimation {
  0% { left: -40%; }
  100% { left: 100%; }
}

/* LOADING PLANE ANIMATION */
.loading-plane {
  font-size: 60px;
  color: var(--red);
  display: inline-block;
  animation: planePulse 1.2s infinite ease-in-out;
}

@keyframes planePulse {
  0%, 100% { transform: scale(1) rotate(-12deg); }
  50% { transform: scale(1.15) rotate(-5deg); }
}
