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

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@700;800;900&family=Nunito+Sans:wght@400;600&display=swap');

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
  font-family: 'Nunito Sans', 'Segoe UI', Arial, sans-serif;
  color: #e8e8e8;
  padding: 1.5rem 1rem;
  overflow-x: hidden;
}

/* Floating stars background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 15% 20%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(2px 2px at 45% 10%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 30%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(2px 2px at 85% 15%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 30% 55%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(2px 2px at 60% 70%, rgba(255,255,255,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 80%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(2px 2px at 10% 85%, rgba(255,255,255,0.3) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.page-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 540px;
}

/* ── Header ── */
.site-header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.robux-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #ff4757, #c0392b);
  padding: 0.45rem 1.1rem;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(255, 71, 87, 0.5);
  margin-bottom: 0.5rem;
}

.robux-logo svg { width: 28px; height: 28px; }

.robux-logo span {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.15rem;
  color: #fff;
  letter-spacing: 1px;
}

.site-header h1 {
  font-family: 'Nunito', sans-serif;
  font-size: 1.9rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 12px rgba(255,255,255,0.15);
  line-height: 1.2;
}

.site-header h1 span {
  background: linear-gradient(90deg, #ffd32a, #ff9f43);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Main card ── */
.card {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  padding: 2rem 1.75rem 2.25rem;
  box-shadow: 0 16px 48px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.1);
}

/* ── Character + amount banner ── */
.hero-banner {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  background: linear-gradient(135deg, rgba(255,71,87,0.18), rgba(255,159,67,0.12));
  border: 1.5px solid rgba(255,159,67,0.3);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.roblox-character {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  animation: float 3s ease-in-out infinite;
}

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

.hero-text p {
  font-size: 0.85rem;
  color: #adb5bd;
  margin-bottom: 0.2rem;
}

.hero-text .amount {
  font-family: 'Nunito', sans-serif;
  font-size: 1.55rem;
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.hero-text .amount .r-icon {
  display: inline-flex;
  background: linear-gradient(135deg, #ffd32a, #ff9f43);
  border-radius: 6px;
  padding: 2px 5px;
  font-size: 1rem;
  color: #1a1a2e;
  font-weight: 900;
}

/* ── Instruction block ── */
.instruction {
  background: rgba(255,255,255,0.04);
  border-left: 3px solid #ff9f43;
  border-radius: 0 10px 10px 0;
  padding: 0.85rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.65;
  color: #ccc;
}

.instruction p + p { margin-top: 0.5rem; }

.highlight {
  color: #ff9f43;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.15em;
  background: rgba(255,159,67,0.12);
  padding: 1px 6px;
  border-radius: 5px;
}

/* ── Form ── */
label {
  display: block;
  margin-bottom: 0.3rem;
  margin-top: 0.9rem;
  font-size: 0.82rem;
  color: #adb5bd;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

input[type="text"] {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
}

input[type="text"]::placeholder { color: rgba(255,255,255,0.25); }

input[type="text"]:focus {
  border-color: #ff9f43;
  background: rgba(255,159,67,0.07);
  box-shadow: 0 0 0 3px rgba(255,159,67,0.15);
}

input[type="text"].input-error {
  border-color: #ff4757;
  box-shadow: 0 0 0 3px rgba(255,71,87,0.15);
}

.field-error {
  display: block;
  color: #ff6b81;
  font-size: 0.78rem;
  min-height: 1rem;
  margin-top: 0.3rem;
}

/* ── Submit button ── */
.btn-primary {
  margin-top: 1.4rem;
  width: 100%;
  height: 3.2rem;
  padding: 0 1rem;
  background: linear-gradient(135deg, #ff4757 0%, #c0392b 100%);
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(255,71,87,0.45);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255,71,87,0.55);
}

.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

/* ── Success overlay ── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,10,30,0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
}

.overlay[hidden] { display: none; }

.overlay-card {
  background: linear-gradient(160deg, #1a1a3e, #0f3460);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  animation: popIn 0.35s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes popIn {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.success-anim {
  font-size: 4rem;
  margin-bottom: 0.75rem;
  animation: bounce 0.6s ease 0.3s both;
}

@keyframes bounce {
  0%   { transform: scale(0); }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.overlay-card h2 {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  color: #fff;
  font-size: 1.6rem;
  margin-bottom: 0.6rem;
}

.overlay-card p {
  color: #adb5bd;
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

.btn-outline {
  display: inline-block;
  padding: 0.7rem 1.75rem;
  background: linear-gradient(135deg, #ffd32a, #ff9f43);
  color: #1a1a2e;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 0.95rem;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(255,211,42,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-outline:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,211,42,0.5);
}

/* ── Decorative bottom pills ── */
.tags {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50px;
  padding: 0.2rem 0.7rem;
  letter-spacing: 0.3px;
  transition: color 0.2s, border-color 0.2s;
  cursor: default;
}

@media (hover: hover) {
  .tag:hover {
    color: rgba(255,255,255,0.95);
    border-color: rgba(255,255,255,0.55);
  }
}

.tag.tapped {
  color: rgba(255,255,255,0.95);
  border-color: rgba(255,255,255,0.55);
}

.tag.fading {
  color: rgba(255,255,255,0.45);
  border-color: rgba(255,255,255,0.12);
  transition: color 0.6s ease, border-color 0.6s ease;
}

/* ── Loyalty progress bar animation ── */
@keyframes fillBar {
  from { width: 0%; }
}
.loyalty-bar { animation: fillBar 0.8s ease forwards; }
