/* Enhanced Modern CSS for Redeem Page - Preserving Original Functionality */

/* DISABLE ALL ANIMATIONS AND TRANSITIONS TO PREVENT FLICKERING */
*:not(.loading-spinner), *:not(.loading-spinner)::before, *:not(.loading-spinner)::after {
  animation: none !important;
  transition: none !important;
}

/* ALLOW ONLY LOADING SPINNER ANIMATION - NO FLICKERING */
.loading-spinner {
  animation: spin 1s linear infinite !important;
  /* No transform override - let animation work */
}

.spinner, .processing-spinner, .loader-spinner {
  animation: none !important; /* Disable other spinners to prevent flickering */
  transform: none !important;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* URL Validation Styles */
.url-valid {
  border-color: #22c55e !important;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2) !important;
}

.url-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2) !important;
}

.url-error {
  color: #ef4444;
  font-size: 12px;
  margin-top: 4px;
  display: block;
}

.pending-info {
  color: #f59e0b;
  font-size: 14px;
  margin: 8px 0;
  padding: 8px;
  background: rgba(245, 158, 11, 0.1);
  border-radius: 4px;
  border-left: 3px solid #f59e0b;
}

/* CSS Variables - Light Mode (Default) */
:root {
  --primary-color: #8b5cf6;
  --primary-dark: #7c3aed;
  --primary-light: #c4b5fd;
  --secondary-color: #06b6d4;
  --accent-color: #f97316;
  --success-color: #22c55e;
  --error-color: #ef4444;
  --warning-color: #f59e0b;
  
  --surface-color: #ffffff;
  --surface-variant: #f8fafc;
  --background-color: #f0f9ff;
  --on-surface: #0f172a;
  --on-surface-variant: #475569;
  
  --border-radius: 16px;
  --border-radius-small: 8px;
  --shadow-small: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-large: 0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-extra: 0 20px 40px rgba(0, 0, 0, 0.1);
  
  --transition: none;
  --transition-fast: none;
}

/* Ensure light mode is properly applied by default */
html {
  color-scheme: light;
}

/* Dark Mode Variables - Only applied when data-theme="dark" */
[data-theme="dark"] {
  --surface-color: #1e293b;
  --surface-variant: #334155;
  --background-color: #0f172a;
  --on-surface: #f1f5f9;
  --on-surface-variant: #cbd5e1;
  
  --shadow-small: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-large: 0 10px 25px rgba(0, 0, 0, 0.3);
  --shadow-extra: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Explicit Light Mode Styles - Ensure they override any dark defaults */
[data-theme="light"] {
  --surface-color: #ffffff !important;
  --surface-variant: #f8fafc !important;
  --background-color: #f0f9ff !important;
  --on-surface: #0f172a !important;
  --on-surface-variant: #475569 !important;
  
  --shadow-small: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
  --shadow-large: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
  --shadow-extra: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
}

/* Force light mode styles with higher specificity */
html[data-theme="light"] body {
  background: #f0f9ff !important;
  color: #0f172a !important;
}

html[data-theme="light"] .form-container {
  background: #ffffff !important;
  color: #0f172a !important;
}

html[data-theme="light"] .form-input {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}

html[data-theme="light"] .form-header h2 {
  color: #0f172a !important;
}

html[data-theme="light"] .form-header p {
  color: #475569 !important;
}

html[data-theme="light"] .form-label {
  color: #0f172a !important;
}





/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--background-color);
  color: var(--on-surface);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* Mobile-first responsive container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Main content layout */
main {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 3rem;
  }
}

/* Animated Background */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 50%, #f97316 100%);
  transition: all 0.3s ease;
}

/* Dark mode background */
[data-theme="dark"] .animated-bg {
  background: linear-gradient(135deg, #1e1b4b 0%, #0c4a6e 50%, #7c2d12 100%);
}

.floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.15);
  backdrop-filter: blur(10px);
  animation: float 10s ease-in-out infinite;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.shape-1 {
  width: 80px;
  height: 80px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 120px;
  height: 120px;
  top: 60%;
  right: 15%;
  animation-delay: 2s;
}

.shape-3 {
  width: 60px;
  height: 60px;
  bottom: 20%;
  left: 20%;
  animation-delay: 4s;
}

.shape-4 {
  width: 100px;
  height: 100px;
  top: 30%;
  right: 40%;
  animation-delay: 6s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 1;
  }
}

/* Enhanced Animated Background Elements */
.shape-5 {
  width: 100px;
  height: 100px;
  top: 40%;
  left: 5%;
  animation-delay: 4s;
}

.shape-6 {
  width: 40px;
  height: 40px;
  bottom: 30%;
  right: 25%;
  animation-delay: 5s;
}

/* Particle System */
.particles {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: particle-float 8s linear infinite;
}

.particle-1 {
  top: 10%;
  left: 20%;
  animation-delay: 0s;
  animation-duration: 12s;
}

.particle-2 {
  top: 30%;
  left: 80%;
  animation-delay: 1s;
  animation-duration: 15s;
}

.particle-3 {
  top: 60%;
  left: 10%;
  animation-delay: 2s;
  animation-duration: 10s;
}

.particle-4 {
  top: 80%;
  left: 70%;
  animation-delay: 3s;
  animation-duration: 18s;
}

.particle-5 {
  top: 20%;
  left: 60%;
  animation-delay: 4s;
  animation-duration: 14s;
}

.particle-6 {
  top: 50%;
  left: 90%;
  animation-delay: 5s;
  animation-duration: 16s;
}

