/**
 * 管理后台样式文件
 * WebNav Link Admin CSS
 * 
 * 文件结构：
 * 1. 基础样式重置
 * 2. 布局容器
 * 3. 左侧栏
 * 4. 导航栏
 * 5. 内容区域
 * 6. 个人信息卡片
 * 7. 联系方式
 * 8. 页面模块
 * 9. 链接模块卡片
 * 10. 右侧预览区
 * 11. 模态框
 * 12. 工具类
 * 13. 响应式样式
 */

/* ==================== 1. 基础样式重置 ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f5f5f5;
  height: 100vh;
  overflow: hidden;
}

body.modal-open {
  overflow: hidden;
}

/* ==================== 2. 布局容器 ==================== */
.admin-container {
  display: flex;
  height: 100vh;
  width: 100%;
}

.content-area {
  flex: 1;
  background-color: #f5f5f5;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}

.content-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ==================== 3. 左侧栏 ==================== */
.content-sidebar {
  width: 80px;
  background-color: #ffffff;
  border-right: 1px solid #e0e0e0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  gap: 30px;
}

.sidebar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.sidebar-item:hover {
  opacity: 0.7;
}

.sidebar-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #7c3aed;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.sidebar-text {
  font-size: 12px;
  color: #333333;
  text-align: center;
}

.sidebar-brand-text {
  display: none;
}

/* ==================== 4. 导航栏 ==================== */
.content-navbar {
  height: 65px;
  background-color: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0;
}

.navbar-items {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  padding-left: 24px;
  width: 570px;
}

.navbar-item {
  font-size: 14px;
  color: #8a8a8a;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  position: relative;
  padding: 6px 10px;
  border-radius: 4px;
  transition: background-color 0.2s, color 0.2s, font-weight 0.2s;
}

.navbar-item.active {
  color: #000000;
  font-weight: 900;
  font-size: 16px;
}

.navbar-text {
  display: inline-block;
}

.navbar-underline {
  width: 100%;
  margin-top: 2px;
  display: none;
}

.navbar-item.active .navbar-underline {
  display: block;
}

.navbar-underline::after {
  content: '';
  display: block;
  width: 30px;
  height: 4px;
  border-radius: 10px;
  background-color: #7c3aed;
  margin: auto;
}

.navbar-line {
  display: none;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 20px;
  height: 3px;
  background-color: #7c3aed;
  border-radius: 2px;
  transition: transform 0.3s ease;
  transform-origin: center;
}

/* ==================== 5. 内容区域 ==================== */
.content-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  background: #f3f3f4;
}

.content-wrapper {
  position: relative;
  background: #f3f3f4;
  max-width: 704px;
  margin: 0 auto;
  padding-bottom: 20px;
}

.section-title {
  padding-top: 26px;
  padding-left: 4%;
  padding-right: 4%;
  font-weight: bold;
  font-size: 16px;
  color: #333;
}

/* ==================== 6. 个人信息卡片 ==================== */
.personal-info-card {
  background: white;
  padding: 10px;
  box-sizing: border-box;
  margin: 10px 4%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  border-radius: 10px;
}

.avatar-section {
  width: 104px;
  margin-right: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
}

/* 上传组件样式 */
.van-uploader {
  width: 100%;
}

.van-uploader__wrapper {
  width: 100%;
}

.van-uploader__input-wrapper {
  position: relative;
  width: 100%;
}

.van-uploader__input-wrapper:hover .upload-preview {
  border-color: #7c3aed;
  background-color: #f5f0ff;
}

.van-uploader__input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.van-uploader:first-child .van-uploader__input {
  width: 100px;
  height: 100px;
}

.upload-preview {
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid #ebedf0;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}

.upload-preview:hover,
.van-image.upload-preview:hover,
.upload-preview.van-image:hover {
  border-color: #7c3aed;
  background-color: #f5f0ff;
}

.upload-preview:empty::before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
}

.upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.van-image {
  width: 100px;
  height: 100px;
}

.van-image__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.upload-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #8a8a8a;
  font-size: 12px;
  pointer-events: none;
  z-index: 0;
}

