/* ================================
   GLOBAL DESIGN SYSTEM - PREMIUM CPA REWARDS
   Glassmorphism | Animations | Brand Themes
   ================================ */

/* ================================
   CSS VARIABLES - BRAND COLORS
   ================================ */
:root {
  /* Global Colors */
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --text-light: #ffffff;
  --text-dark: #1a1a1a;
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-medium: rgba(0, 0, 0, 0.2);
  --shadow-heavy: rgba(0, 0, 0, 0.3);
  
  /* Brand Colors */
  --walmart-blue: #0071ce;
  --walmart-yellow: #ffc220;
  --cashapp-green: #00d632;
  --netflix-red: #e50914;
  --netflix-black: #141414;
  --shein-pink: #ff6b9d;
  --shein-black: #1a1a1a;
  --costco-red: #ee2e31;
  --costco-blue: #0066b2;
  --ae-navy: #003b5c;
  --sephora-black: #0000ff;
  --sephora-white: #ffffff;
  --fd-yellow: #ffcc00;
  --fd-green: #006633;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  --spacing-3xl: 6rem;
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;
  --font-size-5xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Z-Index */
  --z-header: 1000;
  --z-modal: 2000;
  --z-tooltip: 3000;
}

/* ================================
   RESET & BASE STYLES
   ================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--primary-gradient);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-base);
}

button {
  font-family: inherit;
  font-color: #ffffff
  cursor: pointer;
  border: none;
  background: none;
  transition: var(--transition-base);
}

ul, ol {
  list-style: none;
}

/* ================================
   GLASSMORPHISM COMPONENTS
   ================================ */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px var(--shadow-light);
}

.glass-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: var(--transition-base);
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.glass-strong {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ================================
   HEADER - STICKY GLASS NAVBAR
   ================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-header);
  padding: var(--spacing-sm) 0;
  transition: var(--transition-base);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.nav-menu {
  display: flex;
  gap: var(--spacing-lg);
  align-items: center;
}

.nav-link {
  color: var(--text-light);
  font-weight: 500;
  position: relative;
  padding: var(--spacing-xs) 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--text-light);
  transition: var(--transition-base);
}

.nav-link:hover::after {
  width: 100%;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: var(--spacing-xs);
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-light);
  border-radius: var(--radius-full);
  transition: var(--transition-base);
}

/* ================================
   BUTTONS
   ================================ */
.btn {
  display: inline-block;
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: var(--font-size-lg);
  text-align: center;
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: var(--text-light);
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6);
}

.btn-glow {
  animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
  }
  50% {
    box-shadow: 0 4px 40px rgba(102, 126, 234, 0.8), 0 0 60px rgba(102, 126, 234, 0.4);
  }
}

.btn-large {
  padding: var(--spacing-lg) var(--spacing-3xl);
  font-size: var(--font-size-xl);
}

.btn-ripple::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-ripple:hover::before {
  width: 300px;
  height: 300px;
}

