/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Galaxy Background Layers */
.stars, .twinkling {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

.stars {
  background: url('https://i.ibb.co/5nD1c3m/stars.png') repeat;
  animation: moveStars 200s linear infinite;
}

.twinkling {
  background: url('https://i.ibb.co/pnG6zqZ/twinkling.png') repeat;
  animation: moveTwinkling 200s linear infinite;
  opacity: 0.5;
}

@keyframes moveStars {
  0% { background-position: 0 0; }
  100% { background-position: -10000px 5000px; }
}

@keyframes moveTwinkling {
  0% { background-position: 0 0; }
  100% { background-position: 10000px 0; }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes galaxyMotion {
  0% { background-position: 0 0; }
  100% { background-position: 2000px 2000px; }
}

@keyframes float {
  from { transform: translateY(0px) rotate(0deg); }
  to { transform: translateY(-30px) rotate(15deg); }
}

@keyframes rainbowTrain {
  0% { background-position: 0% 50%; }
  100% { background-position: 400% 50%; }
}

/* Body Styling */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #0b002b url('https://www.transparenttextures.com/patterns/stardust.png') repeat;
  background-size: 600px 600px;
  animation: galaxyMotion 300s linear infinite, gradientShift 40s ease infinite;
  color: #e5dbff;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.3s ease;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(30px);
  z-index: -1;
  animation: float 6s ease-in-out infinite alternate;
}

body::before {
  top: 10%;
  left: 10%;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, #c744ff80 0%, transparent 70%);
}

body::after {
  bottom: 10%;
  right: 10%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, #ff66ff60 0%, transparent 70%);
  animation-duration: 8s;
}

/* Header */
header {
  background: rgba(15, 0, 40, 0.8);
  color: #c09eff;
  padding: 30px 20px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  border-bottom: 3px solid #6e00ff;
  backdrop-filter: blur(12px);
  border-radius: 0 0 20px 20px;
  z-index: 1;
}

header h1 {
  font-size: 2.7rem;
  color: #f0dbff;
  text-shadow: 0 0 15px #d077ff, 0 0 8px #a600ff;
  position: relative;
}

header h1::after {
  content: "FleeTha";
  font-size: 0.4em;
  background: linear-gradient(to right, #ff33ff, #9900ff);
  padding: 3px 10px;
  margin-left: 15px;
  color: white;
  border-radius: 20px;
  font-weight: bold;
  box-shadow: 0 0 8px #ff99ff;
  vertical-align: super;
}

/* Navigation */
nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-top: 20px;
  flex-wrap: wrap;
}

nav a {
  color: #efe3ff;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: 40px;
  background: linear-gradient(145deg, #290033, #3c0066);
  box-shadow: 0 6px 16px rgba(160, 0, 255, 0.3);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  font-weight: bold;
  z-index: 1;
}

nav a::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.12);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  transition: width 0.5s, height 0.5s;
  z-index: 0;
}

nav a:hover::after {
  width: 130px;
  height: 100px;
}

nav a:hover,
nav a.active {
  background: linear-gradient(145deg, #7000cc, #d000ff);
  color: #fff;
  box-shadow: 0 0 18px #cc00ff, 0 0 8px #ff00cc;
}

/* Main Section */
main {
  max-width: 950px;
  margin: 50px auto;
  padding: 35px;
  background: rgba(45, 0, 90, 0.45);
  border-radius: 22px;
  box-shadow: 0 0 40px rgba(200, 0, 255, 0.25);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

main h2 {
  font-size: 2.4em;
  color: #f3d6ff;
  border-bottom: 2px dashed #d100ff;
  padding-bottom: 12px;
  margin-bottom: 24px;
}

/* Form */
form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

form label {
  font-weight: bold;
  color: #f1ddff;
}

form input,
form select,
form textarea {
  padding: 16px;
  border: 1px solid #cc55ff;
  border-radius: 14px;
  background: rgba(25, 0, 50, 0.85);
  color: #fbeeff;
  font-size: 1em;
  transition: all 0.3s;
  box-shadow: inset 0 0 8px #7700ff20;
}

form input:focus,
form select:focus,
form textarea:focus {
  outline: none;
  border-color: #ff55ff;
  box-shadow: 0 0 16px #ff66ff80;
  transform: scale(1.01);
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 35px;
  justify-content: center;
  margin-top: 40px;
}

/* Product Card */
.product-card {
  background: rgba(40, 0, 80, 0.3);
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  padding: 20px;
  color: #fff;
  text-align: center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(130, 0, 255, 0.3);
  transition: all 0.3s ease;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 15px 40px rgba(170, 0, 255, 0.4);
}

/* Product Image with Rainbow Border */
.product-image {
  position: relative;
  border-radius: 14px;
  padding: 3px;
  background: linear-gradient(90deg, red, orange, yellow, green, cyan, blue, violet, red);
  background-size: 400% 400%;
  animation: rainbowTrain 12s linear infinite;
  overflow: hidden;
}

.product-image::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: inherit;
  filter: blur(2px);
  opacity: 0.75;
  z-index: 0;
}

.product-image img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  position: relative;
  z-index: 1;
}

/* Price & Stock */
.price {
  font-size: 1.5rem;
  font-weight: bold;
  margin-top: 15px;
  color: #00ffcc;
  text-shadow: 0 0 8px #00ffcc;
}

.stock {
  color: #ffff55;
  font-weight: 700;
  margin-top: 8px;
  text-shadow: 0 0 5px #ffeb3b;
}

.ostock {
  color: #ff4a4a;
  font-weight: 700;
  margin-top: 8px;
  text-shadow: 0 0 5px #ff0000;
}

/* Product Button */
.product-card button {
  background: linear-gradient(145deg, #6e00ff, #9900ff);
  color: white;
  padding: 14px 22px;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 12px #a300ff;
  transition: all 0.3s ease;
}

.product-card button:hover {
  background: linear-gradient(145deg, #8000ff, #aa00ff);
  box-shadow: 0 0 20px #cc33ff;
  transform: scale(1.03);
}