.upload-hint span {
  font-size: 11px;
  white-space: nowrap;
}

.upload-icon {
  width: 20px;
  height: 20px;
  opacity: 0.6;
}

.upload-preview-small .upload-hint {
  gap: 4px;
}

.upload-preview-small .upload-icon {
  width: 16px;
  height: 16px;
}

.upload-preview-small .upload-hint span {
  font-size: 10px;
}

.upload-preview:has(img[style*="display: block"]) .upload-hint {
  display: none;
}

.upload-delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: rgba(255, 59, 48, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  padding: 0;
}

.upload-preview-large .upload-delete-btn {
  width: 24px;
  height: 24px;
  top: 6px;
  right: 6px;
}

.upload-delete-btn:hover {
  background: rgba(255, 59, 48, 1);
  transform: scale(1);
  box-shadow: 0 2px 8px rgba(255, 59, 48, 0.4);
}

.upload-delete-btn:active {
  transform: scale(0.9);
}

.upload-preview:hover .upload-delete-btn {
  opacity: 1;
  transform: scale(1);
}

.upload-delete-btn svg {
  width: 100%;
  height: 100%;
  padding: 2px;
}

.upload-delete-btn svg path {
  fill: #ffffff;
}

/* 兼容旧类名 */
.image-delete-btn,
.icon-delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: rgba(255, 59, 48, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  padding: 0;
}

.image-delete-btn:hover,
.icon-delete-btn:hover {
  background: rgba(255, 59, 48, 1);
  transform: scale(1);
  box-shadow: 0 2px 8px rgba(255, 59, 48, 0.4);
}

.image-delete-btn:active,
.icon-delete-btn:active {
  transform: scale(0.9);
}

.upload-preview:hover .image-delete-btn,
.upload-preview:hover .icon-delete-btn {
  opacity: 1;
  transform: scale(1);
}

.image-delete-btn svg,
.icon-delete-btn svg {
  width: 100%;
  height: 100%;
  padding: 2px;
}

.image-delete-btn svg path,
.icon-delete-btn svg path {
  fill: #ffffff;
}

.avatar-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  z-index: 2;
}

.van-loading {
  font-size: 25px;
}

.van-loading__spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
}

.van-loading__circular {
  width: 100%;
  height: 100%;
  animation: van-rotate 2s linear infinite;
}

.van-loading__circular circle {
  stroke: #7c3aed;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 90, 150;
  stroke-dashoffset: 0;
  animation: van-circular 1.5s ease-in-out infinite;
}

@keyframes van-rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes van-circular {
  0% {
    stroke-dasharray: 1, 200;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 90, 200;
    stroke-dashoffset: -35;
  }
  100% {
    stroke-dasharray: 90, 200;
    stroke-dashoffset: -125;
  }
}

@keyframes shake-scale {
  0%   { transform: translateZ(0) translateX(3px)  rotate(1deg); }
  2.5% { transform: translateZ(0) translateX(-3px) rotate(-1deg); }
  5%   { transform: translateZ(0) translateX(3px)  rotate(1deg); }
  7.5% { transform: translateZ(0) translateX(-3px) rotate(-1deg); }
  10%  { transform: translateZ(0) translateX(2px)  rotate(1deg); }
  12.5%{ transform: translateZ(0) translateX(-2px) rotate(-1deg); }
  15%  { transform: translateZ(0) translateX(2px)  rotate(1deg); }
  17.5%{ transform: translateZ(0) translateX(-2px) rotate(-1deg); }
  20%  { transform: translateZ(0) translateX(1px)  rotate(1deg); }
  22.5%{ transform: translateZ(0) translateX(-1px) rotate(-1deg); }
  25%  { transform: translateZ(0) translateX(0)    rotate(0deg); }
}

.upload-avatar-btn {
  width: 100px;
  height: 34px;
  border: 1px solid #f6f2f2;
  font-size: 10px;
  color: #666;
  font-weight: 500;
  cursor: pointer;
  border-radius: 10px;
  background: white;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
}