.particle-7 {
  top: 70%;
  left: 30%;
  animation-delay: 6s;
  animation-duration: 11s;
}

.particle-8 {
  top: 90%;
  left: 50%;
  animation-delay: 7s;
  animation-duration: 13s;
}

/* Gradient Orbs */
.gradient-orbs {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, rgba(6, 182, 212, 0.1) 50%, transparent 100%);
  animation: orb-pulse 6s ease-in-out infinite;
  filter: blur(1px);
}

.orb-1 {
  width: 200px;
  height: 200px;
  top: 15%;
  right: 10%;
  animation-delay: 0s;
}

.orb-2 {
  width: 150px;
  height: 150px;
  bottom: 20%;
  left: 10%;
  animation-delay: 2s;
}

.orb-3 {
  width: 120px;
  height: 120px;
  top: 60%;
  left: 60%;
  animation-delay: 4s;
}

/* Animated Grid */
.animated-grid {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.grid-line {
  position: absolute;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
  animation: grid-scan 8s linear infinite;
}

.grid-line-1 {
  width: 100%;
  height: 1px;
  top: 25%;
  animation-delay: 0s;
}

.grid-line-2 {
  width: 100%;
  height: 1px;
  top: 50%;
  animation-delay: 2s;
}

.grid-line-3 {
  width: 100%;
  height: 1px;
  top: 75%;
  animation-delay: 4s;
}

.grid-line-4 {
  width: 1px;
  height: 100%;
  left: 50%;
  vertical-align: middle;
  animation-delay: 6s;
}

/* Header */
.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.3s ease;
}

/* Dark mode header */
[data-theme="dark"] .header {
  background: rgba(30, 41, 59, 0.95);
  border-bottom: 1px solid rgba(51, 65, 85, 0.3);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.header-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.logo .material-symbols-outlined {
  font-size: 2rem;
  color: var(--primary-color);
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-subtitle {
  color: var(--on-surface-variant);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Theme Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.1);
  backdrop-filter: blur(10px);
  color: var(--primary-color);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.theme-toggle-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.theme-toggle-btn:active {
  transform: scale(0.95);
}

.theme-toggle-btn .material-symbols-outlined {
  font-size: 24px;
}

.theme-toggle-btn .dark-icon {
  display: none;
}

.theme-toggle-btn.dark .light-icon {
  display: none;
}

.theme-toggle-btn.dark .dark-icon {
  display: inline;
}

/* Main Container */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Hero Section */
.hero-section {
  text-align: center;
  margin: 2rem 0 1rem;
  padding: 1.5rem 0;
}

@media (min-width: 768px) {
  .hero-section {
    margin: 3rem 0 1.5rem;
    padding: 2rem 0;
  }
}

.hero-title {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .hero-title {
    margin-bottom: 1.5rem;
    padding: 0;
  }
}

.title-line {
  display: block;
}

.title-line.highlight {
  background: linear-gradient(135deg, var(--secondary-color), var(--accent-color), var(--primary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1rem;
  color: var(--on-surface-variant);
  max-width: 600px;
  margin: 0 auto;
  padding: 0 1rem;
  line-height: 1.5;
}

@media (min-width: 768px) {
  .hero-description {
    font-size: 1.2rem;
    padding: 0;
  }
  
  /* Mobile hero optimization */
  .hero-section {
    margin-bottom: 1rem;
  }
  
  .hero-title {
    font-size: 2rem;
    margin-bottom: 0.75rem;
  }
  
  .hero-description {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  
  /* Mobile header optimization */
  .header-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .header-left {
    order: 1;
  }
  
  .theme-toggle {
    order: 2;
    margin-top: 0.5rem;
  }
  
  .theme-toggle-btn {
    width: 44px;
    height: 44px;
  }
  
  .theme-toggle-btn .material-symbols-outlined {
    font-size: 20px;
  }
}

/* Creative Modern Slideshow */
.slides-section {
  margin: 1rem 0 2rem 0;
  padding: 1rem 0;
  position: relative;
  height: 280px; /* Fixed height to prevent overlay */
}

.slides-container {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 3rem 2rem;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
  height: 100%; /* Take full height of parent */
  transition: all 0.3s ease;
}

/* Dark mode slideshow */
[data-theme="dark"] .slides-container {
  background: rgba(30, 41, 59, 0.15);
  border: 1px solid rgba(51, 65, 85, 0.3);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(51, 65, 85, 0.1),
    inset 0 1px 0 rgba(51, 65, 85, 0.2);
}

.slides-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.slide-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 400px;
}

/* Slide Icon */
.slide-icon-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
}

.slide-icon {
  font-size: 4rem;
  color: var(--primary-color);
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 4px 8px rgba(139, 92, 246, 0.3));
}

.icon-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  border: 2px solid rgba(139, 92, 246, 0.3);
  border-radius: 50%;
  animation: ripple-pulse 3s ease-in-out infinite;
}

@keyframes ripple-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 1;
    border-width: 2px;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.5;
    border-width: 1px;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.6);
    opacity: 0;
    border-width: 0px;
  }
}

/* Slide Text */
.slide-text {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--on-surface);
  margin-bottom: 1.5rem;
  line-height: 1.4;
  background: linear-gradient(135deg, var(--on-surface), var(--on-surface-variant));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Slide Decoration */
