/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #0f1724, #1e293b);
  color: #e6eef6;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
}

a {
  color: #00d1ff;
  text-decoration: none;
  transition: color 0.3s ease;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ===== HEADER ===== */
.header {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 209, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #00d1ff;
  text-shadow: 0 0 10px rgba(0, 209, 255, 0.5);
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo img {
  border-radius: 50%;
  border: 2px solid #00d1ff;
  box-shadow: 0 0 15px rgba(0, 209, 255, 0.5);
  transition: box-shadow 0.3s ease;
}

.logo img:hover {
  box-shadow: 0 0 25px rgba(0, 209, 255, 0.8);
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
}

.nav-list li {
  position: relative;
}

.nav-list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-list a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 209, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.nav-list a:hover::before {
  left: 100%;
}

.nav-list a:hover {
  background: rgba(0, 209, 255, 0.1);
  color: #00d1ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 209, 255, 0.3);
}

.nav-icon {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.3s ease;
}

.nav-list a:hover .nav-icon {
  transform: scale(1.1);
}

.cart-btn {
  background: linear-gradient(135deg, #0b57a4, #00d1ff);
  border: none;
  color: #e6eef6;
  padding: 0.75rem;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 209, 255, 0.3);

}

.cart-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 25px rgba(0, 209, 255, 0.5);
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff4757;
  color: #ffffff;
  border-radius: 50%;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 1.25rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  color: #e6eef6;
  cursor: pointer;
  padding: 0.5rem;
  transition: transform 0.3s ease;
}

.hamburger span {
  width: 24px;
  height: 3px;
  background: #00d1ff;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== MINI CART ===== */
.mini-cart {
  position: fixed;
  top: 0;
  right: -400px;
  width: 380px;
  height: 100vh;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(25px);
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
  padding: 2rem 1rem;
  overflow-y: auto;
  border-left: 1px solid rgba(0, 209, 255, 0.3);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.mini-cart.active {
  right: 0;
}

.mini-cart-content h3 {
  color: #00d1ff;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  text-align: center;
}

.cart-items {
  margin: 1.5rem 0;
  max-height: 50vh;
  overflow-y: auto;
}

.cart-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(230, 238, 246, 0.2);
  transition: transform 0.2s ease;
}

.cart-item:hover {
  transform: translateX(-5px);
}

.cart-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid rgba(0, 209, 255, 0.3);
}

.cart-item p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
}

.remove-btn {
  background: #ff4757;
  color: white;
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background 0.3s ease;
}

.remove-btn:hover {
  background: #ff3742;
}

.cart-total {
  margin: 2rem 0;
  font-size: 1.3rem;
  text-align: center;
  color: #00d1ff;
  font-weight: 700;
}

/* ===== CHAT FAB ===== */
.chat-fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 4rem;
  height: 4rem;
  background: linear-gradient(135deg, #0b57a4, #00d1ff);
  color: #e6eef6;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(0, 209, 255, 0.5);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.chat-fab:hover {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 12px 35px rgba(0, 209, 255, 0.7);
}

.chat-fab:active {
  transform: scale(0.95);
}

/* ===== CHAT MODAL ===== */
.chat-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-modal.active {
  opacity: 1;
  visibility: visible;
}

.chat-modal-content {
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(25px);
  border-radius: 20px;
  padding: 0;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  border: 1px solid rgba(0, 209, 255, 0.4);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-modal.active .chat-modal-content {
  transform: scale(1) translateY(0);
}

.chat-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(0, 209, 255, 0.3);
  background: rgba(0, 209, 255, 0.05);
}

.chat-modal-header h3 {
  color: #00d1ff;
  margin: 0;
  font-size: 1.5rem;
}

.chat-close {
  background: none;
  border: none;
  color: #00d1ff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-close:hover {
  background: rgba(0, 209, 255, 0.2);
  transform: rotate(90deg);
}

.chat-modal-body {
  padding: 2rem;
  max-height: calc(80vh - 80px);
  overflow-y: auto;
}