.upload-avatar-btn:hover {
  background-color: #f5f5f5;
}

.avatar-section .van-uploader:last-child {
  margin-top: auto;
}

.van-uploader:last-child .van-uploader__input-wrapper {
  position: relative;
}

.van-uploader:last-child .van-uploader__input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.van-button__content {
  display: flex;
  align-items: center;
  justify-content: center;
}

.van-button__text {
  display: inline-block;
}

.info-inputs {
  flex: 1 1 0%;
  display: flex;
  flex-direction: column;
}

.van-cell {
  background: #f7f8fa;
  border-radius: 10px;
  position: relative;
}

.van-cell--borderless {
  background: #f7f8fa;
  border-radius: 10px;
}

.van-cell + .van-cell {
  margin-top: 10px;
}

.van-cell__value {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.van-cell__value--alone {
  width: 100%;
}

.van-field {
  background: #f7f8fa;
  border-radius: 10px;
}

.van-field__value {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.van-field__body {
  width: 100%;
  padding: 8px 12px;
  box-sizing: border-box;
}

.van-field__control {
  width: 100%;
  border: none;
  background: transparent;
  padding: 0;
  font-size: 14px;
  color: #333;
  resize: none;
  outline: none;
  font-family: inherit;
  line-height: 1.5;
  box-sizing: border-box;
}

.van-field__control::placeholder {
  color: #999;
}

.van-field__control:focus {
  background: transparent;
}

.van-field__word-limit {
  font-size: 12px;
  color: #999;
  padding: 0 12px 8px 0;
  text-align: right;
}

.van-field__word-num {
  color: #333;
}

/* ==================== 7. 联系方式 ==================== */
.contact-section {
  margin: 10px 4%;
  box-sizing: border-box;
}

.contact-item {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  background-color: white;
  height: 44px;
  border-radius: 10px;
  padding-left: 10px;
  padding-right: 10px;
  cursor: pointer;
  box-sizing: border-box;
}

.contact-item span {
  font-size: 14px;
  color: #333;
}

.arrow-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

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

.arrow-icon svg path {
  fill: #8a8a8a;
}

.contact-drawer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background-color: white;
  border-radius: 10px;
  margin-top: 10px;
  box-sizing: border-box;
}

.contact-drawer.expanded {
  max-height: 2000px;
  transition: max-height 0.3s ease-in;
}

.contact-row {
  display: flex;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #f0f0f0;
  gap: 10px;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.contact-row:last-child {
  border-bottom: none;
}

.contact-icon-upload {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
  min-width: 40px;
}

.contact-icon-upload:hover .upload-preview {
  border-color: #7c3aed;
  background-color: #f5f0ff;
}

.icon-preview {
  width: 100%;
  height: 100%;
}

.icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.icon-placeholder {
  font-size: 12px;
  color: #8a8a8a;
  font-weight: 500;
  pointer-events: none;
}

.icon-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.contact-title-input {
  flex: 1 1 0%;
  min-width: 0;
  height: 36px;
  padding: 0 8px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  color: #333;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.contact-title-input:focus {
  border-color: #7c3aed;
}

.contact-title-input::placeholder {
  color: #999;
}

.contact-input {
  flex: 1 1 0%;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  color: #333;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.contact-input:focus {
  border-color: #7c3aed;
}

.contact-input::placeholder {
  color: #999;
}

.contact-toggle {
  flex-shrink: 0;
  min-width: 44px;
}

.toggle-switch {
  width: 44px;
  height: 24px;
  background-color: #ccc;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: background-color 0.3s;
  flex-shrink: 0;
}

.toggle-switch.active {
  background-color: #7c3aed;
}

.toggle-slider {
  width: 20px;
  height: 20px;
  background-color: white;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active .toggle-slider {
  transform: translateX(20px);
}

.contact-delete {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  min-width: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff3b30;
  transition: opacity 0.2s;
}

.contact-delete:hover {
  opacity: 0.7;
}

.contact-delete svg {
  width: 100%;
  height: 100%;
}

.contact-delete svg path {
  fill: #ff3b30;
}

.contact-add-btn {
  padding: 12px;
  text-align: center;
  color: #7c3aed;
  font-size: 14px;
  cursor: pointer;
  border-top: 1px solid #f0f0f0;
}

.contact-add-btn span {
  display: inline-block;
}

.custom-contacts {
  border-top: 1px solid #f0f0f0;
}

/* ==================== 8. 页面模块 ==================== */
.module-buttons {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 30px 4% 10px;
}

.btn-add-link {
  color: white;
  height: 44px;
  margin-right: 6%;
  font: 900 14px bolder;
  background: #7c3aed;
  border-radius: 50px;
  border: 0;
  width: 52%;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  transition: opacity 0.2s;
}

.btn-add-link:hover {
  opacity: 0.9;
}

.btn-add-link .btn-icon {
  font-size: 18px;
  margin-right: 4px;
  height: 20px;
  line-height: 20px;
}

.btn-add-link span:last-child {
  height: 20px;
  line-height: 20px;
}

.btn-add-other {
  height: 44px;
  font: 900 14px bolder;
  color: #7c3aed;
  border-radius: 50px;
  border: 0;
  width: 52%;
  text-align: center;
  cursor: pointer;
  background: white;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  animation: shake-scale 3s linear infinite;
}

.btn-add-other span {
  position: relative;
  height: 20px;
  line-height: 20px;
}

.add-group-section {
  padding-left: 4%;
  padding-right: 4%;
  margin-top: 10px;
}

.btn-add-group {
  height: 40px;
  line-height: 40px;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  background-color: rgba(255, 255, 255, 0.6);
  border-radius: 50px;
  text-align: center;
  border: none;
  cursor: pointer;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  transition: background-color 0.2s;
}

.btn-add-group:hover {
  background-color: rgba(255, 255, 255, 0.8);
}

.group-icon {
  width: 10px;
  vertical-align: middle;
  margin-bottom: 2px;
  margin-right: 2px;
}

.edit-container {
  padding-left: 4%;
  padding-right: 4%;
}

.draggable-list {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  position: relative;
  box-sizing: border-box;
  width: 100%;
}

.draggable-list > div {
  width: 100%;
}

/* ==================== 9. 链接模块卡片 ==================== */
.module-item.link-module {
  margin-top: 20px;
}

.link-card {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: rgb(220, 217, 226) 0px 2px 0px;
  border: 0px;
}

.link-card-inner {
  background: white;
  width: 100%;
  min-height: 138px;
}

/* ==================== 10. 右侧预览区 ==================== */
.preview-area {
  width: 580px;
  min-width: 580px;
  background-color: #f5f5f5;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid #e0e0e0;
  flex-shrink: 0;
}

.preview-navbar {
  height: 65px;
  background-color: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  flex-shrink: 0;
}

.preview-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  overflow: hidden;
}

.phone-frame {
  width: 375px;
  height: 667px;
  background-color: #000000;
  border-radius: 40px;
  padding: 8px;
  box-sizing: border-box;
  position: relative;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  border-radius: 32px;
  overflow: hidden;
  position: relative;
}

.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 30px;
  background-color: #000000;
  border-radius: 0 0 20px 20px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notch-link {
  color: #ffffff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.notch-link:hover {
  opacity: 0.8;
}

/* ==================== 11. 模态框 ==================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

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

.modal {
  background-color: #ffffff;
  border-radius: 12px;
  width: 280px;
  max-width: 90%;
  padding: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  animation: modalFadeIn 0.3s ease-out;
  overflow: hidden;
  position: relative;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-content {
  padding: 24px 20px 16px;
  text-align: center;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 12px;
}

.modal-value {
  font-size: 15px;
  color: #333333;
  word-break: break-all;
  margin-bottom: 20px;
}

.modal-buttons {
  display: flex;
  border-top: 1px solid #e5e5e5;
}

.modal-btn {
  flex: 1;
  padding: 16px;
  border: none;
  background: transparent;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  outline: none;
  border-radius: 0;
}

.modal-btn:first-child {
  border-right: 1px solid #e5e5e5;
  color: #000000;
  border-bottom-left-radius: 12px;
}

.modal-btn:last-child {
  color: #ff3b30;
  border-bottom-right-radius: 12px;
}

.modal-btn:hover {
  background-color: #f5f5f5;
}

.modal-btn:active {
  background-color: #e5e5e5;
}

.modal-btn:focus {
  outline: none;
  border-radius: 0;
}

.modal-btn:first-child:focus {
  border-bottom-left-radius: 12px;
}

.modal-btn:last-child:focus {
  border-bottom-right-radius: 12px;
}

/* ==================== 12. 工具类 ==================== */
.pointer {
  cursor: pointer;
}

.flexBC {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flexLC {
  display: flex;
  align-items: center;
}

.flexC {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flexD {
  display: flex;
  flex-direction: column;
}

.hover_background {
  transition: background-color 0.2s;
}

.hover_background:hover {
  background-color: #f5f5f5;
}

/* ==================== 13. 响应式样式 ==================== */
/* 中等屏幕：当窗口宽度不足以舒适显示预览区时，隐藏预览区 */
@media (max-width: 1400px) {
  .preview-area {
    display: none;
  }

  .content-area {
    width: 100%;
  }

  /* 中等屏幕：优化联系方式布局 */
  .contact-row {
    padding: 10px 8px;
    gap: 8px;
  }

  .contact-title-input {
    flex: 1 1 0%;
    min-width: 0;
    padding: 0 6px;
    font-size: 13px;
  }

  .contact-input {
    padding: 0 10px;
    font-size: 13px;
  }

  .contact-icon-upload {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

  .contact-toggle {
    min-width: 44px;
  }
}

/* 移动端：调整布局 */
@media (max-width: 768px) {
  .preview-area {
    display: none;
  }

  .content-area {
    width: 100%;
    flex-direction: column;
  }

  .content-sidebar {
    width: 100%;
    height: 80px;
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 20px !important;
    gap: 0 !important;
  }

  .content-main {
    flex: 1;
  }

  .content-body {
    padding: 0;
  }

  .content-wrapper {
    padding: 0;
  }

  .section-title {
    padding-left: 4%;
    padding-right: 4%;
  }

  /* 移动端：个人信息卡片保持横向布局 */
  .personal-info-card {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  /* 移动端：头像区域保持固定宽度 */
  .avatar-section {
    width: 104px;
    margin-right: 10px;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  /* 移动端：输入区域保持flex布局 */
  .info-inputs {
    flex: 1 1 0%;
    width: auto;
    min-width: 0; /* 防止flex子元素溢出 */
  }

  /* 移动端：确保van-cell和van-field正常显示 */
  .van-cell,
  .van-field {
    width: 100%;
  }

  /* 移动端：模块按钮区域一行显示 */
  .module-buttons {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 30px 4% 10px;
    gap: 10px;
  }

  .btn-add-link,
  .btn-add-other {
    flex: 1;
    width: auto;
    margin-right: 0;
  }

  /* 移动端：导航栏样式调整 */
  .content-navbar {
    padding: 0;
    overflow: hidden;
    height: 44px;
  }

  .navbar-items {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    justify-content: center;
    gap: 0;
    position: relative;
    height: 100%;
  }

  .navbar-item {
    font-size: 14px;
    flex: 1;
    padding: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    max-width: none;
  }

  .navbar-item.active {
    font-size: 14px;
    font-weight: 500;
    color: #000000;
  }

  /* 移动端：移除hover背景色 */
  .navbar-item.hover_background:hover {
    background-color: transparent;
  }

  /* 移动端：隐藏PC端下划线 */
  .navbar-item .navbar-underline {
    display: none !important;
  }

  /* 移动端：显示独立下划线 */
  .navbar-line {
    display: block;
  }

  /* 移动端：文字省略号 */
  .navbar-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* 移动端：我的 - 隐藏头像和"我的"文字，显示品牌文字 */
  .content-sidebar #sidebar-profile {
    flex-direction: row;
    gap: 0;
  }

  .content-sidebar #sidebar-profile .sidebar-avatar {
    display: none;
  }

  .content-sidebar #sidebar-profile .sidebar-text {
    display: none;
  }

  .content-sidebar #sidebar-profile .sidebar-brand-text {
    display: block;
    font-size: 16px;
    font-weight: bold;
    color: #333333;
  }

  /* 移动端：微信、官网、退出 - 只显示图标，隐藏文字 */
  .content-sidebar #sidebar-wechat,
  .content-sidebar #sidebar-website,
  .content-sidebar #sidebar-logout {
    flex-direction: row;
    gap: 0 !important;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
  }

  .content-sidebar #sidebar-wechat .sidebar-text,
  .content-sidebar #sidebar-website .sidebar-text,
  .content-sidebar #sidebar-logout .sidebar-text {
    display: none !important;
  }

  /* 移动端：图标缩小 */
  .content-sidebar #sidebar-wechat .sidebar-icon,
  .content-sidebar #sidebar-website .sidebar-icon,
  .content-sidebar #sidebar-logout .sidebar-icon {
    width: 24px !important;
    height: 24px !important;
    margin: 0;
    padding: 0;
  }

  /* 移动端：联系方式下拉抽屉优化 - 统一标准化 */
  .contact-section {
    margin: 10px 0;
  }

  .contact-item {
    margin: 0 4%;
  }

  .contact-drawer {
    margin: 10px 4% 0;
  }

  .contact-row {
    padding: 10px 4%;
    gap: 6px;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
  }

  /* 移动端：图标上传区域稍微缩小 - 统一标准化 */
  .contact-icon-upload {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    min-width: 36px;
  }

  /* 移动端：标题输入框宽度减小 - 统一标准化 */
  .contact-title-input {
    flex: 1 1 0%;
    min-width: 0;
    font-size: 13px;
    padding: 0 6px;
    height: 32px;
    box-sizing: border-box;
  }

  /* 移动端：内容输入框padding减小 - 统一标准化 */
  .contact-input {
    flex: 1 1 0%;
    min-width: 0;
    font-size: 13px;
    padding: 0 8px;
    height: 32px;
    box-sizing: border-box;
  }

  /* 移动端：删除按钮稍微缩小 - 统一标准化 */
  .contact-delete {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    min-width: 0; /* 统一标准化 */
  }

  /* 移动端：切换开关稍微缩小 - 统一标准化 */
  .contact-toggle {
    flex-shrink: 0;
    min-width: 0; /* 统一标准化 */
  }

  .toggle-switch {
    width: 40px;
    height: 22px;
    flex-shrink: 0; /* 统一标准化 */
  }

  .toggle-slider {
    width: 18px;
    height: 18px;
  }

  .toggle-switch.active .toggle-slider {
    transform: translateX(18px);
  }

  /* 移动端：图标按钮组 - 重置所有可能影响间距的属性 */
  .content-sidebar .sidebar-item:not(#sidebar-profile) {
    margin-left: 0 !important;
    /* margin-right 由下面的具体选择器控制，不在这里设置 */
    padding: 0 !important;
    min-width: auto !important;
    flex-shrink: 0 !important;
    width: 24px !important;
    height: 24px !important;
    gap: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* 移动端：图标按钮组之间的间距 - 使用更具体的选择器 */
  .content-sidebar #sidebar-wechat.sidebar-item {
    margin-right: 15px !important;
  }

  .content-sidebar #sidebar-website.sidebar-item {
    margin-right: 15px !important;
  }

  .content-sidebar #sidebar-logout.sidebar-item {
    margin-right: 0 !important;
  }

  /* 移动端：确保图标组整体靠右，创建一个图标组容器效果 */
  .content-sidebar {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  /* 移动端：品牌文字靠左 */
  .content-sidebar #sidebar-profile {
    flex: 0 0 auto;
    margin-right: auto;
  }

  /* 移动端：图标组靠右 */
  .content-sidebar #sidebar-wechat,
  .content-sidebar #sidebar-website,
  .content-sidebar #sidebar-logout {
    flex: 0 0 auto;
    order: 2;
  }
}