.slide-decoration {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.decoration-line {
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
  border-radius: 1px;
  animation: line-glow 2s ease-in-out infinite;
}

.decoration-dot {
  width: 8px;
  height: 8px;
  background: var(--primary-color);
  border-radius: 50%;
  animation: dot-bounce 1.5s ease-in-out infinite;
}

@keyframes line-glow {
  0%, 100% {
    opacity: 0.3;
    transform: scaleX(0.8);
  }
  50% {
    opacity: 1;
    transform: scaleX(1.2);
  }
}

@keyframes dot-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  /* Keep slideshow first but make form more prominent */
  .slides-section {
    height: 180px; /* Much smaller height on mobile */
    margin: 1rem 0;
    order: 1; /* Keep slideshow first */
  }
  
  .form-section {
    order: 2; /* Form appears after slideshow */
    margin-bottom: 1rem;
  }
  
  .slides-container {
    margin: 0 1rem;
    padding: 1.5rem 1rem;
    border-radius: 16px;
  }
  
  .slide-icon {
    font-size: 2.5rem;
  }
  
  .slide-text {
    font-size: 1rem;
  }
  
  .icon-ripple {
    width: 60px;
    height: 60px;
  }
  
  /* Make form more prominent on mobile */
  .form-container {
    margin: 0 0.5rem;
    padding: 1.5rem;
  }
  
  .form-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
  
  .form-header p {
    font-size: 0.9rem;
  }
  
  .redeem-form {
    gap: 1.25rem;
  }
  
  .form-input {
    padding: 1rem 1.25rem;
    font-size: 16px; /* Prevent zoom on iOS */
    min-height: 56px; /* Larger touch-friendly size */
    -webkit-tap-highlight-color: transparent;
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.1);
    transition: all 0.3s ease;
  }
  
  .form-input:focus {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.2);
    transform: translateY(-2px);
  }
  
  .form-label {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--on-surface);
  }
  
  .form-group {
    margin-bottom: 1.5rem;
  }
  
  /* Enhanced button styling for mobile */
  .redeem-button {
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
    transform: translateY(0);
    transition: all 0.3s ease;
  }
  
  .redeem-button:hover,
  .redeem-button:active {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(139, 92, 246, 0.4);
  }
  
  .redeem-button {
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }
  
  /* Enhance form section on mobile while keeping slideshow first */
  .form-section {
    background: var(--surface-color);
    backdrop-filter: blur(25px);
    border-radius: 24px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(139, 92, 246, 0.2);
    margin: 0 0.5rem 1.5rem 0.5rem;
    position: relative;
    z-index: 10;
    transform: translateY(-10px); /* Slight lift effect */
  }
  
  /* Make form header more prominent on mobile */
  .form-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem 0;
  }
  
  .form-header .form-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    filter: drop-shadow(0 4px 8px rgba(139, 92, 246, 0.3));
  }
  
  .form-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  
  .form-header p {
    font-size: 1rem;
    color: var(--on-surface-variant);
    font-weight: 500;
  }
  
  /* Make slideshow subtle but keep it first on mobile */
  .slides-section {
    opacity: 0.9;
    margin-bottom: 1rem;
  }
  
  .slides-container {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  /* Dark mode mobile slideshow */
  [data-theme="dark"] .slides-container {
    background: rgba(30, 41, 59, 0.15);
    border: 1px solid rgba(51, 65, 85, 0.3);
  }
  
  /* Dark mode mobile form section */
  [data-theme="dark"] .form-section {
    background: var(--surface-color);
    border: 2px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  }
  
  /* Add subtle animation to slideshow on mobile */
  .slide.active {
    animation: mobile-slide-fade 0.6s ease-out;
  }
  
  @keyframes mobile-slide-fade {
    from {
      opacity: 0;
      transform: translateY(20px) scale(0.95);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
  
  .file-ready-notification {
    right: 16px;
    left: 16px;
    min-width: auto;
    transform: translateY(-100%);
  }
  
  .file-ready-notification.show {
    transform: translateY(0);
  }
  
  /* Additional mobile enhancements */
  .container {
    padding: 0 0.5rem;
  }
  
  /* Ensure smooth scrolling on mobile */
  html {
    scroll-behavior: smooth;
  }
  
  /* Enhanced form focus state for mobile auto-scroll */
  .form-section:target,
  .form-section.scroll-highlight {
    animation: form-highlight 2s ease-out;
  }
  
  @keyframes form-highlight {
    0% {
      transform: translateY(-10px) scale(1);
      box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    }
    50% {
      transform: translateY(-15px) scale(1.02);
      box-shadow: 0 25px 60px rgba(139, 92, 246, 0.25);
    }
    100% {
      transform: translateY(-10px) scale(1);
      box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    }
  }
  
  /* Enhanced input focus for mobile */
  .form-input:focus {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.2), 0 0 0 3px rgba(139, 92, 246, 0.1);
    transform: translateY(-2px);
  }
  
  /* Optimize touch interactions */
  .form-input,
  .redeem-button {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
}

/* File Ready Notifications */
.file-ready-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.3);
  padding: 20px;
  min-width: 320px;
  max-width: 400px;
  z-index: 10000;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.file-ready-notification.show {
  transform: translateX(0);
}

.notification-content {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.notification-icon {
  font-size: 24px;
  color: rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
}

.notification-text {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 4px;
  color: white;
}

.notification-message {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
}

.notification-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.notification-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

/* Form Section */
.form-section {
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .form-section {
    margin-bottom: 3rem;
    padding: 0;
  }
}

.form-container {
  background: var(--surface-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-extra);
  padding: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .form-container {
    padding: 3rem;
  }
}

.form-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
}

.form-header {
  text-align: center;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .form-header {
    margin-bottom: 2.5rem;
  }
}

.form-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: block;
}

