/* Shared Header Styles */
.site-header {
  background-color: var(--bg-white, var(--white, #ffffff));
  box-shadow: 0px 2px 8px 0px #f0f1f2;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo img {
  width: 59px;
  height: 36px;
  display: block;
}

.main-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  display: flex;
  align-items: center;
  height: 64px;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary, rgba(0, 0, 0, 0.85));
  position: relative;
  padding: 0 20px;
}

.main-nav a.active {
  font-weight: 600;
  color: var(--primary-color);
}

.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20px;
  right: 20px;
  height: 2px;
  background-color: var(--primary-color);
}

.auth-buttons {
  display: flex;
  align-items: center;
  gap: 16px;
}

.auth-buttons .btn {
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  line-height: 22px;
  padding: 0 8px;
  border-radius: 2px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
}

.auth-buttons .btn-login {
  background-color: var(--primary-color);
  color: var(--text-white, var(--white, #ffffff));
  min-width: 42px;
  height: 22px;
  border: none;
  box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.04);
}

.auth-buttons .btn-register {
  background-color: transparent;
  color: var(--text-primary, rgba(0, 0, 0, 0.85));
  border: 1px solid var(--border-color);
  box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.02);
}

@media (max-width: 1024px) {
  .main-nav {
    display: none; /* Hide nav on smaller screens, would need a hamburger menu */
  }
}

/* User Profile Dropdown Styles */
.user-profile-wrapper {
  position: relative;
  display: none; /* Hidden by default, show when logged in */
}

.user-profile-wrapper.show {
  display: block;
}

.user-profile-trigger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.user-profile-trigger img {
  width: 40px;
  height: 40px;
}

.user-profile-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 164px;
  background-color: var(--bg-white, var(--white, #ffffff));
  border: 0.5px solid var(--border-color, #d9d9d9);
  border-radius: 8px;
  box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.1);
  color: var(--text-primary, rgba(0, 0, 0, 0.85));
  text-align: center;
  z-index: 1000;
}

/* Dropdown visibility is controlled by JavaScript */

.dropdown-header {
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.dropdown-header img {
  width: 40px;
  height: 40px;
}

.dropdown-header span {
  font-family: 'Archivo', 'Roboto', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary, rgba(0, 0, 0, 0.85));
}

.dropdown-body a {
  display: block;
  padding: 14px 24px;
  border-top: 1px solid var(--border-color, #d9d9d9);
  font-family: 'Archivo', 'Roboto', sans-serif;
  font-size: 14px;
  color: var(--text-primary, rgba(0, 0, 0, 0.85));
  text-decoration: none;
}

.dropdown-body a:hover {
  background-color: #f5f7fa;
}

/* Login Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.15);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-overlay.show {
  display: flex;
}

.modal-content {
  width: 1000px;
  height: 660px;
  background-color: #fff;
  border-radius: 20px;
  display: flex;
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.modal-close {
  position: absolute;
  top: -25px;
  right: -25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.modal-close img {
  width: 36px;
  height: 36px;
}

.modal-promo {
  width: 320px;
  padding: 45px 30px;
  background-image: url('../images/login/dec53fbc4b2dbe9b78055db5151e67faf048de6c.png');
  background-size: cover;
  background-position: center;
  border-radius: 20px 0 0 20px;
  color: rgba(0,0,0,0.8);
  flex-shrink: 0;
}

.promo-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 150px;
}

.promo-header img {
  width: 59px;
  height: 36px;
}

.promo-header span {
  font-size: 16px;
  font-weight: 500;
}

.modal-promo h2 {
  font-size: 28px;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 30px;
  max-width: 260px;
}

.modal-promo ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.modal-promo li {
  font-size: 15px;
  margin-bottom: 12px;
}

.modal-form-container {
  flex: 1;
  padding: 60px 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
}

.login-sections-row {
  display: flex;
  flex-direction: row;
  gap: 28px;
  justify-content: center;
  align-items: flex-start;
}

.login-section {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.wechat-login-section {
  flex: 0 0 auto;
  width: 180px;
  align-items: center;
  margin-left: auto;
}

.login-section-title {
  font-size: 16px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
  margin: 0 0 22px 0;
}

.wechat-login-section .login-section-title {
  text-align: center;
  width: 100%;
}

.form-tabs {
  display: none;
}

.tab-btn {
  display: none;
}

.form-content {
  display: none;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.verification-code-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.verification-code-row .input-group {
  flex: 1;
}

.verification-code-row .btn-get-code {
  flex-shrink: 0;
  margin: 0;
}

.input-group {
  display: flex;
  align-items: center;
  border: 1px solid #d9d9d9;
  border-radius: 2px;
  padding: 0 12px;
  height: 40px;
}

.input-group .input-icon {
  width: 16px;
  height: 16px;
  margin-right: 4px;
}

.input-group input {
  border: none;
  outline: none;
  flex-grow: 1;
  font-size: 16px;
  line-height: 1.5;
}

.input-group input::placeholder {
  color: rgba(0, 0, 0, 0.25);
}

.btn-get-code {
  height: 40px;
  background-color: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 2px;
  color: #1890ff;
  font-size: 14px;
  cursor: pointer;
  padding: 0 16px;
  white-space: nowrap;
}

.btn-submit {
  height: 40px;
  background-color: #1890ff;
  color: white;
  border: 1px solid #1890ff;
  border-radius: 2px;
  font-size: 16px;
  cursor: pointer;
}

.qr-login-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 0;
  flex-grow: 1;
}

.qr-code-container {
  position: relative;
  width: 154px;
  height: 154px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.qr-code-container .qr-bg-box {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 1px solid #d9d9d9;
  border-radius: 2px;
  z-index: 1;
  overflow: visible;
}

.qr-code-container .qr-img {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 102px;
  height: 105px;
  z-index: 2;
}

.qr-code-container p {
  color: rgba(0, 0, 0, 0.45) !important;
  font-size: 13px !important;
  margin: 0 !important;
  padding: 0 !important;
  position: absolute !important;
  bottom: 8px !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  text-align: center !important;
  z-index: 999 !important;
  pointer-events: none !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  line-height: 1.5 !important;
  background: transparent !important;
  white-space: nowrap !important;
  font-weight: normal !important;
}

.qr-login-form > p {
  display: none;
}

.form-terms {
  font-size: 14px;
  color: #404040;
  text-align: left;
  margin-top: 0;
  padding-top: 0;
  margin-bottom: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 0;
}

.form-terms a {
  color: #1890ff;
}

