:root {
  --primary-pink: #ff0099;
  /* Neon Pink */
  --secondary-pink: #33001b;
  /* Dark Pink Background */
  --accent-pink: #ff66c4;
  /* Lighter Pink */
  --silver: #555555;
  --silver-light: #333333;
  --bg-white: #050505;
  /* Almost Black */
  --soft-gray: #121212;
  /* Dark Card Background */
  --text-dark: #ffffff;
  --text-light: #cccccc;
  --shadow: 0 10px 40px rgba(255, 0, 153, 0.15);
  /* Pink Glow */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-white);
  color: var(--text-dark);
  line-height: 1.6;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--silver-light);
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-pink);
  text-shadow: 1px 1px 2px rgba(192, 192, 192, 0.5);
}

.logo span {
  color: var(--silver);
}

.nav-links a {
  text-decoration: none;
  color: var(--text-dark);
  margin-left: 2rem;
  font-weight: 400;
  transition: color 0.3s;
}

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

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  padding: 5% 5% 10% 5%;
  gap: 4rem;
  background: linear-gradient(135deg, #050505 0%, #1a0510 100%);
}

h1 {
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.italic {
  font-style: italic;
  color: var(--primary-pink);
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  max-width: 500px;
}

.btn-primary {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: linear-gradient(45deg, var(--primary-pink), var(--silver));
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 10px 20px rgba(255, 183, 197, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(192, 192, 192, 0.4);
}

.hero-image {
  position: relative;
}

.hero-image img {
  width: 100%;
  border-radius: 20px;
  position: relative;
  z-index: 2;
  z-index: 2;
  border: 4px solid var(--soft-gray);
  box-shadow: var(--shadow);
}

.blob {
  position: absolute;
  width: 110%;
  height: 110%;
  background: linear-gradient(45deg, var(--secondary-pink), var(--silver-light));
  top: -5%;
  left: -5%;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  filter: blur(40px);
  opacity: 0.5;
}

.analyzer-section {
  padding: 5% 5%;
  background-color: var(--bg-white);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card {
  background: var(--soft-gray);
  padding: 3rem;
  border-radius: 24px;
  width: 100%;
  max-width: 800px;
  box-shadow: var(--shadow);
  margin-bottom: 3rem;
  border: 1px solid var(--silver-light);
}

h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  margin-bottom: 2rem;
  text-align: center;
}

.upload-box {
  border: 2px dashed var(--silver);
  border-radius: 16px;
  padding: 3rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 2rem;
  margin-bottom: 2rem;
  background: rgba(255, 0, 153, 0.05);
}

.upload-box:hover {
  background: var(--secondary-pink);
  border-color: var(--primary-pink);
}

.icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
}

select {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--silver-light);
  border-radius: 10px;
  font-family: inherit;
  outline: none;
  background: var(--soft-gray);
  color: var(--text-dark);
}

.btn-submit {
  width: 100%;
  padding: 1.2rem;
  background: linear-gradient(45deg, var(--text-dark), var(--silver));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-submit:hover {
  background: linear-gradient(45deg, var(--primary-pink), var(--silver));
}

.hidden {
  display: none;
}

#previewImg {
  max-width: 200px;
  border-radius: 10px;
  margin: 0 auto;
  display: block;
  border: 2px solid var(--silver-light);
}

@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero p {
    margin: 0 auto 2rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.8rem;
  }
}


/* Results & Palette */
.results-container {
  animation: slideUp 0.6s ease-out;
  border-top: 4px solid var(--primary-pink);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--silver-light);
  padding-bottom: 1rem;
}

.badge {
  background: var(--secondary-pink);
  color: var(--text-dark);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.result-body p {
  color: var(--text-light);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.palette-preview p {
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: var(--text-dark);
}

.colors {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.color-swatch {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  border: 2px solid white;
}

.color-swatch:hover {
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

/* Loader */
.loader {
  border: 4px solid var(--secondary-pink);
  border-top: 4px solid var(--primary-pink);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

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

  100% {
    transform: rotate(360deg);
  }
}

/* Shopping Section */
.shopping-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--silver-light);
}

.shopping-section h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--primary-pink);
  margin-bottom: 1.5rem;
}

.category-group {
  margin-bottom: 2rem;
}

.category-title {
  font-size: 1.1rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
}

a.product-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  display: block;
}

a.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  border-color: var(--primary-pink);
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.product-info {
  padding: 1rem;
}

.product-brand {
  font-size: 0.75rem;
  color: var(--primary-pink);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.3rem;
  display: block;
}

.product-name {
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.product-price {
  font-weight: 700;
  color: var(--text-light);
  font-size: 0.9rem;
}

.source-badge {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 5px;
  float: right;
}