:root {
  color-scheme: dark;
  --bg: #07080d;
  --bg-soft: #0d1020;
  --neon-blue: #3fd6ff;
  --neon-green: #c7ff1a;
  --neon-purple: #7a5cff;
  --white: #fdfdfd;
  --muted: rgba(255, 255, 255, 0.6);
}

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

body {
  font-family: "Rajdhani", sans-serif;
  background: radial-gradient(circle at top, #101632 0%, #04050a 60%);
  color: var(--white);
  min-height: 100vh;
  padding: 0 clamp(20px, 6vw, 80px);
  overflow-x: hidden;
}

.background-glow {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(63, 214, 255, 0.25), transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(122, 92, 255, 0.2), transparent 35%),
    radial-gradient(circle at 70% 80%, rgba(199, 255, 26, 0.18), transparent 40%);
  z-index: -1;
  animation: pulseGlow 6s ease-in-out infinite;
}

.site-header {
  position: relative;
  top: 32px;
  left: clamp(20px, 6vw, 80px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: "Luckiest Guy", cursive;
  font-size: clamp(28px, 5vw, 44px);
  letter-spacing: 1px;
  position: relative;
}

.logo-image {
  width: clamp(120px, 18vw, 220px); 
  height: auto;
  padding: 6px;
  display: block;
  margin: 0 auto; /* Centers the image inside the logo div */

  /* 1. Create the shine using a mask gradient */
  -webkit-mask-image: linear-gradient(
    -75deg, 
    rgba(0,0,0,1) 30%, 
    rgba(0,0,0,0.4) 50%, 
    rgba(0,0,0,1) 70%
  );
  mask-image: linear-gradient(
    -75deg, 
    rgba(0,0,0,1) 30%, 
    rgba(0,0,0,0.4) 50%, 
    rgba(0,0,0,1) 70%
  );

  /* 2. Make the mask much larger than the image so it can slide */
  -webkit-mask-size: 300%;
  mask-size: 300%;
  
  /* 3. Run the animation */
  animation: shine-sweep 3s infinite;
}

/* 4. Move the mask position to create the sweep effect */
@keyframes shine-sweep {
  0% {
    -webkit-mask-position: 150%;
    mask-position: 150%;
  }
  100% {
    -webkit-mask-position: -50%;
    mask-position: -50%;
  }
}


.hero {
  /* Change min-height to account for the header */
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 0; /* Ensures space on small screens */
}


.hero-copy {
  text-align: center;
}

.hero-copy h1 {
  font-family: "Luckiest Guy", cursive;
  font-size: clamp(32px, 8vw, 90px); /* Lowered the min-size slightly */
  line-height: 1.1; /* Increased slightly from 0.95 for better readability */
  padding: 0 10px; /* Prevents text hitting screen edges */
}

.redeem-card {
  background: linear-gradient(135deg, rgba(19, 22, 40, 0.95), rgba(9, 11, 20, 0.95));
  padding: clamp(24px, 4vw, 40px);
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 50px rgba(63, 214, 255, 0.18);
  position: relative;
  overflow: hidden;
  justify-self: center;
  width: min(100%, 520px);
}

.redeem-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(63, 214, 255, 0.15), transparent);
  transform: translateX(-100%);
  animation: shimmer 6s ease-in-out infinite;
}

.redeem-form {
  display: grid;
  gap: 18px;
}

.status-area {
  margin-top: 16px;
  min-height: 24px;
  font-size: 1rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.status-area.hidden {
  display: none;
}

.status-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--neon-blue);
  animation: spin 0.9s linear infinite;
}

.redeem-form input {
  background: #0b0f1f;
  border: 2px solid transparent;
  border-radius: 16px;
  padding: 20px 22px;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  color: var(--white);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.redeem-form input:focus {
  outline: none;
  border-color: var(--neon-green);
  box-shadow: 0 0 0 4px rgba(199, 255, 26, 0.2);
}

.redeem-form button {
  position: relative;
  padding: 20px 24px;
  border-radius: 20px;
  border: none;
  font-weight: 700;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  color: #050506;
  cursor: pointer;
  background: linear-gradient(120deg, var(--neon-green), var(--neon-blue));
  overflow: hidden;
  transition: transform 0.2s ease;
}

.redeem-form button:hover {
  transform: translateY(-2px) scale(1.01);
}

.redeem-form button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.btn-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.6), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.redeem-form button:hover .btn-glow {
  opacity: 0.6;
}

.result {
  margin-top: 18px;
  min-height: 72px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  font-size: 1.05rem;
  color: var(--white);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.result.success {
  border-color: rgba(199, 255, 26, 0.4);
  box-shadow: 0 0 25px rgba(199, 255, 26, 0.2);
}

.result.warning {
  border-color: rgba(255, 186, 71, 0.4);
  box-shadow: 0 0 25px rgba(255, 186, 71, 0.2);
}

.result.error {
  border-color: rgba(255, 82, 82, 0.4);
  box-shadow: 0 0 25px rgba(255, 82, 82, 0.2);
}

.result.info {
  border-color: rgba(63, 214, 255, 0.4);
  box-shadow: 0 0 25px rgba(63, 214, 255, 0.2);
}

.result-message {
  text-align: center;
  font-size: 1.05rem;
}

.code-box {
  background: rgba(15, 20, 40, 0.9);
  border: 1px solid rgba(199, 255, 26, 0.4);
  border-radius: 12px;
  padding: 14px 16px;
  font-family: "Rajdhani", sans-serif;
  font-size: 1.3rem;
  letter-spacing: 1px;
  text-align: center;
  color: var(--neon-green);
  word-break: break-all;
}

.success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.copy-btn,
.try-again {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 16px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
  margin-top:5px;
}

.copy-btn:hover,
.try-again:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.45);
}

.copy-status {
  font-size: 0.95rem;
  color: var(--muted);
  text-align: center;
}

/* Note: "Try another" button removed from index.html (kept styles harmlessly in case it's re-added). */

@keyframes pulseGlow {
  0%,
  100% {
    opacity: 0.8;
  }
  50% {
    opacity: 0.5;
  }
}

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

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 680px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