@media (min-width: 768px) {
  .form-icon {
    font-size: 3rem;
  }
}

.form-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--on-surface);
}

@media (min-width: 768px) {
  .form-header h2 {
    font-size: 1.8rem;
  }
}

.form-header p {
  color: var(--on-surface-variant);
  font-size: 1rem;
}

/* Form Elements */
.redeem-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .redeem-form {
    gap: 2rem;
  }
}

.form-group {
  position: relative;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--on-surface);
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

@media (min-width: 768px) {
  .form-label {
    font-size: 0.95rem;
  }
}

.form-label .material-symbols-outlined {
  font-size: 1.2rem;
  color: var(--primary-color);
}

.input-wrapper {
  position: relative;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: var(--border-radius-small);
  font-size: 16px; /* Prevents zoom on iOS */
  background: var(--surface-color);
  color: var(--on-surface);
  transition: var(--transition);
  font-family: inherit;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

@media (min-width: 768px) {
  .form-input {
    padding: 1rem 1.25rem;
    font-size: 1rem;
  }
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--surface-color);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-input::placeholder {
  color: var(--on-surface-variant);
  opacity: 0.7;
}

.input-focus-border {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
}

.input-wrapper.focused .input-focus-border {
  width: 100%;
}

.input-wrapper.has-value .form-input {
  border-color: var(--success-color);
}

/* URLs Panel (Preserving Original Functionality) */
.urls-panel {
  background: var(--surface-variant);
  border-radius: var(--border-radius-small);
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
  margin-top: 1rem;
  display: none; /* Hidden by default, shown when needed */
}

.urls-panel:not(.hidden) {
  display: block;
}

.urls-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: var(--on-surface);
}

.urls-header .material-symbols-outlined {
  color: var(--secondary-color);
}

.muted {
  color: var(--on-surface-variant);
  font-size: 0.9em;
}

/* URL Fields Styling */
.urls-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.urls-fields label {
  font-weight: 600;
  color: var(--on-surface);
  margin-bottom: 0.5rem;
  display: block;
}

.urls-fields input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: var(--border-radius-small);
  font-size: 1rem;
  background: var(--surface-color);
  color: var(--on-surface);
  transition: var(--transition);
  font-family: inherit;
}

.urls-fields input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.urls-fields input::placeholder {
  color: var(--on-surface-variant);
  opacity: 0.7;
}

/* URL Chip and Lock Styling */
.url-chip {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 8px;
  background: var(--surface-variant);
  color: var(--on-surface);
  margin-right: 8px;
}

.lock-emoji {
  user-select: none;
  font-size: 1.2rem;
}

.url-saved {
  font-size: 12px;
  color: var(--on-surface-variant);
  margin: 6px 0;
  font-style: italic;
}

/* Button */
.redeem-button {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
  color: white;
  border: none;
  border-radius: var(--border-radius-small);
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
  min-height: 52px;
  width: 100%;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (min-width: 768px) {
  .redeem-button {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    min-height: 56px;
    width: auto;
  }
}

.redeem-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-large);
}

.redeem-button:active {
  transform: translateY(0);
}

.redeem-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.redeem-button:hover::before {
  left: 100%;
}

.button-icon {
  font-size: 1.2rem;
}

.redeem-button.is-loading {
  pointer-events: none;
  opacity: 0.8;
}

.redeem-button.is-loading .button-text {
  opacity: 0;
}

.redeem-button.is-loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Results Section - Simple Mobile-First Design */
.results-section {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  margin: 0.5rem;
  width: calc(100% - 1rem);
  max-width: 100%;
  border: 1px solid #e5e7eb;
  box-sizing: border-box;
  overflow: hidden;
  /* No animations or transitions to prevent flickering */
}

/* Mobile - Simple Responsive */
@media (max-width: 768px) {
  .results-section {
    margin: 0.25rem;
    padding: 0.75rem;
    width: calc(100% - 0.5rem);
  }
  
  .success-celebration {
    padding: 0.5rem;
    font-size: 0.8rem;
  }
  
  .item-card {
    padding: 0.5rem;
    font-size: 0.8rem;
  }
  
  .download-btn {
    padding: 6px 10px;
    font-size: 11px;
    min-width: 90px;
    max-width: 140px;
  }
}

@media (max-width: 480px) {
  .results-section {
    margin: 0.125rem;
    padding: 0.5rem;
    width: calc(100% - 0.25rem);
  }
  
  .success-celebration {
    padding: 0.5rem;
    font-size: 0.75rem;
  }
  
  .item-card {
    padding: 0.5rem;
    font-size: 0.75rem;
  }
  
  .download-btn {
    padding: 5px 8px;
    font-size: 10px;
    min-width: 80px;
    max-width: 120px;
  }
}

.results-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #8b5cf6, #06b6d4, #10b981, #f59e0b);
  background-size: 300% 100%;
  animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* @keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
} */

