/* Register Page Styles */
body.register-page {
  background-image: url('/kky/system/img/login/bg1-b7bdb68747fa7e0b53e8c4a9a5a7015f.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* 桌面端隐藏移动菜单内容和按钮 */
.mobile-menu-btn {
  display: none;
}

.mobile-menu .mobile-menu-content {
  display: none;
}

/* Override header styles for register page */
body.register-page .header {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

body.register-page .site-title {
  color: var(--text-color);
}

body.register-page .department-text {
  color: var(--text-muted);
}

body.register-page .department-icon {
  color: var(--text-muted);
}

body.register-page .phone-number {
  color: var(--text-color);
}

body.register-page .phone-icon {
  color: var(--text-color);
}

body.register-page .phone-link {
  color: var(--text-color);
}

body.register-page .phone-link:hover {
  color: var(--primary-color);
}

body.register-page .work-time {
  color: var(--text-muted);
}

/* 导航在白色背景上的深色样式 */
body.register-page .location-icon {
  color: #1f2937;
}

body.register-page .region-display {
  color: #1f2937;
}

body.register-page .dropdown-arrow-icon {
  color: #1f2937;
}

body.register-page .website-select-wrapper:hover {
  background-color: rgba(59, 146, 246, 0.1);
}

body.register-page .website-select-wrapper:hover .location-icon,
body.register-page .website-select-wrapper:hover .region-display,
body.register-page .website-select-wrapper:hover .dropdown-arrow-icon {
  color: #3B92F6;
}

body.register-page .visit-website-btn {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  color: #3B92F6;
  border: 1px solid #e5e7eb;
}

body.register-page .visit-website-btn:hover {
  background-color: rgba(255, 255, 255, 1);
  color: #2563eb;
  border-color: #3B92F6;
}

body.register-page .visit-website-btn .external-link-icon {
  color: #3B92F6;
}

body.register-page .guide-btn {
  color: #1f2937;
}

body.register-page .guide-btn:hover {
  background-color: rgba(66, 136, 255, 0.1);
  color: #3B92F6;
}

body.register-page .guide-btn .guide-icon {
  color: #1f2937;
}

body.register-page .guide-btn:hover .guide-icon {
  color: #3B92F6;
}


.register-main {
  height: 100vh;
  padding-top: 5rem;
  position: relative;
  overflow: hidden;
}

@media (max-width: 768px) {
  .register-main {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Register Type Selection Section */
.register-type-section {
  padding: 1.5rem 2rem;
  height: calc(100vh - 5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

@media (max-width: 768px) {
  .register-type-section {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    align-items: flex-start;
    padding-top: 2rem;
  }
}

.register-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.register-types-wrapper {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
  width: 100%;
}

.register-header-text {
  text-align: left;
}

.register-title-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.register-title-wrapper .back-btn {
  align-self: flex-start;
}

.register-title-wrapper .register-title {
  width: 100%;
}

.register-header-text .back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(229, 231, 235, 0.5);
  border-radius: 0;
  color: var(--text-color);
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
}

.register-header-text .back-btn:hover {
  background: rgba(255, 255, 255, 1);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateX(-2px);
}

.register-header-text .back-btn svg {
  width: 1rem;
  height: 1rem;
}

.register-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.register-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
}

.register-types-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.register-type-card {
  background: linear-gradient(193deg, #b6e0fd 0%, rgba(182, 224, 253, 0.0) 43.59%), rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(16px);
  border: 2px solid var(--white);
  border-radius: 0;
  padding: 1.5rem 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 20px 64px rgba(66, 136, 255, 0.15);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 180px;
}

.register-type-card:hover {
  background: linear-gradient(193deg, rgba(66, 136, 255, 0.1) 0%, rgba(182, 224, 253, 0.0) 43.59%), rgba(255, 255, 255, 0.9);
  border-color: rgba(66, 136, 255, 0.3);
  box-shadow: 0 20px 64px rgba(66, 136, 255, 0.3);
  transform: translateY(-4px);
}

.card-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.register-type-card:hover .card-icon {
  transform: scale(1.1);
  color: var(--primary-color);
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.card-description {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 1rem;
}

.card-register-btn {
  width: 100%;
  padding: 0.625rem 1.5rem;
  background-color: transparent;
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 0;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.register-type-card:hover .card-register-btn {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(66, 136, 255, 0.3);
}

.register-type-card:hover .card-register-btn .arrow-icon {
  transform: translateX(4px);
}

.card-register-btn .arrow-icon {
  width: 1rem;
  height: 1rem;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.register-footer {
  text-align: left;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid rgba(229, 231, 235, 0.5);
}

/* 桌面端：显示footer中的登录链接，隐藏标题中的 */
.mobile-login-link {
  display: none;
}

.desktop-login-link {
  display: block;
}

.login-link-text {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.login-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.login-link:hover {
  color: #5a9cff;
  text-decoration: underline;
}

/* Register Form Section */
.register-form-section {
  padding: 4rem 2rem;
  min-height: calc(100vh - 5rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.register-form-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.register-form-header {
  margin-bottom: 2rem;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 0;
  color: var(--text-color);
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
}

.back-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background-color: rgba(66, 136, 255, 0.05);
}

.back-btn svg {
  width: 1rem;
  height: 1rem;
}

.form-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.form-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
}

.register-form-wrapper {
  background: linear-gradient(193deg, #b6e0fd 0%, rgba(182, 224, 253, 0.0) 43.59%), rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(16px);
  border: 2px solid var(--white);
  border-radius: 0;
  border-top: 3px solid var(--primary-color);
  padding: 3rem;
  box-shadow: 0 20px 64px rgba(66, 136, 255, 0.15);
  position: relative;
}

.register-form-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: linear-gradient(180deg, rgba(66, 136, 255, 0.5) 0%, rgba(66, 136, 255, 0) 100%);
  pointer-events: none;
  z-index: 1;
}

.register-form {
  position: relative;
  z-index: 2;
}

.form-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 500;
  color: var(--text-color);
  font-size: 0.875rem;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 0.75rem;
  z-index: 1;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.input-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.input-wrapper:hover .input-icon,
.input-wrapper:focus-within .input-icon {
  color: var(--primary-color);
}

.input-wrapper input,
.input-wrapper select,
.input-wrapper textarea {
  width: 100%;
  padding: 0.75rem 0.75rem 0.75rem 2.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  background-color: var(--white);
  font-family: inherit;
}

.input-wrapper textarea {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  min-height: 100px;
  resize: vertical;
}

.input-wrapper input:focus,
.input-wrapper select:focus,
.input-wrapper textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: var(--white);
  box-shadow: 0 0 0 3px rgba(66, 136, 255, 0.1);
}

.input-wrapper.error input,
.input-wrapper.error select,
.input-wrapper.error textarea {
  border-color: #ef4444;
  background-color: #fef2f2;
}

.error-message {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  opacity: 0;
  transform: translateY(-5px);
  transition: all 0.3s ease;
  height: 0;
  overflow: hidden;
}

.error-message.show {
  opacity: 1;
  transform: translateY(0);
  height: auto;
  margin-top: 0.5rem;
}

.error-message::before {
  content: "⚠";
  font-size: 0.75rem;
  color: #ef4444;
  margin-right: 0.25rem;
}

.form-placeholder {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 0;
}

.form-actions {
  margin-top: 2rem;
}

.submit-btn {
  width: 100%;
  height: 46px;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 0;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.submit-btn:hover {
  background-color: #5a9cff;
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(66, 136, 255, 0.25);
}

.form-footer-text {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.form-footer-text .link {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.form-footer-text .link:hover {
  color: #5a9cff;
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .register-types-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .register-header-text {
    text-align: left;
  }

  .register-types-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .register-footer {
    text-align: center;
    border-top: none;
    margin-top: 1rem;
    padding-top: 1rem;
  }
}

@media (max-width: 768px) {
  /* 隐藏移动端右上角电话号码 */
  .header-right .phone-link {
    display: none !important;
  }

  .header-right .phone-number {
    display: none !important;
  }

  .header-right .phone-icon {
    display: none !important;
  }

  /* 隐藏移动端菜单内容 */
  .mobile-menu .mobile-menu-content {
    display: none !important;
  }

  .register-main {
    padding-top: 4.5rem;
    height: auto;
    min-height: 100vh;
  }

  .register-type-section {
    padding: 1.5rem 1rem;
    height: auto;
    min-height: calc(100vh - 4.5rem);
  }

  .register-container {
    height: auto;
  }

  .register-types-wrapper {
    gap: 1.5rem;
  }

  .register-header-text {
    margin-bottom: 1rem;
  }

  .register-header-text .back-btn {
    font-size: 0.875rem;
    padding: 0.5rem;
    margin-bottom: 0;
    min-height: 44px;
    min-width: 44px;
    justify-content: center;
    -webkit-tap-highlight-color: rgba(66, 136, 255, 0.1);
  }

  .register-header-text .back-btn span {
    display: none;
  }

  .register-header-text .back-btn svg {
    width: 1.25rem;
    height: 1.25rem;
  }

  /* 移动端：隐藏footer中的登录链接，显示标题中的 */
  .desktop-login-link {
    display: none;
  }

  .mobile-login-link .login-link {
    color: var(--primary-color);
    text-decoration: none;
    margin-left: 0.25rem;
    transition: color 0.3s ease;
  }

  .mobile-login-link .login-link:hover {
    color: #5a9cff;
    text-decoration: underline;
  }

  .register-title-wrapper {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: nowrap;
    width: 100%;
  }

  .register-title-wrapper .back-btn {
    align-self: center;
    flex-shrink: 0;
  }

  .register-title-wrapper .register-title {
    width: auto;
    flex: 0 1 auto;
    min-width: 0;
  }

  .register-title {
    font-size: 1.5rem;
    margin-bottom: 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-login-link {
    display: block !important;
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
  }

  .register-subtitle {
    margin-top: 0;
    margin-left: calc(44px + 0.5rem);
  }

  .register-subtitle {
    font-size: 0.9375rem;
    line-height: 1.5;
  }

  .register-types-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
  }

  .register-type-card {
    padding: 1.5rem 1.25rem;
    min-height: auto;
    -webkit-tap-highlight-color: rgba(66, 136, 255, 0.1);
  }

  .register-type-card:active {
    transform: translateY(0);
  }

  .card-icon {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.875rem;
  }

  .card-title {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
  }

  .card-description {
    font-size: 0.875rem;
    white-space: normal;
    text-overflow: clip;
    overflow: visible;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .card-register-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .register-form-section {
    padding: 1.5rem 1rem;
    min-height: auto;
  }

  .register-form-wrapper {
    padding: 1.5rem 1.25rem;
  }

  .form-title {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  .form-subtitle {
    font-size: 0.9375rem;
    line-height: 1.5;
  }

  .form-content {
    gap: 1.25rem;
  }

  .form-group {
    gap: 0.5rem;
  }

  .input-wrapper input,
  .input-wrapper select,
  .input-wrapper textarea {
    padding: 0.875rem 0.875rem 0.875rem 2.5rem;
    font-size: 16px; /* 防止iOS自动缩放 */
    -webkit-appearance: none;
    border-radius: 0;
    touch-action: manipulation;
  }

  .input-wrapper select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
  }

  .submit-btn {
    min-height: 48px;
    font-size: 1rem;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .back-btn {
    -webkit-tap-highlight-color: rgba(66, 136, 255, 0.1);
    touch-action: manipulation;
  }
}

@media (max-width: 480px) {
  .register-main {
    padding-top: 4rem;
  }

  .register-type-section,
  .register-form-section {
    padding: 1.25rem 0.875rem;
  }

  .register-header-text {
    margin-bottom: 0.75rem;
  }

  .register-title-wrapper {
    gap: 0.375rem !important;
    margin-bottom: 0.5rem;
    flex-wrap: nowrap !important;
    flex-direction: row !important;
  }

  .register-header-text .back-btn {
    padding: 0.5rem;
    font-size: 0.8125rem;
    min-height: 44px;
    min-width: 44px;
    flex-shrink: 0;
  }

  .register-title-wrapper .register-title {
    width: auto;
  }

  .register-title {
    font-size: 1.25rem;
    line-height: 1.3;
    margin-bottom: 0;
    flex: 0 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-login-link {
    font-size: 0.6875rem !important;
    flex-shrink: 0;
    display: block !important;
  }

  .register-subtitle {
    margin-left: calc(44px + 0.5rem);
    font-size: 0.875rem;
    line-height: 1.5;
  }

  .register-types-grid {
    gap: 0.875rem;
  }

  .register-type-card {
    padding: 1.25rem 1rem;
  }

  .card-icon {
    width: 2.25rem;
    height: 2.25rem;
    margin-bottom: 0.75rem;
  }

  .card-title {
    font-size: 1rem;
    line-height: 1.4;
  }

  .card-description {
    font-size: 0.8125rem;
    margin-bottom: 0.875rem;
    line-height: 1.5;
  }

  .card-register-btn {
    padding: 0.5625rem 1rem;
    font-size: 0.8125rem;
    min-height: 44px;
  }

  .register-form-wrapper {
    padding: 1.25rem 1rem;
  }

  .form-title {
    font-size: 1.375rem;
    line-height: 1.3;
  }

  .form-subtitle {
    font-size: 0.875rem;
    line-height: 1.5;
  }

  .input-wrapper input,
  .input-wrapper select,
  .input-wrapper textarea {
    padding: 0.8125rem 0.8125rem 0.8125rem 2.375rem;
    font-size: 16px;
  }

  .input-icon {
    left: 0.625rem;
  }

  .input-icon svg {
    width: 1.125rem;
    height: 1.125rem;
  }

  .submit-btn {
    min-height: 48px;
    font-size: 0.9375rem;
  }

  .form-footer-text {
    font-size: 0.8125rem;
  }

  .register-footer {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
  }

  .login-link-text {
    font-size: 0.8125rem;
  }
}
