/* 🌗 Light & Dark mode setup */
:root {
  --bg-color: #f5f7fa;
  --text-color: #111;
  --accent: #0077ff;
  --card-bg: #fff;
  --shadow: rgba(0,0,0,0.1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #0b0c1a;
    --text-color: #e8e8e8;
    --accent: #58a6ff;
    --card-bg: #161b22;
    --shadow: rgba(255,255,255,0.05);
  }
}

/* ✨ Global reset */
body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background 0.5s, color 0.5s;
  overflow-x: hidden;
}

/* 🧭 Navbar */
header.navbar {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  background: rgba(10, 12, 26, 0.9);
  backdrop-filter: blur(8px);
  height: 55px;
  display: flex;
  align-items: center;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 15px;
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
}
.logo span {
  background: linear-gradient(to right, #5f9df7, #9c7eff);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.nav-links {
  display: flex;
  gap: 15px;
}
.nav-item {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s;
}
.nav-item:hover { color: var(--accent); }

/* 🦸 Hero Section */
.hero {
  height: 50vh;
  background: linear-gradient(to bottom, #0a0c1a 0%, #151a38 50%, #213c88 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
  border-bottom-left-radius: 100% 8%;
  border-bottom-right-radius: 100% 8%;
}
.hero-content {
  position: relative;
  z-index: 3;
  max-width: 700px;
  padding: 20px;
}
.hero-content h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}
.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 20px;
}
.btn-primary {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.3s;
}
.btn-primary:hover { transform: scale(1.05); }

/* ✨ Stars + Glow */
.hero::before, .hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 200%; height: 200%;
  background-repeat: repeat;
  pointer-events: none;
  z-index: 1;
}
.hero::before {
  background-image: radial-gradient(white 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: 0.15;
  animation: starsMove 120s linear infinite;
}
.hero::after {
  background-image: radial-gradient(white 0.8px, transparent 0.8px);
  background-size: 2px 2px;
  opacity: 0.08;
  animation: starsMove 200s linear infinite reverse;
}
@keyframes starsMove {
  from { transform: translate(0, 0); }
  to { transform: translate(-400px, 400px); }
}

/* 🌠 Shooting Stars */
.shooting-star {
  position: absolute;
  top: -10px;
  width: 2px;
  height: 80px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.9), transparent);
  opacity: 0;
  transform: rotate(45deg);
  animation: shooting 3s linear infinite;
}
@keyframes shooting {
  0% { transform: translate(-100px, -100px) rotate(45deg); opacity: 0; }
  10% { opacity: 1; }
  50% { transform: translate(300px, 300px) rotate(45deg); opacity: 1; }
  100% { transform: translate(600px, 600px) rotate(45deg); opacity: 0; }
}

/* 💡 Soft glow */
.hero-glow {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  height: 60px;
  background: radial-gradient(ellipse at center, rgba(100,180,255,0.5), transparent 70%);
  filter: blur(20px);
  animation: pulseGlow 6s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%,100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.9; transform: translateX(-50%) scale(1.1); }
}

/* 💎 Features */
.feature-card {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--shadow);
  padding: 25px 15px;
  max-width: 320px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s, box-shadow 0.3s;
  overflow: hidden;
}

.feature-card img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  margin-bottom: 15px;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin: 10px 0 5px;
  color: var(--accent);
}

.feature-card p {
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 260px;
  color: var(--text-color);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 4px 15px var(--shadow);
}
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  max-width: 1000px;
  margin: 0 auto;
}


/* 🛍️ Products */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
  gap: 20px;
  padding: 40px 20px;
}
.product-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px var(--shadow);
  transition: transform 0.3s;
}
.product-card:hover { transform: translateY(-6px); }
.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.product-info { padding: 15px; }
.add-btn {
  background: var(--accent);
  border: none;
  color: #fff;
  width: 100%;
  padding: 8px 0;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 10px;
}

/* 🛒 Cart & Checkout */
.page { display: none; }
.page.active { display: block; padding: 40px 20px; }
.cart-summary { text-align: center; margin-top: 20px; }

/* 💳 Checkout Form */
#checkoutForm {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 400px;
  margin: auto;
}
#checkoutForm input, #checkoutForm select {
  padding: 10px;
  border: 1px solid var(--shadow);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text-color);
}
.btn-success {
  background: #28a745;
  border: none;
  color: #fff;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
}

/* ⚓ Footer */
footer {
  text-align: center;
  padding: 20px;
  background: rgba(10,10,20,0.9);
  color: #bbb;
  font-size: 0.95rem;
}

/* 📱 Responsive */
@media (max-width: 768px) {
  .hero { height: 45vh; }
  .nav-links { gap: 10px; font-size: 0.9rem; }
}