/* Success Header - Simple */
.success-celebration {
  background: #10b981;
  color: white;
  padding: 0.75rem;
  text-align: center;
  border-radius: 6px 6px 0 0;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.success-celebration::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

/* Mobile Responsive Success Header */
@media (max-width: 768px) {
  .success-celebration {
    padding: 2rem 1rem;
    border-radius: 16px 16px 0 0;
  }
  
  .celebration-icon {
    font-size: 3rem;
  }
  
  .success-title {
    font-size: 1.75rem;
    line-height: 1.2;
  }
  
  .success-subtitle {
    font-size: 0.9rem;
    line-height: 1.3;
  }
  
  .order-id-highlight {
    display: inline-block;
    word-break: break-all;
  }
}

@media (max-width: 480px) {
  .success-celebration {
    padding: 1.5rem 0.75rem;
    border-radius: 12px 12px 0 0;
  }
  
  .celebration-icon {
    font-size: 2.5rem;
  }
  
  .success-title {
    font-size: 1.5rem;
    line-height: 1.2;
  }
  
  .success-subtitle {
    font-size: 0.85rem;
    line-height: 1.3;
    padding: 0 0.5rem;
  }
  
  .order-id-highlight {
    display: block;
    word-break: break-all;
    margin-top: 0.25rem;
  }
}

.success-celebration::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.celebration-icon {
  font-size: 5rem;
  margin-bottom: 1.5rem;
  animation: celebrationFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  position: relative;
  z-index: 1;
}

@keyframes celebrationFloat {
  0%, 100% { 
    transform: translateY(0) rotate(0deg) scale(1); 
  }
  25% { 
    transform: translateY(-8px) rotate(2deg) scale(1.05); 
  }
  50% { 
    transform: translateY(-12px) rotate(0deg) scale(1.1); 
  }
  75% { 
    transform: translateY(-8px) rotate(-2deg) scale(1.05); 
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

.success-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  text-shadow: 0 4px 8px rgba(0,0,0,0.3);
  background: linear-gradient(135deg, #ffffff, #f0fdf4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
  animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
  from { 
    text-shadow: 0 4px 8px rgba(0,0,0,0.3), 0 0 20px rgba(255,255,255,0.1); 
  }
  to { 
    text-shadow: 0 4px 8px rgba(0,0,0,0.3), 0 0 30px rgba(255,255,255,0.2); 
  }
}

.success-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.order-id-highlight {
  background: rgba(255,255,255,0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.success-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.stat-item {
  text-align: center;
  background: rgba(255,255,255,0.2);
  padding: 1.5rem 2rem;
  border-radius: 20px;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.3);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.stat-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.6s ease;
}

.stat-item:hover::before {
  left: 100%;
}

.stat-item:hover {
  transform: translateY(-5px);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Content Sections - Simple */
.content-section {
  margin-bottom: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.content-section:last-child {
  border-bottom: none;
  border-radius: 0 0 24px 24px;
}

/* Mobile Responsive Content Sections */
@media (max-width: 768px) {
  .content-section {
    padding: 1rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  .section-header {
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  .section-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    flex-shrink: 0;
  }
  
  .section-title {
    font-size: 1.1rem;
    flex: 1;
    min-width: 0;
  }
  
  .section-count {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .content-section {
    padding: 0.75rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  .section-header {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
  }
  
  .section-icon {
    width: 35px;
    height: 35px;
    font-size: 1rem;
    flex-shrink: 0;
  }
  
  .section-title {
    font-size: 1rem;
    flex: 1;
    min-width: 0;
  }
  
  .section-count {
    font-size: 0.75rem;
  }
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(139, 92, 246, 0.1);
  width: 100%;
  box-sizing: border-box;
}

/* Mobile Responsive Section Headers */
@media (max-width: 768px) {
  .section-header {
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
  }
  
  .section-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
  
  .section-title {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .section-header {
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
  }
  
  .section-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .section-title {
    font-size: 1.1rem;
  }
  
  .section-count {
    font-size: 0.8rem;
  }
}

.section-icon {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  box-shadow: 
    0 8px 25px rgba(0,0,0,0.15),
    0 4px 10px rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,0.2);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.section-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.content-section:hover .section-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 
    0 12px 30px rgba(0,0,0,0.2),
    0 6px 15px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

.content-section:hover .section-icon::before {
  opacity: 1;
}

.section-info {
  flex: 1;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--on-surface);
  margin: 0;
  text-transform: capitalize;
  background: linear-gradient(135deg, var(--on-surface), #6b7280);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all 0.3s ease;
}

.content-section:hover .section-title {
  background: linear-gradient(135deg, #8b5cf6, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-count {
  color: var(--on-surface-variant);
  margin: 0.25rem 0 0 0;
  font-size: 0.9rem;
}

/* Items Grid */
.items-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
  margin: 0;
  padding: 0;
  flex: 1;
  box-sizing: border-box;
}

/* Staggered animation for items */
.item-card {
  animation: itemSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.item-card:nth-child(1) { animation-delay: 0.1s; }
.item-card:nth-child(2) { animation-delay: 0.2s; }
.item-card:nth-child(3) { animation-delay: 0.3s; }
.item-card:nth-child(4) { animation-delay: 0.4s; }
.item-card:nth-child(5) { animation-delay: 0.5s; }
.item-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes itemSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Mobile Responsive Grid */
@media (max-width: 768px) {
  .items-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .items-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

/* Item Cards - Simple */
.item-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.item-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.02), rgba(16, 185, 129, 0.02));
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

/* Mobile Responsive Item Cards */
@media (max-width: 768px) {
  .item-card {
    padding: 1rem;
    border-radius: 12px;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
  }
  
  .item-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  .item-icon {
    width: 30px;
    height: 30px;
    font-size: 1.2rem;
    flex-shrink: 0;
  }
  
  .item-title {
    font-size: 0.9rem;
    flex: 1;
    min-width: 0;
    word-break: break-word;
  }
  
  .status-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  .item-content {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    margin-top: 0.75rem;
    box-sizing: border-box;
  }
  
  .submitted-info {
    font-size: 0.8rem;
    padding: 0.5rem;
    word-break: break-all;
  }
}

@media (max-width: 480px) {
  .item-card {
    padding: 0.75rem;
    border-radius: 10px;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
  }
  
  .item-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  .item-icon {
    width: 25px;
    height: 25px;
    font-size: 1rem;
    flex-shrink: 0;
  }
  
  .item-title {
    font-size: 0.85rem;
    flex: 1;
    min-width: 0;
    word-break: break-word;
  }
  
  .status-badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  .item-content {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    margin-top: 0.5rem;
    box-sizing: border-box;
  }
  
  .submitted-info {
    font-size: 0.75rem;
    padding: 0.4rem;
    word-break: break-all;
  }
  
  .download-btn {
    padding: 6px 12px;
    font-size: 12px;
    min-height: 32px;
    width: auto;
    min-width: 100px;
    max-width: 160px;
    box-sizing: border-box;
  }
}

.item-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.item-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.12),
    0 8px 16px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border-color: rgba(139, 92, 246, 0.4);
}

.item-card:hover::after {
  opacity: 1;
}

.item-card:hover::before {
  opacity: 1;
}

.item-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.item-icon {
  font-size: 1.75rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(16, 185, 129, 0.15));
  border-radius: 16px;
  box-shadow: 
    0 4px 12px rgba(139, 92, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.item-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.item-card:hover .item-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 
    0 6px 16px rgba(139, 92, 246, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.item-card:hover .item-icon::before {
  opacity: 1;
}

.item-title {
  font-weight: 600;
  color: var(--on-surface);
  flex: 1;
  font-size: 1.1rem;
}

.status-badge {
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.status-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s ease;
}

.status-badge:hover::before {
  left: 100%;
}

.status-badge.ready {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: #166534;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}

.status-badge.processing {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
  animation: processingPulse 2s ease-in-out infinite;
}

@keyframes processingPulse {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
  }
  50% { 
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  }
}

/* Content Preview */
.content-preview {
  background: var(--surface-variant);
  padding: 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--on-surface-variant);
  border: 1px solid rgba(139, 92, 246, 0.1);
  text-align: center;
  font-style: italic;
}

/* Key Card */
.key-display {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface-variant);
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.1);
}

.key-code {
  flex: 1;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 1rem;
  color: var(--on-surface);
  background: none;
  border: none;
  padding: 0;
}

.copy-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.copy-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}

/* URL Card */
.url-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--surface-variant);
  border-radius: 12px;
  text-decoration: none;
  color: var(--on-surface);
  border: 1px solid rgba(139, 92, 246, 0.1);
  transition: all 0.3s ease;
}

.url-link:hover {
  background: rgba(139, 92, 246, 0.1);
  transform: translateX(5px);
}

.url-text {
  flex: 1;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9rem;
  word-break: break-all;
}

.url-arrow {
  font-size: 1.2rem;
  opacity: 0.7;
}

/* File Card */
.file-card.ready {
  border-left: 4px solid #22c55e;
}

.file-card.processing {
  border-left: 4px solid #f59e0b;
}

.file-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.file-name {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9rem;
  color: var(--on-surface-variant);
  background: var(--surface-variant);
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(139, 92, 246, 0.1);
}

.download-btn {
  display: inline-block;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 13px;
  width: auto;
  min-width: 120px;
  max-width: 180px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.25);
  transition: all 0.2s ease;
  box-sizing: border-box;
  word-wrap: break-word;
  min-height: 56px;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.download-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s ease;
}

.download-btn:hover::before {
  left: 100%;
}

/* Mobile Responsive Download Button */
@media (max-width: 768px) {
  .download-btn {
    padding: 6px 12px;
    border-radius: 5px;
    min-height: 32px;
    font-size: 12px;
    min-width: 100px;
    max-width: 160px;
  }
}

@media (max-width: 480px) {
  .download-btn {
    padding: 6px 10px;
    border-radius: 4px;
    min-height: 30px;
    font-size: 11px;
    min-width: 90px;
    max-width: 140px;
  }
}

.download-btn:hover {
  transform: translateY(-4px) scale(1.02);
  background-position: 100% 0;
  box-shadow: 
    0 12px 35px rgba(139, 92, 246, 0.5),
    0 8px 20px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: white;
  text-decoration: none;
}

.download-btn:active {
  transform: translateY(-2px) scale(0.98);
  transition: all 0.1s ease;
}

.download-text {
  font-size: 1rem;
}

.download-arrow {
  font-size: 1.3rem;
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.download-btn:hover .download-arrow {
  transform: translateY(3px) scale(1.1);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.download-btn:active .download-arrow {
  transform: translateY(1px) scale(1.05);
}

/* Processing Card */
.processing-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.processing-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(139, 92, 246, 0.2);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite, float 2s ease-in-out infinite;
  display: inline-block;
  margin-right: 0.75rem;
  vertical-align: middle;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

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

.processing-text {
  display: flex;
  align-items: center;
  font-weight: 500;
  color: var(--on-surface);
}

.submitted-info {
  background: var(--surface-variant);
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--on-surface-variant);
  border: 1px solid rgba(139, 92, 246, 0.1);
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  word-break: break-all;
  overflow-wrap: break-word;
  white-space: pre-wrap;
  max-width: 100%;
  box-sizing: border-box;
}

.processing-tip {
  font-size: 0.8rem;
  color: var(--on-surface-variant);
  font-style: italic;
  text-align: center;
  padding: 0.5rem;
  background: rgba(139, 92, 246, 0.05);
  border-radius: 8px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .success-celebration {
    padding: 2rem 1rem;
  }
  
  .success-title {
    font-size: 2rem;
  }
  
  .success-stats {
    flex-direction: column;
    gap: 1rem;
  }
  
  .items-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .item-card {
    padding: 1rem;
  }
  
  .content-section {
    padding: 1rem;
  }
  
  .section-header {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
  
  .section-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
}

.results-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--success-color), var(--secondary-color), var(--primary-color));
}

/* Success Header */
.result-success-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(6, 182, 212, 0.1));
  border-radius: var(--border-radius-small);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.result-success-icon {
  font-size: 3rem;
  color: var(--success-color);
  margin-bottom: 1rem;
  display: block;
}

.result-success-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--on-surface);
  margin-bottom: 0.5rem;
}

