/* ========================================
   generator.css — Color Generator Styles
   ======================================== */

/* ========== Container ========== */
.header__container,
.generator__container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 40px;
}

/* ========== Header ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  border-bottom: 1px solid var(--border);
  transition: all var(--transition-base);
}

.header__container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.header__logo-img {
  width: 32px;
  height: 32px;
  margin: 0;
  object-fit: contain;
}

.header__nav {
  display: flex;
  gap: 40px;
}

.header__link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
}

.header__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition-base);
}

.header__link:hover {
  color: var(--text-primary);
}

.header__link:hover::after {
  width: 100%;
}

.header__link--active {
  color: var(--accent);
}

.header__link--active::after {
  width: 100%;
}

.header__menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 28px;
  cursor: pointer;
}

.header__menu-toggle span {
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-base);
}

.header__menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.header__menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.header__menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ========== Palette (Glass Orb Redesign) ========== */
.palette {
  display: flex;
  gap: 20px;
  /* Increased gap for balanced spacing */
  /* min-height: 500px; */
  margin-bottom: 80px;
  /* padding: 80px 40px; */
  background: transparent;
  position: relative;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  /* Keep them in one line for premium feel */
}

.palette__color {
  width: 220px;
  /* Increased size */
  height: 220px;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  transition: all 0.4s var(--ease-out);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
  /* Glass Base - Solid color applied via JS */
  box-shadow:
    inset 0 10px 20px rgba(255, 255, 255, 0.2),
    inset 0 -10px 20px rgba(0, 0, 0, 0.1),
    0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Subtle Top-Left Glossy Reflection */
.palette__color::before {
  content: '';
  position: absolute;
  top: 12%;
  left: 12%;
  width: 40%;
  height: 30%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 80%);
  border-radius: 50%;
  filter: blur(4px);
  pointer-events: none;
  z-index: 2;
}

/* Soft Edge Rim Light */
.palette__color::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 0 15px rgba(255, 255, 255, 0.2),
    inset 0 0 5px rgba(255, 255, 255, 0.3);
  pointer-events: none;
  z-index: 2;
}

.palette__color:hover {
  z-index: 10;
  /* Removed transform */
}

/* Floating Shadow (Underneath) */
.palette__color-shadow {
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 14px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 75%);
  border-radius: 50%;
  filter: blur(6px);
  z-index: -1;
  transition: all 0.4s var(--transition-base);
}

.palette__color:hover .palette__color-shadow {
  transform: translateX(-50%) scale(1.1);
  opacity: 0.5;
}

.palette__lock {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  background: rgba(15, 15, 15, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.4s var(--transition-base);
  backdrop-filter: blur(15px);
  color: white;
  z-index: 11;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.palette__color:hover .palette__lock {
  opacity: 1;
}

.palette__lock:hover {
  background: rgba(255, 255, 255, 0.2);
}

.palette__lock.locked {
  background: var(--accent);
  opacity: 1;
  border-color: transparent;
}

.palette__hex {
  font-size: 1.125rem;
  font-weight: 700;
  color: #FFFFFF;
  background: rgba(0, 0, 0, 0.4);
  padding: 12px 20px;
  border-radius: 50px;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  letter-spacing: 0.5px;
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* ========== Mobile Menu ========== */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--bg-primary);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu__nav {
  display: flex;
  flex-direction: column;
  gap: 32px;
  text-align: center;
}

.mobile-menu__link {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.mobile-menu__link:hover {
  color: var(--accent);
}

/* ========== Generator Main ========== */
.generator {
  min-height: 100vh;
  padding-top: calc(var(--header-height) + 80px);
  padding-bottom: 80px;
  display: flex;
  align-items: center;
}

.generator__container {
  width: 100%;
}

.generator__header {
  text-align: center;
  margin-bottom: 120px;
}

.generator__title {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.generator__subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

/* ========== Actions ========== */
.actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.btn--primary {
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
}

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

.btn--ghost {
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn--ghost:hover {
  background: var(--bg-tertiary);
  border-color: var(--text-secondary);
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .palette {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 768px) {
  .header__nav {
    display: none;
  }

  .header__menu-toggle {
    display: flex;
  }

  .generator__title {
    font-size: 2rem;
  }

  .palette {
    flex-direction: column;
    height: 600px;
  }

  .palette__color:hover {
    flex: 1;
  }

  .palette__lock {
    opacity: 1;
  }

  .actions {
    flex-direction: column;
  }

  .actions .btn {
    width: 100%;
  }

  .header__container,
  .generator__container {
    padding: 0 24px;
  }
}

@media (max-width: 480px) {
  .generator__title {
    font-size: 1.75rem;
  }

  .palette {
    height: 500px;
  }

  .palette__hex {
    font-size: 1rem;
    padding: 8px 16px;
  }
}