.chat-modal-body input, .chat-modal-body textarea {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: 2px solid rgba(0, 209, 255, 0.3);
  border-radius: 12px;
  background: rgba(230, 238, 246, 0.1);
  color: #e6eef6;
  font-size: 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.chat-modal-body input:focus, .chat-modal-body textarea:focus {
  outline: none;
  border-color: #00d1ff;
  box-shadow: 0 0 0 3px rgba(0, 209, 255, 0.2);
  transform: scale(1.02);
}

.chat-thread {
  height: 300px;
  overflow-y: auto;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  border: 1px solid rgba(0, 209, 255, 0.2);
}

.chat-input {
  display: flex;
  gap: 1rem;
}

.chat-input textarea {
  flex: 1;
  resize: vertical;
  min-height: 60px;
}

/* ===== CHAT MESSAGES ===== */
.message {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 12px;
  max-width: 80%;
  word-wrap: break-word;
}

.message.client {
  background: rgba(0, 209, 255, 0.1);
  margin-left: auto;
  text-align: right;
}

.message.admin {
  background: rgba(255, 255, 255, 0.1);
  margin-right: auto;
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  opacity: 0.8;
}

.message-body {
  word-wrap: break-word;
}

.message-time {
  font-size: 0.7rem;
}

/* ===== LOGIN PAGE SPECIFIC STYLES ===== */

/* ===== MAIN LAYOUT ===== */
.login-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  min-height: calc(100vh - 40px);
  margin-top: 100px;
}

/* ===== MODAL OVERLAY ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(25px);
  border: 1px solid rgba(0, 209, 255, 0.4);
  border-radius: 20px;
  padding: 2rem;
  max-width: 450px;
  width: 90%;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s ease;
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal h2 {
  color: #00d1ff;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  text-align: center;
}

.modal p {
  color: rgba(230, 238, 246, 0.8);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  text-align: center;
  font-size: 0.9rem;
}

.modal .auth-input {
  margin-bottom: 1rem;
}

/* ===== AUTH CARD ===== */
.auth-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 209, 255, 0.3);
  border-radius: 20px;
  padding: 2rem;
  width: 100%;
  max-width: 440px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 209, 255, 0.05), transparent);
  transition: left 0.6s ease;
}

.auth-card:hover::before {
  left: 100%;
}

.auth-card h1 {
  color: #00d1ff;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  position: relative;
  z-index: 2;
}

.auth-input {
  width: 100%;
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
  border: 2px solid rgba(0, 209, 255, 0.3);
  border-radius: 12px;
  background: rgba(230, 238, 246, 0.1);
  color: #e6eef6;
  font-size: 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 2;
}

.auth-input:focus {
  outline: none;
  border-color: #00d1ff;
  box-shadow: 0 0 0 3px rgba(0, 209, 255, 0.2);
  transform: scale(1.02);
}

.auth-input::placeholder {
  color: rgba(230, 238, 246, 0.6);
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: linear-gradient(135deg, #0b57a4, #00d1ff);
  color: #e6eef6;
  border: none;
  padding: 1rem 2rem;
  border-radius: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0, 209, 255, 0.3);
  position: relative;
  overflow: hidden;
  font-size: 1rem;
  width: 100%;
  margin-top: 0.5rem;
  position: relative;
  z-index: 2;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 209, 255, 0.6);
}

.btn-secondary {
  background: rgba(230, 238, 246, 0.1);
  color: #e6eef6;
  border: 2px solid rgba(0, 209, 255, 0.3);
  padding: 1rem 2rem;
  border-radius: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  font-size: 1rem;
  width: 100%;
  margin-top: 0.5rem;
  position: relative;
  z-index: 2;
}

.btn-secondary:hover {
  background: rgba(0, 209, 255, 0.2);
  border-color: #00d1ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 209, 255, 0.3);
}

/* ===== LINKS ===== */
.auth-card a {
  color: #00d1ff;
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
  z-index: 2;
}

.auth-card a:hover {
  color: #e6eef6;
  text-decoration: underline;
}

.auth-card p {
  color: rgba(230, 238, 246, 0.8);
  margin-top: 1rem;
  position: relative;
  z-index: 2;
}

/* ===== DIVIDER ===== */
.auth-card hr {
  border: none;
  border-top: 1px solid rgba(0, 209, 255, 0.3);
  margin: 1.5rem 0;
  position: relative;
  z-index: 2;
}

/* ===== ANIMATIONS ===== */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-overlay.active .modal {
  animation: modalFadeIn 0.3s ease forwards;
}

/* ===== FOCUS STATES ===== */
.auth-input:focus,
.btn-primary:focus,
.btn-secondary:focus {
  outline: 2px solid #00d1ff;
  outline-offset: 2px;
}

/* ===== LOADING STATE ===== */
.btn-primary.loading {
  pointer-events: none;
  position: relative;
}

.btn-primary.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  margin: auto;
  border: 2px solid transparent;
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 2rem;
    border-radius: 0 0 20px 20px;
    border: 1px solid rgba(0, 209, 255, 0.3);
    border-top: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .nav-list.active {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  .auth-card {
    padding: 1.5rem;
    margin: 1rem;
  }

  .modal {
    padding: 1.5rem;
    margin: 1rem;
  }

  .auth-card h1 {
    font-size: 1.5rem;
  }

  .modal h2 {
    font-size: 1.25rem;
  }
}