.result-success-subtitle {
  color: var(--on-surface-variant);
  font-size: 1rem;
}

/* Results Content */
.results-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Item Type Section */
.item-type-section {
  background: var(--surface-variant);
  border-radius: var(--border-radius-small);
  padding: 1.5rem;
  border: 1px solid rgba(139, 92, 246, 0.1);
}

.item-type-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(139, 92, 246, 0.1);
}

.item-type-icon {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.item-type-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--on-surface);
}

.item-type-count {
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-left: auto;
}

/* Individual Items */
.item-card {
  background: var(--surface-color);
  border-radius: var(--border-radius-small);
  padding: 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(139, 92, 246, 0.05);
  box-shadow: var(--shadow-small);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.item-card:last-child {
  margin-bottom: 0;
}

.item-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
  border-color: rgba(139, 92, 246, 0.2);
}

.item-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
}

.item-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.item-icon {
  font-size: 1.25rem;
  color: var(--primary-color);
  background: rgba(139, 92, 246, 0.1);
  padding: 0.5rem;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-info {
  flex: 1;
}

.item-label {
  font-weight: 600;
  color: var(--on-surface);
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.item-type {
  font-size: 0.85rem;
  color: var(--on-surface-variant);
  background: rgba(139, 92, 246, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  display: inline-block;
}

/* Item Content */
.item-content {
  margin-left: 3.5rem;
}

.item-text {
  background: var(--surface-variant);
  padding: 1rem;
  border-radius: var(--border-radius-small);
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9rem;
  color: var(--on-surface);
  border: 1px solid rgba(139, 92, 246, 0.1);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Download Button */
.download-button {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius-small);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  box-shadow: var(--shadow-small);
}

.download-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
  text-decoration: none;
  color: white;
}

.download-button:active {
  transform: translateY(0);
}

.download-icon {
  font-size: 1rem;
}

/* Full-Page Loading Overlay */
#loadingOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  text-align: center;
  background: transparent;
  border: none;
  box-shadow: none;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f4f6;
  border-top: 4px solid #8b5cf6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

.loading-text {
  font-size: 1.1rem;
  color: #374151;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* No transitions to prevent flickering */

/* Global Mobile Fixes */
* {
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  max-width: 100vw;
}

#out {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  word-wrap: break-word;
}

/* Force text wrapping on mobile */
@media (max-width: 768px) {
  * {
    word-break: break-word;
    overflow-wrap: break-word;
  }
}

/* Simple mobile overrides */
@media (max-width: 768px) {
  .results-section {
    margin: 0.25rem;
    width: calc(100% - 0.5rem);
    padding: 0.75rem;
  }
  
  .item-card {
    width: 100%;
    word-wrap: break-word;
  }
  
  .submitted-info {
    word-break: break-all;
    overflow-wrap: break-word;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .results-section {
    margin: 0.125rem;
    width: calc(100% - 0.25rem);
    padding: 0.5rem;
  }
  
  .item-card {
    padding: 0.5rem;
  }
  
  .submitted-info {
    font-size: 0.8rem;
  }
}

/* Mobile Responsiveness for Results */
@media (max-width: 767px) {
  .results-section {
    padding: 0;
    box-sizing: border-box;
  }
  
  .result-success-header {
    padding: 0.75rem;
    margin-bottom: 2rem;
  }
  
  .result-success-icon {
    font-size: 2.5rem;
  }
  
  .result-success-title {
    font-size: 1.3rem;
  }
  
  .item-type-section {
    padding: 1rem;
  }
  
  .item-card {
    padding: 1rem;
  }
  
  .item-content {
    margin-left: 2.5rem;
  width: calc(100% - 2.5rem);
  max-width: calc(100% - 2.5rem);
  box-sizing: border-box;
  overflow: hidden;
  }
  
  .download-button {
    width: 100%;
    justify-content: center;
    padding: 1rem;
  }
}

/* Footer */
.footer {
  background: var(--surface-color);
  border-top: 1px solid rgba(139, 92, 246, 0.1);
  padding: 2rem 0;
  margin-top: 4rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
}

.footer-text p {
  color: var(--on-surface-variant);
  margin: 0;
  font-size: 0.9rem;
}

.footer-text p:first-child {
  color: var(--on-surface);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  color: var(--on-surface-variant);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
  padding: 0.5rem;
  border-radius: var(--border-radius-small);
}

.footer-link:hover {
  color: var(--primary-color);
  background: rgba(139, 92, 246, 0.1);
}

@media (max-width: 767px) {
  .footer {
    padding: 1.5rem 0;
    margin-top: 2rem;
  }
  
  .footer-links {
    gap: 1rem;
  }
}

/* Features Section */
.features-section {
  background: var(--surface-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  padding: 2rem 1rem;
  margin: 2rem 0;
}

@media (min-width: 768px) {
  .features-section {
    padding: 3rem 2rem;
    margin: 4rem 0;
  }
}

.features-container {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .features-container {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
  }
}

.feature-card {
  text-align: center;
  padding: 2rem 1rem;
  border-radius: var(--border-radius-small);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-large);
}

.feature-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: block;
}

.feature-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--on-surface);
}

