/* =========================================================
   YunZen 组件样式 v3.0
   - 导航栏
   - 按钮
   - 卡片
   - 页脚
========================================================= */

/* ========== 1. 顶部导航 ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--container-w);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.logo img {
  height: var(--logo-h);
  width: auto;
}

.logo-text {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--ink);
}

.logo-text .cn {
  color: var(--ink);
}

.logo-text .en {
  color: var(--brand-blue);
  font-weight: 600;
  margin-left: var(--space-2);
}

/* 导航链接 */
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav-link {
  position: relative;
  font-size: var(--fs-sm);
  font-weight: 520;
  color: var(--ink);
  padding: var(--space-2) 0;
  transition: color var(--transition);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-gold));
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition);
}

.nav-link:hover {
  font-weight: 600;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-link.active {
  color: var(--ink);
  font-weight: 600;
}

/* 大屏导航间距 */
@media (min-width: 1400px) {
  .nav {
    gap: var(--space-10);
  }
  .nav-link {
    font-size: var(--fs-base);
  }
}

/* 移动端导航（待扩展） */
@media (max-width: 768px) {
  .nav {
    gap: var(--space-4);
  }
  .nav-link {
    font-size: var(--fs-xs);
  }
}

/* ========== 2. 按钮 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-size: var(--fs-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
}

/* 主要按钮 */
.btn-primary {
  background: var(--brand-blue);
  color: var(--white);
  border: 1px solid var(--brand-blue);
}

.btn-primary:hover {
  background: var(--brand-blue-dark);
  border-color: var(--brand-blue-dark);
}

/* 次要按钮 */
.btn-secondary {
  background: var(--white);
  color: var(--brand-blue);
  border: 1px solid var(--brand-blue);
}

.btn-secondary:hover {
  background: var(--brand-blue-light);
}

/* 幽灵按钮 */
.btn-ghost {
  background: transparent;
  color: var(--gray);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

/* 渐变文字链接 */
.btn-gradient {
  display: inline-block;
  font-size: var(--fs-base);
  font-weight: 600;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform var(--transition), filter var(--transition);
}

.btn-gradient:hover {
  transform: translateX(4px);
  filter: brightness(1.1);
}

/* 按钮尺寸 */
.btn-sm {
  padding: var(--space-2) var(--space-3);
  font-size: var(--fs-xs);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--fs-base);
}

/* 禁用状态 */
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========== 3. 卡片 ========== */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card-icon {
  font-size: 36px;
  margin-bottom: var(--space-4);
}

.card-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--space-2);
}

.card-desc {
  font-size: var(--fs-sm);
  color: var(--gray);
  line-height: 1.7;
}

/* 大屏卡片 */
@media (min-width: 1400px) {
  .card {
    padding: var(--space-8);
  }
  .card-icon {
    font-size: 42px;
  }
  .card-title {
    font-size: var(--fs-xl);
  }
}

/* ========== 4. 分区 ========== */
.section {
  padding: var(--space-16) 0;
}

.section-muted {
  background: var(--muted);
}

.section-title {
  font-size: var(--fs-3xl);
  font-weight: 800;
  color: var(--ink);
  text-align: center;
  margin-bottom: var(--space-3);
  position: relative;
  display: inline-block;
}

/* 标题下划线 */
.section-title::after {
  content: "";
  display: block;
  width: 100%;
  height: 3px;
  margin-top: var(--space-3);
  border-radius: 3px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-gold));
}

.section-subtitle {
  font-size: var(--fs-base);
  color: var(--gray);
  text-align: center;
  margin-bottom: var(--space-10);
}

/* 大屏分区 */
@media (min-width: 1400px) {
  .section {
    padding: var(--space-20) 0;
  }
  .section-title {
    font-size: var(--fs-4xl);
  }
}

/* ========== 5. 页脚 ========== */
.footer {
  background: var(--ink);
  color: var(--gray-light);
  padding: var(--space-12) 0 var(--space-8);
}

.footer a {
  color: var(--gray-light);
  transition: color var(--transition);
}

.footer a:hover {
  color: var(--brand-gold);
}

.footer-inner {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--space-6);
  text-align: center;
}

.footer-logo {
  height: 32px;
  margin-bottom: var(--space-4);
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
  font-size: var(--fs-sm);
}

.footer-copyright {
  font-size: var(--fs-xs);
  color: var(--gray);
}

/* ========== 6. 表单元素 ========== */
.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--space-2);
}

.form-label .required {
  color: var(--red);
  margin-left: 2px;
}

.form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: var(--fs-base);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(23, 105, 255, 0.1);
  outline: none;
}

.form-select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: var(--fs-base);
  background: var(--white);
  cursor: pointer;
}

/* ========== 7. 弹窗 ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: min(90vw, 480px);
  max-height: 90vh;
  overflow: auto;
  transform: scale(0.95);
  transition: transform var(--transition);
}

.modal-overlay.show .modal {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  font-size: var(--fs-lg);
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--gray);
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--muted);
  color: var(--ink);
}

.modal-body {
  padding: var(--space-6);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--line);
}

/* ========== 8. 状态标签 ========== */
.tag {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  font-size: var(--fs-xs);
  font-weight: 600;
  border-radius: 20px;
}

.tag-success {
  background: var(--green-light);
  color: var(--green);
}

.tag-warning {
  background: var(--yellow-light);
  color: var(--yellow);
}

.tag-error {
  background: var(--red-light);
  color: var(--red);
}

.tag-info {
  background: var(--brand-blue-light);
  color: var(--brand-blue);
}