/* Brand-colored buttons */
.btn-walmart {
  background: linear-gradient(135deg, var(--walmart-blue), #005ba3);
  box-shadow: 0 4px 20px rgba(0, 113, 206, 0.4);
}

.btn-walmart:hover {
  box-shadow: 0 8px 30px rgba(0, 113, 206, 0.6);
}

.btn-cashapp {
  background: linear-gradient(135deg, var(--cashapp-green), #00a827);
  box-shadow: 0 4px 20px rgba(0, 214, 50, 0.4);
}

.btn-cashapp:hover {
  box-shadow: 0 8px 30px rgba(0, 214, 50, 0.6);
}

.btn-netflix {
  background: linear-gradient(135deg, var(--netflix-red), #b20710);
  box-shadow: 0 4px 20px rgba(229, 9, 20, 0.4);
}

.btn-netflix:hover {
  box-shadow: 0 8px 30px rgba(229, 9, 20, 0.6);
}

.btn-shein {
  background: linear-gradient(135deg, var(--shein-pink), #ff3d7f);
  box-shadow: 0 4px 20px rgba(255, 107, 157, 0.4);
}

.btn-shein:hover {
  box-shadow: 0 8px 30px rgba(255, 107, 157, 0.6);
}

.btn-costco {
  background: linear-gradient(135deg, var(--costco-red), #c02428);
  box-shadow: 0 4px 20px rgba(238, 46, 49, 0.4);
}

.btn-costco:hover {
  box-shadow: 0 8px 30px rgba(238, 46, 49, 0.6);
}

.btn-ae {
  background: linear-gradient(135deg, var(--ae-navy), #002742);
  box-shadow: 0 4px 20px rgba(0, 59, 92, 0.4);
}

.btn-ae:hover {
  box-shadow: 0 8px 30px rgba(0, 59, 92, 0.6);
}

.btn-sephora {
  background: linear-gradient(135deg, var(--sephora-black), #333333);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.btn-sephora:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8);
}

.btn-fd {
  background: linear-gradient(135deg, var(--fd-yellow), #e6b800);
  color: var(--fd-green);
  box-shadow: 0 4px 20px rgba(255, 204, 0, 0.4);
}

.btn-fd:hover {
  box-shadow: 0 8px 30px rgba(255, 204, 0, 0.6);
}

/* ================================
   CONTAINERS & LAYOUT
   ================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-3xl) 0;
  position: relative;
}

.section-title {
  font-size: var(--font-size-4xl);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--spacing-xl);
  color: var(--text-light);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.section-subtitle {
  font-size: var(--font-size-xl);
  text-align: center;
  margin-bottom: var(--spacing-2xl);
  color: rgba(255, 255, 255, 0.9);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ================================
   GRID SYSTEMS
   ================================ */
.grid {
  display: grid;
  gap: var(--spacing-lg);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ================================
   ANIMATIONS
   ================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* Animation Classes */
.animate-fade-in {
  animation: fadeIn 1s ease-out;
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

.animate-fade-in-down {
  animation: fadeInDown 0.8s ease-out;
}

.animate-slide-in-left {
  animation: slideInLeft 0.8s ease-out;
}

.animate-slide-in-right {
  animation: slideInRight 0.8s ease-out;
}

.animate-scale-in {
  animation: scaleIn 0.6s ease-out;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

/* ================================
   FOOTER
   ================================ */
.footer {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: var(--spacing-2xl) 0 var(--spacing-lg);
  color: var(--text-light);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer-section h3 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--spacing-md);
  color: var(--text-light);
}

.footer-section p,
.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--spacing-xs);
  display: block;
}

.footer-section a:hover {
  color: var(--text-light);
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--font-size-sm);
}

.footer-legal-notice {
  background: rgba(255, 255, 255, 0.05);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-lg);
  font-size: var(--font-size-sm);
  line-height: 1.8;
  border-left: 4px solid rgba(255, 255, 255, 0.3);
}

/* ================================
   UTILITIES
   ================================ */
.text-center {
  text-align: center;
}

.text-light {
  color: var(--text-light);
}

.text-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

.py-1 { padding-top: var(--spacing-sm); padding-bottom: var(--spacing-sm); }
.py-2 { padding-top: var(--spacing-md); padding-bottom: var(--spacing-md); }
.py-3 { padding-top: var(--spacing-lg); padding-bottom: var(--spacing-lg); }

/* ================================
   RESPONSIVE DESIGN
   ================================ */
@media (max-width: 768px) {
  :root {
    --font-size-3xl: 1.75rem;
    --font-size-4xl: 2rem;
    --font-size-5xl: 2.25rem;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 250px;
    height: calc(100vh - 70px);
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: var(--spacing-xl);
    transition: var(--transition-base);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .section {
    padding: var(--spacing-2xl) 0;
  }
  
  .btn-large {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-lg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ================================
   LOADING STATE
   ================================ */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--text-light);
  animation: rotate 0.8s linear infinite;
}

/* ================================
   BADGE & TAGS
   ================================ */
.badge {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background: linear-gradient(135deg, #00d632, #00a827);
  color: white;
}

.badge-warning {
  background: linear-gradient(135deg, #ffc220, #ff9500);
  color: white;
}

.badge-info {
  background: linear-gradient(135deg, #0071ce, #005ba3);
  color: white;
}

/* ================================
   ICON STYLES
   ================================ */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  font-size: inherit;
}

.icon-lg {
  font-size: 2rem;
}

.icon-xl {
  font-size: 3rem;
}

.icon-glow {
  filter: drop-shadow(0 0 10px currentColor);
}