.feature-card p {
  color: var(--on-surface-variant);
  line-height: 1.6;
}

/* Mobile-specific improvements */
@media (max-width: 767px) {
  /* Improve touch targets */
  .form-input,
  .redeem-button,
  .feature-card {
    min-height: 44px; /* iOS recommended minimum */
  }
  
  /* Better spacing for mobile */
  .form-group {
    margin-bottom: 1rem;
  }
  
  /* Optimize floating shapes for mobile */
  .shape {
    display: none; /* Hide on mobile for better performance */
  }
  
  /* Improve mobile scrolling */
  body {
    -webkit-overflow-scrolling: touch;
  }
}

/* Loader (Preserving Original Functionality) */
.loader {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loader.hidden {
  display: none;
}

.loader-content {
  text-align: center;
  color: white;
}

.loader-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1.5rem;
}

.loader-text {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.loader-progress {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
  width: 30%;
  animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(200%); }
}

/* Enhanced Animation Keyframes */
@keyframes particle-float {
  0% {
    transform: translateY(0px) translateX(0px);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) translateX(100px);
    opacity: 0;
  }
}

@keyframes orb-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.6;
  }
}

@keyframes grid-scan {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Interactive Background Effects */
.animated-bg:hover .shape {
  animation-play-state: paused;
}

.animated-bg:hover .particle {
  animation-duration: 4s;
}

.animated-bg:hover .orb {
  animation-duration: 3s;
}

/* Smooth transitions for all animated elements */
.shape, .particle, .orb, .grid-line {
  transition: all 0.3s ease;
}

/* Enhanced floating animation with more variation */
.shape:nth-child(odd) {
  animation-timing-function: ease-in-out;
}

.shape:nth-child(even) {
  animation-timing-function: ease-out;
}

/* Particle trail effect */
.particle::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: inherit;
  border-radius: inherit;
  animation: particle-trail 2s linear infinite;
}

