/* =============== GLOBAL =============== */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

:root {
  --bg: #050816;
  --bg-alt: #020617;
  --muted: #9ca3af;
  --white: #ffffff;
  --blurple: #5865F2;
  --blurple-soft: #4f46e5;
  --blurple-dark: #4338ca;
  --card: #0b1220;
  --card-soft: #111827;
  --border-subtle: rgba(148, 163, 184, 0.25);
}

html,
body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(circle at top, #1d2a65 0, transparent 55%),
    radial-gradient(circle at bottom, #111827 0, #020617 60%);
  color: var(--white);
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img {
  -webkit-user-drag: none;
  user-drag: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  pointer-events: auto;
}

/* ============== LAYOUT CONTAINER ============== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== NAVBAR BASE ========== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 100vw;
  background: rgba(3, 7, 18, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  z-index: 999;
}

.navbar.scrolled {
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  transition: background 0.25s ease, backdrop-filter 0.4s ease, box-shadow 0.25s ease;
}

.navbar__inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
}

/* BRAND */

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand__img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.35);
}

.brand__text {
  color: var(--white);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* CENTER NAV LINKS */

.nav-right {
  flex: 1 1 auto;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: row;
  gap: 32px;
  align-items: center;
  justify-content: center;
}

.nav-links__item {
  display: flex;
  align-items: center;
}

.nav-links__link {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  position: relative;
}

.nav-links__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blurple), var(--blurple-soft));
  transition: width 0.18s ease;
}

.nav-links__link:hover {
  color: var(--white);
}

.nav-links__link:hover::after {
  width: 100%;
}

/* CTA (only used in mobile menu) */
.nav-links__item--cta {
  margin-left: auto;
}

/* RIGHT SIDE: USER + HAMBURGER */

.navbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* HAMBURGER (hidden on desktop) */

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 4px;
  align-items: center;
  justify-content: center;
}

.nav-toggle-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

/* NAVBAR LOGIN BUTTON VISIBILITY */

.navbar__login-desktop {
  display: inline-flex;
}

.navbar__login-mobile {
  display: none;
}

/* NAV CTA BUTTON */

.btn--primary {
  background: linear-gradient(135deg, var(--blurple), var(--blurple-soft));
  color: var(--white);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(191, 219, 254, 0.25);
  transition: 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  box-shadow: 0 8px 25px rgba(88, 101, 242, 0.45);
}

.btn--primary:hover {
  background: linear-gradient(135deg, var(--blurple-soft), var(--blurple-dark));
  transform: translateY(-2px);
}

/* ========== USER DROPDOWN ========== */

.nav-user {
  position: relative;
}

.nav-user-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.9);
  cursor: pointer;
  color: var(--white);
  font-size: 13px;
  font-weight: 500;
}

.nav-user-toggle:hover {
  background: #020617;
}

.nav-user__avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  object-fit: cover;
}

.nav-user__name {
  max-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}

.nav-user__chevron {
  font-size: 10px;
  color: var(--muted);
}

/* dropdown menu */

.nav-user-menu {
  position: absolute;
  top: 110%;
  right: 0;
  min-width: 190px;
  background: #020617;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.85);
  padding: 6px 0;
  display: none;
  z-index: 1000;
}

.nav-user-menu.nav-user-menu--open {
  display: block;
}

.nav-user-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: #e5e7eb;
  text-decoration: none;
}

.nav-user-menu a i {
  width: 16px;
}

.nav-user-menu a:hover {
  background: rgba(15, 23, 42, 0.9);
}

.nav-user-menu hr {
  border: none;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  margin: 4px 0;
}

.nav-user-menu__danger {
  color: #f97373;
}

/* ========== HERO (DESKTOP DEFAULT) ========== */

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 90px 20px 40px; /* top space for fixed navbar */
}

.hero__content {
  margin-left: 16px;
  flex: 1;
}

.hero__title {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.hero__subtitle {
  max-width: 520px;
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 24px;
}

.hero__image {
  margin-right: 40px;
  width: 420px;
  height: 420px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 24px 60px rgba(15, 23, 42, 0.9));
}

