* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif;
}

body {
  color: #e5e7eb;
  background: transparent;
  min-height: 100vh;
  padding-top: 100px;
}


.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 14px 32px;
  margin: 12px;
  border-radius: 18px;

  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  box-shadow: 0 8px 30px rgba(0,0,0,0.08);

  animation: navFade 0.6s ease forwards;
}


.nav-right {
  display: flex;
  align-items: center;
  gap: 30px;
}

.logo {
  font-weight: 700;
  font-size: 1.2rem;
}

.menu a {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  color: #f8fafc;
  padding: 6px 2px;
  transition: color 0.25s ease;
}


.nav-left a {
  text-decoration: none;
  font-size: 0.9rem;
  margin-right: 14px;
}

.nav-left .login {
  color: #111;
}

.nav-left .register {
  padding: 8px 16px;
  border: 1px solid #111;
  border-radius: 6px;
  color: #111;
}


.logo {
  font-weight: 700;
  font-size: 1.2rem;
}

nav a {
  margin-left: 20px;
  text-decoration: none;
  color: inherit;
  font-size: 0.95rem;
}

nav .btn {
  padding: 8px 16px;
  border: 1px solid #111;
  border-radius: 6px;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: calc(100vh - 80px);
  text-align: center;
  padding: 20px;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.hero p {
  font-size: 1.1rem;
  max-width: 500px;
  margin-bottom: 24px;
  color: #444;
}

.cta {
  padding: 12px 28px;
  font-size: 1rem;
  border: none;
  background: #111;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s forwards;
}

.delay { animation-delay: 0.3s; }
.delay2 { animation-delay: 0.6s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}



  nav a {
    margin-left: 10px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }


  .nav-right {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

.menu {
  display: flex;
  gap: 18px;
}

.menu a {
  position: relative;
  padding: 6px 4px;
  font-size: 0.9rem;
  color: #222;
  font-weight: 500;
  transition: color 0.25s ease;
}

.menu a::after {
  content: "";
  position: absolute;
  bottom: -6px;
  right: 0;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #111, #666);
  transition: width 0.3s ease;
}

.menu a:hover {
  color: #000;
}

.menu a:hover::after {
  width: 100%;
  left: 0;
}


.nav-left .login {
  position: relative;
  transition: opacity 0.3s ease;
}

.nav-left .login:hover {
  opacity: 0.6;
}

.nav-left .register {
  transition: all 0.3s ease;
}

.nav-left .register:hover {
  background: #111;
  color: #fff;
}
.menu a {
  font-weight: 500;
  letter-spacing: 0.2px;
}
.navbar {
  animation: navFade 0.8s ease forwards;
}

@keyframes navFade {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.nav-left {
  display: flex;
  gap: 12px;
}

.btn-login {
  background: transparent;
  border: 1px solid #ccc;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-login:hover {
  border-color: #111;
  color: #111;
}

.btn-signup {
  background: #111;
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-signup:hover {
  background: #000;
  transform: translateY(-1px);
}
button:active {
  transform: scale(0.97);
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 999;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: #fff;
  width: 100%;
  max-width: 380px;
  padding: 30px;
  border-radius: 14px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal h2 {
  margin-bottom: 20px;
  font-size: 1.4rem;
}

.modal input {
  width: 100%;
  padding: 12px;
  margin-bottom: 14px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 0.9rem;
}

.modal input:focus {
  outline: none;
  border-color: #111;
}

.modal-btn {
  width: 100%;
  padding: 12px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
}

.modal-btn:hover {
  background: #000;
}

.close-btn {
  position: absolute;
  top: 14px;
  left: 14px;
  border: none;
  background: none;
  font-size: 1.4rem;
  cursor: pointer;
}

.switch {
  margin-top: 16px;
  font-size: 0.85rem;
  color: #555;
}

.switch span {
  color: #111;
  cursor: pointer;
  font-weight: 500;
}
.auth {
  display: none;
}

.auth.active {
  display: block;
}

.signup input {
  background: #fafafa;
}

.checkbox {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  margin-bottom: 14px;
  color: #444;
}

.checkbox input {
  margin-left: 8px;
}
.error {
  display: block;
  font-size: 0.75rem;
  color: #c0392b;
  margin-bottom: 8px;
  min-height: 14px;
}

input.error-input {
  border-color: #c0392b;
}

.modal-btn.loading {
  pointer-events: none;
  opacity: 0.6;
}
.modal-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.password-strength {
  width: 100%;
  height: 6px;
  background: #eee;
  border-radius: 4px;
  margin-bottom: 14px;
  overflow: hidden;
}

.strength-bar {
  height: 100%;
  width: 0%;
  background: red;
  transition: width 0.3s ease, background 0.3s ease;
}
.user-area {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* مخفی کردن با کلاس hidden */
.hidden {
  display: none;
}

.profile-wrapper {
  cursor: pointer;
  user-select: none;
  position: relative;
  font-family: Vazir, sans-serif;
}

.profile-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #222;
  padding: 5px 10px;
  border-radius: 25px;
  color: white;
  width: max-content;
  transition: background 0.3s;
}

.profile-summary:hover {
  background: #333;
}

.profile-pic {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.arrow {
  font-size: 14px;
  transition: transform 0.3s ease;
}

/* وقتی بازه */
.profile-wrapper.open .arrow {
  transform: rotate(180deg);
}

.profile-details {
  position: absolute;
  top: 100%;
  right: 0;
  background: #111;
  border-radius: 8px;
  padding: 15px;
  margin-top: 10px;
  width: 250px;
  box-shadow: 0 8px 15px rgba(0,0,0,0.5);
  color: white;

  /* انیمیشن قطره آب */
  transform-origin: top center;
  animation: dropIn 0.4s ease forwards;
  opacity: 0;
}

.profile-wrapper.open .profile-details {
  display: block;
  opacity: 1;
  animation-play-state: running;
}

/* انیمیشن قطره آب */
@keyframes dropIn {
  0% {
    transform: scaleY(0);
    opacity: 0;
  }
  80% {
    transform: scaleY(1.1);
    opacity: 1;
  }
  100% {
    transform: scaleY(1);
  }
}

table {
  width: 100%;
  border-collapse: collapse;
}

td {
  padding: 6px 8px;
  font-size: 13px;
}

input {
  width: 100%;
  padding: 5px;
  border-radius: 4px;
  border: none;
  background: #222;
  color: white;
}

.profile-details button {
  width: 100%;
}


button:hover {
  background: #27ae60;
}

button#logoutBtn {
  background: #e74c3c;
  margin-top: 6px;
}

button#logoutBtn:hover {
  background: #c0392b;
}

.profile-details {
  display: none;
  opacity: 0;
}

.profile-wrapper.open .profile-details {
  display: block;
  animation: dropIn 0.4s ease forwards;
}

#bg {
  position: fixed;
  top: 0;
  left: 0;
  inset: 0;
  z-index: -1;
  background: #050505;
}

/* ===== MOBILE FIX ===== */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: inherit;
  cursor: pointer;
}

/* موبایل */
@media (max-width: 768px) {
  .navbar {
    padding: 15px 20px;
  }

  .menu-toggle {
    display: block;
  }

  .menu {
    position: absolute;
    top: 70px;
    right: 20px;
    background: rgba(20,20,20,0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px;
    display: none;
    flex-direction: column;
    gap: 14px;
    z-index: 999;
  }

  .menu a {
    color: #f9fafb;
    font-size: 0.95rem;
  }

  .menu.show {
    display: flex;
    animation: dropIn 0.35s ease forwards;
  }

  .nav-left {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
  }

  .btn-login,
  .btn-signup {
    width: 100%;
    padding: 10px;
    font-size: 0.95rem;
  }

  .hero {
    height: auto;
    padding: 60px 20px;
  }

  .hero h1 {
    font-size: 1.7rem;
    line-height: 1.4;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .cta {
    width: 100%;
    max-width: 280px;
  }
}
.cart-icon {
  position: relative;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 6px;
  border-radius: 10px;
  transition: background 0.25s ease;
}

.cart-icon:hover {
  background: rgba(0,0,0,0.05);
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #e74c3c;
  color: white;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 999px;
}