@keyframes particle-trail {
  0% {
    transform: scale(1);
    opacity: 0.3;
  }
  100% {
    transform: scale(3);
    opacity: 0;
  }
}

/* Ripple effect for click interactions */
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  transform: scale(0);
  animation: ripple 1s ease-out;
  pointer-events: none;
  width: 100px;
  height: 100px;
  margin-left: -50px;
  margin-top: -50px;
}

@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-container {
    padding: 1rem;
  }
  
  .form-container {
    padding: 2rem 1.5rem;
    margin: 0 1rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .features-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .header-content {
    padding: 0 1rem;
  }

  .slides-container {
    height: 100px;
  }

  .slide-text {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .form-container {
    padding: 1.5rem 1rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .redeem-button {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }

  .slides-container {
    height: 80px;
  }

  .slide-icon {
    font-size: 1.5rem;
  }

  .slide-text {
    font-size: 0.9rem;
  }
}

/* Note: System dark mode preference is disabled to allow manual theme control */
/* Users can manually toggle between light and dark themes using the theme button */

/* Comprehensive Dark Mode Styles */
[data-theme="dark"] {
  /* Form inputs */
  .form-input {
    background: rgba(51, 65, 85, 0.9);
    color: var(--on-surface);
    border-color: rgba(139, 92, 246, 0.3);
  }
  
  .form-input:focus {
    background: var(--surface-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
  }
  
  .form-input::placeholder {
    color: var(--on-surface-variant);
  }
  
  /* Form labels */
  .form-label {
    color: var(--on-surface);
  }
  
  /* Form header */
  .form-header h2 {
    color: var(--on-surface);
  }
  
  .form-header p {
    color: var(--on-surface-variant);
  }
  
  /* Results section */
  .results-section {
    background: var(--surface-color);
    color: var(--on-surface);
  }
  
  .result-success-header {
    color: var(--on-surface);
  }
  
  .result-success-subtitle {
    color: var(--on-surface-variant);
  }
  
  /* Download items */
  .download-item {
    background: var(--surface-variant);
    border-color: rgba(139, 92, 246, 0.2);
  }
  
  .item-header {
    color: var(--on-surface);
  }
  
  .item-content {
    color: var(--on-surface-variant);
  }
  
  /* Features section */
  .features-section {
    background: var(--surface-color);
  }
  
  .feature-card {
    background: var(--surface-variant);
    border-color: rgba(139, 92, 246, 0.2);
  }
  
  .feature-title {
    color: var(--on-surface);
  }
  
  .feature-description {
    color: var(--on-surface-variant);
  }
  
  /* Footer */
  .footer {
    background: var(--surface-color);
    border-top-color: rgba(51, 65, 85, 0.3);
  }
  
  .footer-content {
    color: var(--on-surface-variant);
  }
  
  /* URLs panel */
  .urls-panel {
    background: var(--surface-variant);
    border-color: rgba(139, 92, 246, 0.2);
  }
  
  .urls-header {
    color: var(--on-surface);
  }
  
  .url-input {
    background: var(--surface-color);
    color: var(--on-surface);
    border-color: rgba(139, 92, 246, 0.2);
  }
  
  .url-input:focus {
    border-color: var(--primary-color);
    background: var(--surface-color);
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.redeem-button:focus,
.form-input:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .animated-bg,
  .floating-shapes,
  .loader {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
}