/* ========== SEARCH ========== */
.search__input {
  width: 100%;
  max-width: 430px;
  height: 45px;
  padding: 10px 44px 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  outline: none;
  background: radial-gradient(circle at top left, #111827, #020617)
    url("/images/search-icon.svg") no-repeat right 14px center;
  background-size: 18px;
  color: var(--white);
  font-size: 15px;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.75);
}

.search__input::placeholder {
  font-weight: 500;
  color: var(--muted);
  opacity: 1;
}

/* ========== CATEGORIES ========== */
.categories {
  display: flex;
  flex-wrap: wrap;
  max-width: 430px;
  gap: 10px;
  margin-top: 18px;
}

.category {
  background: rgba(37, 99, 235, 0.08);
  color: var(--white);
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  border: 1px solid rgba(129, 140, 248, 0.5);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: 0.18s;
  text-decoration: none;
}

.category i {
  font-size: 14px;
}

.category:hover {
  background: linear-gradient(135deg, var(--blurple), var(--blurple-soft));
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

/* =============== CARDS SECTION =============== */

.section {
  margin: auto;
  padding: 30px 20px;
}

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

.heading i {
  font-size: 24px;
  color: #f97316;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

/* =============== FOOTER =============== */

.footer {
  margin-top: 80px;
  background: #020617;
  padding: 55px 50px 30px;
  color: #e5e7eb;
  border-top: 1px solid rgba(15, 23, 42, 0.8);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
}

.footer-logo {
  height: 55px;
  border-radius: 50%;
}

.footer-brand h2 {
  font-size: 22px;
  color: #fff;
  margin-top: 10px;
}

.footer-text {
  font-size: 14px;
  margin-top: 8px;
  max-width: 260px;
  line-height: 1.5;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  gap: 40px;
}

.footer-links h4 {
  font-size: 15px;
  color: #fff;
  margin-bottom: 10px;
}

.footer-links a {
  display: block;
  color: #9ca3af;
  font-size: 14px;
  margin: 5px 0;
  text-decoration: none;
  transition: 0.2s;
}

.footer-links a:hover {
  color: #6366f1;
  text-decoration: underline;
}

.footer-social a {
  font-size: 22px;
  color: #9ca3af;
  margin-right: 14px;
  transition: 0.25s;
}

.footer-social a:hover {
  color: #6366f1;
  transform: scale(1.12);
}

.footer-divider {
  margin-top: 35px;
  border: none;
  height: 1px;
  background: #111827;
}

.footer-copy {
  text-align: center;
  margin-top: 22px;
  color: #6b7280;
  font-size: 14px;
}

@media (max-width: 900px) {
  .navbar__inner {
    max-width: 100%;
    padding: 8px 12px;
    gap: 10px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-right {
    position: fixed;
    inset: 56px 0 0 0;
    background: rgba(3, 7, 18, 0.98);
    padding: 24px 20px 40px;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
    flex: 0 0 auto;
  }

  .navbar.navbar--open .nav-right {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .nav-links__item--cta {
    margin-left: 0;
    margin-top: 10px;
  }

  .navbar__login-desktop {
    display: none;
  }

  .navbar__login-mobile {
    display: block;
  }

  .hero {
    padding-top: 88px;
    padding-left: 16px;
    padding-right: 16px;
    flex-direction: column;
    gap: 24px;
  }

  .hero__content {
    margin-left: 0;
    text-align: left;
  }

  .hero__title {
    font-size: 32px;
    line-height: 1.15;
  }

  .hero__subtitle {
    font-size: 14px;
  }

  .hero__image {
    width: 300px !important;
    height: 300px !important;
    margin: 6px auto 0;
    object-fit: contain;
  }

  .section {
    padding: 24px 16px;
  }
}

/* Extra compact for real mobile (<= 600px) */
@media (max-width: 600px) {
  .brand__text {
    display: none;
  }

  .nav-user__name {
    display: none;
  }

  .btn--primary {
    padding: 6px 12px;
    font-size: 13px;
  }

  .hero__image {
    display: none; /* mobile pe zyada clean */
  }

  .footer {
    padding: 40px 20px 24px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
    margin-top: 20px;
  }

  .footer-social {
    text-align: center;
    margin-top: 20px;
  }
}
