:root {
  --bg-dark: #040009;
  --bg-panel: rgba(14, 2, 24, 0.72);
  --bg-panel-strong: rgba(27, 5, 43, 0.88);
  --border-soft: rgba(255, 255, 255, 0.08);
  --text-primary: #f5f1ff;
  --text-muted: #c4bbf7;
  --accent: #a855f7;
  --accent-strong: #ec4899;
  --accent-blue: #20ffe1;
  --accent-purple: #8b5cf6;
  --card-shadow: 0 24px 60px rgba(5, 0, 14, 0.55);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #ffffff;
  font-family: 'Clear Sans', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #08020f;
}

.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: url('/static/images/background.jpg') center/cover no-repeat;
  filter: brightness(0.55);
  z-index: -1;
}

.top-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 10px 16px;
  background: linear-gradient(90deg, #f127ff 0%, #7701ff 100%);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.3px;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px clamp(20px, 6vw, 80px);
  background: rgba(3, 0, 12, 0.72);
  border-bottom: 1px solid rgba(120, 80, 255, 0.22);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 99999;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #e5e2ff;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: inline-flex;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(244, 52, 255, 0.45), rgba(69, 92, 255, 0.45));
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
}

.brand-text {
  font-size: 18px;
}

.nav-links a {
  color: rgba(215, 223, 255, 0.72);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: #ffffff;
}

.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-cart::before {
  content: '\1F6D2';
  font-size: 18px;
}

.account-button {
  padding: 10px 20px;
  background: rgba(120, 80, 255, 0.15);
  border: 1px solid rgba(120, 80, 255, 0.3);
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.account-button:hover {
  background: rgba(120, 80, 255, 0.25);
  border-color: rgba(120, 80, 255, 0.5);
}

/* User menu dropdown */
.user-menu {
  position: relative;
  z-index: 100000;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 180px;
  background: rgba(18, 10, 35, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 100001;
  pointer-events: none;
}

.user-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 12px 20px;
  color: #fff;
  text-decoration: none;
  text-align: left;
  background: transparent;
  border: none;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.dropdown-logout {
  margin: 0;
  padding: 0;
}

.logout-btn {
  color: #ff6b6b;
}

.logout-btn:hover {
  background: rgba(255, 107, 107, 0.15);
}

.header-button,
.buy-btn,
.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f127ff 0%, #7701ff 100%);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.header-button:hover,
.buy-btn:hover,
.hero-button:hover {
  opacity: 0.85;
}

.hero {
  text-align: center;
  padding: 120px clamp(18px, 6vw, 120px) 80px;
  color: #ffffff;
  position: relative;
}

.hero h1 {
  margin: 0 0 24px;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0 0 32px;
  color: rgba(215, 223, 255, 0.76);
  font-size: 17px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.shop-content {
  width: min(1200px, 92vw);
  margin: 0 auto 120px;
}

.category-section {
  margin-top: 70px;
}

.section-title h3 {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 700;
  text-align: center;
}

.section-title p {
  text-align: center;
  color: rgba(217, 225, 255, 0.7);
  margin: 0;
}

.products-grid {
  margin-top: 40px;
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(3, 1fr);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.product-card {
  background: rgba(11, 7, 23, 0.95);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 420px;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.product-image {
  position: relative;
  height: 200px;
  background: rgba(30, 15, 50, 0.4);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}

.product-image img {
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
}

.product-thumb-fallback {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
}

.product-body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  color: #fff;
}

.stock-line {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 400;
}

.stock-line::before {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
}

.stock-line.in {
  color: #6fed9c;
}

.stock-line.in::before {
  background-color: rgba(111, 237, 156, 0.2);
  content: '✓';
}

.stock-line.out {
  color: #f79ca2;
}

.stock-line.out::before {
  background-color: rgba(247, 156, 162, 0.2);
  content: '✕';
}

.product-title {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  color: #fff;
}

.prices {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
}

.price-current {
  color: #fff;
}

.prices .old {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: line-through;
  font-weight: 500;
}

.buy-btn {
  margin-top: auto;
  width: 100%;
  font-size: 15px;
  font-weight: 700;
}

.footer {
  width: min(1200px, 92vw);
  margin: 0 auto 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: rgba(215, 225, 255, 0.7);
  font-size: 14px;
}

.footer a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  margin-right: 14px;
}

.footer a:hover {
  color: #fff;
}

@media (max-width: 1100px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
}

@media (max-width: 960px) {
  .nav-links {
    display: none;
  }
  .hero {
    padding: 90px 24px 60px;
  }
  .hero h1 {
    font-size: clamp(36px, 8vw, 52px);
  }
}

@media (max-width: 640px) {
  .navbar {
    padding: 18px 20px;
  }
  .nav-right {
    gap: 12px;
  }
  .products-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .hero {
    padding: 70px 20px 50px;
  }
  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

