/* CSS Variables for Theme Management */
:root {
  --primary: #10B981;
  --primary-dark: #059669;
  --secondary: #3B82F6;
  --accent: #8B5CF6;
  --background: #0F172A;
  --surface: rgba(30, 41, 59, 0.8);
  --glass: rgba(255, 255, 255, 0.1);
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --border: rgba(255, 255, 255, 0.15);
  --shadow: rgba(0, 0, 0, 0.5);
  --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-alt: linear-gradient(135deg, #10B981 0%, #3B82F6 100%);
}

[data-theme="light"] {
  --background: #F8FAFC;
  --surface: rgba(255, 255, 255, 0.9);
  --glass: rgba(255, 255, 255, 0.25);
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --border: rgba(0, 0, 0, 0.1);
  --shadow: rgba(0, 0, 0, 0.15);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--background);
  overflow-x: hidden;
  transition: all 0.3s ease;
}

.background-gradient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient);
  opacity: 0.05;
  z-index: -1;
  pointer-events: none;
}

/* Glass Morphism Effects */
.glass-panel {
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 20px 40px var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--surface);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: all 0.3s ease;
}

/* Header Components */
.hamburger-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.hamburger-menu:hover {
  background: var(--glass);
  transform: scale(1.05);
}

.hamburger-menu span {
  width: 24px;
  height: 3px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger-menu:hover span {
  background: var(--primary);
}

.logo-container {
  flex: 1;
  display: flex;
  justify-content: center;
}

.logo-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.logo-btn:hover {
  background: var(--glass);
  transform: scale(1.05);
}

.logo {
  height: 50px;
  filter: drop-shadow(0 4px 8px var(--shadow));
}

.theme-toggle {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  min-width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  background: var(--primary);
  transform: scale(1.1);
  box-shadow: 0 10px 20px var(--shadow);
}

/* Side Menu */
.side-menu {
  position: fixed;
  top: 0;
  left: -400px;
  width: 350px;
  height: 100vh;
  padding: 2rem;
  z-index: 1001;
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.side-menu.open {
  left: 0;
}

.close-side-menu {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-primary);
  cursor: pointer;
  margin-bottom: 2rem;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.close-side-menu:hover {
  background: var(--glass);
  color: var(--primary);
  transform: scale(1.1);
}

.side-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.nav-link:hover {
  background: var(--glass);
  color: var(--primary);
  transform: translateX(10px);
}

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

/* Main Content */
.main-content {
  padding-top: 100px;
  min-height: 100vh;
}

/* Hero Section */
.hero-section {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.hero-content {
  max-width: 1200px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  padding: 4rem;
  align-items: center;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
}

.title-highlight {
  background: var(--gradient-alt);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.title-subtitle {
  font-size: 0.6em;
  color: var(--text-secondary);
  font-weight: 400;
  margin-top: 0.5rem;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 3rem;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem;
  background: var(--gradient-alt);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(16, 185, 129, 0.4);
}

.btn-arrow {
  font-size: 1.3rem;
  transition: transform 0.3s ease;
}

.cta-button:hover .btn-arrow {
  transform: translateX(5px);
}

/* Hero Visual */
.hero-visual {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-elements {
  position: relative;
  width: 100%;
  height: 100%;
}

.float-element {
  position: absolute;
  border-radius: 20px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
}

.float-1 {
  width: 120px;
  height: 120px;
  top: 20%;
  right: 20%;
  animation: float 6s ease-in-out infinite;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
}

.float-2 {
  width: 80px;
  height: 80px;
  bottom: 30%;
  left: 10%;
  animation: float 8s ease-in-out infinite reverse;
  background: linear-gradient(45deg, var(--secondary), var(--accent));
}

.float-3 {
  width: 100px;
  height: 100px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: float 7s ease-in-out infinite;
  background: linear-gradient(45deg, var(--accent), var(--primary));
}

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

/* Sections */
.section-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.section-title {
  font-size: 3rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  background: var(--gradient-alt);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 3rem;
}

/* Retailers Section */
.retailers-section {
  padding: 4rem 2rem;
}

.retailer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.retailer-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem;
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: var(--text-primary);
}

.retailer-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px var(--shadow);
}

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

.retailer-name {
  font-size: 1.2rem;
  font-weight: 600;
  flex: 1;
  margin-left: 1rem;
}

.retailer-arrow {
  font-size: 1.5rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.retailer-card:hover .retailer-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Retailer-specific colors */
.retailer-card.amazon:hover { border-color: #FF9900; }
.retailer-card.walmart:hover { border-color: #0071CE; }
.retailer-card.target:hover { border-color: #CC0000; }
.retailer-card.costco:hover { border-color: #055cac; }

/* Features Section */
.features-section {
  padding: 6rem 2rem;
}

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

.feature-card {
  text-align: center;
  padding: 3rem 2rem;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-10px);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.feature-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Products Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.product-card {
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: var(--text-primary);
  position: relative;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px var(--shadow);
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.product-info {
  padding: 1.5rem;
}

.product-name {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.product-price {
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: 600;
}

.product-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Footer */
.footer {
  margin-top: 6rem;
  border-radius: 20px 20px 0 0;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  padding: 3rem 2rem;
}

.footer-section h4 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-copyright {
  text-align: right;
}

.small-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem;
  }
  
  .hero-visual {
    height: 200px;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .retailer-grid {
    grid-template-columns: 1fr;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .side-menu {
    width: 100vw;
    left: -100vw;
  }
  
  .glass-header {
    padding: 1rem;
  }
}

/* Smooth scrolling improvements */
@media (prefers-reduced-motion: no-preference) {
  .hero-visual,
  .feature-card,
  .retailer-card,
  .product-card {
    animation: fadeInUp 0.8s ease-out;
  }
}

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

/* Performance optimizations */
.glass-panel,
.retailer-card,
.feature-card,
.product-card {
  will-change: transform;
}

img {
  will-change: transform;
}

/* Focus styles for accessibility */
button:focus,
a:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --glass: rgba(255, 255, 255, 0.9);
    --border: rgba(0, 0, 0, 0.8);
  }
  
  [data-theme="light"] {
    --glass: rgba(0, 0, 0, 0.9);
    --border: rgba(255, 255, 255, 0.8);
  }
}