/* ============================================================
   Components — 共享 UI 组件样式
   ============================================================ */

/* ===== 按钮 ===== */
.v2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 12px 32px;
  font-size: var(--text-base);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}

.v2-btn--primary {
  background: var(--color-primary);
  color: #fff;
}

.v2-btn--primary:hover {
  background: var(--color-primary-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.v2-btn--accent {
  background: var(--gradient-cta);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 107, 74, 0.3);
}

.v2-btn--accent:hover {
  box-shadow: 0 6px 24px rgba(255, 107, 74, 0.4);
  transform: translateY(-2px);
}

.v2-btn--outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.v2-btn--outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
  transform: translateY(-1px);
}

.v2-btn--outline-blue {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.v2-btn--outline-blue:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-1px);
}

.v2-btn--lg {
  padding: 16px 40px;
  font-size: var(--text-lg);
  border-radius: var(--radius-md);
}

.v2-btn--sm {
  padding: 8px 20px;
  font-size: var(--text-sm);
}

/* 头部 CTA 按钮 */
.v2-btn--header-cta {
  background: var(--gradient-cta);
  color: #fff;
  padding: 10px 24px;
  font-size: var(--text-base);
  font-weight: 600;
  border-radius: var(--radius-sm);
  animation: v2-pulse-soft 2.5s ease-in-out infinite;
}

.v2-btn--header-cta:hover {
  box-shadow: 0 4px 20px rgba(255, 107, 74, 0.4);
  transform: translateY(-1px);
  animation: none;
}

/* ===== 卡片 ===== */
.v2-card {
  background: var(--color-bg-white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  border: 1px solid var(--color-border);
}

.v2-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: transparent;
}

.v2-card--glass {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: var(--shadow-sm);
}

.v2-card--glass:hover {
  background: rgba(255, 255, 255, 0.25);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.v2-card--gradient {
  background: var(--gradient-card);
  border: 1px solid transparent;
}

/* ===== 表单 ===== */
.v2-input,
.v2-select {
  box-sizing: border-box;
}

.v2-input {
  width: 100%;
  padding: 12px 16px;
  font-size: var(--text-base);
  font-family: var(--font-family);
  color: var(--color-heading);
  background: var(--color-bg-white);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition-fast);
}

.v2-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-bg);
}

.v2-input::placeholder {
  color: var(--color-caption);
}

.v2-select {
  padding: 12px 40px 12px 16px;
  font-size: var(--text-base);
  font-family: var(--font-family);
  color: var(--color-heading);
  background: var(--color-bg-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238B90A0' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  outline: none;
  appearance: none;
  transition: border-color var(--transition-fast);
}

.v2-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-bg);
}

/* ===== Hero 线索表单（内联） ===== */
.v2-lead-form-inline {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  flex-wrap: wrap;
}

.v2-lead-form-inline .v2-input,
.v2-lead-form-inline .v2-select {
  width: 180px;
}

.v2-lead-form-inline .v2-btn {
  flex-shrink: 0;
}

/* ===== 底部固定线索栏 ===== */
.v2-fixed-lead-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--color-bg-white);
  box-shadow: 0 -4px 20px rgba(26, 33, 56, 0.1);
  z-index: 999;
  padding: 16px 0;
  transform: translateY(100%);
  transition: transform var(--transition-base);
}

.v2-fixed-lead-bar--visible {
  transform: translateY(0);
}

.v2-fixed-lead-bar .v2-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}

.v2-fixed-lead-bar .v2-lead-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-heading);
  margin-right: var(--space-lg);
}

.v2-fixed-lead-bar .v2-input,
.v2-fixed-lead-bar .v2-select {
  width: 200px;
}

/* ===== 悬浮联系组件（PC端右侧） ===== */
.v2-floating-widget {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.v2-floating-widget__btn {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--color-bg-white);
  border: none;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all var(--transition-base);
  color: var(--color-primary);
}

.v2-floating-widget__btn:hover {
  box-shadow: var(--shadow-lg);
  transform: scale(1.08);
  background: var(--color-primary);
  color: #fff;
}

.v2-floating-widget__btn:hover .v2-floating-widget__tooltip {
  opacity: 1;
  transform: translateX(-8px);
}

.v2-floating-widget__tooltip {
  position: absolute;
  right: 64px;
  background: var(--color-heading);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(8px);
  transition: all var(--transition-base);
}

.v2-floating-widget__tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 6px solid var(--color-heading);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

/* 悬浮组件 SVG 图标 */
.v2-floating-widget__btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 移动端底部固定条 */
.v2-mobile-cta-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background: var(--color-bg-white);
  box-shadow: 0 -2px 16px rgba(26, 33, 56, 0.1);
  padding: 10px 16px;
  gap: 12px;
}

.v2-mobile-cta-bar .v2-btn {
  flex: 1;
  text-align: center;
  justify-content: center;
  padding: 12px 16px;
  font-size: var(--text-sm);
}

/* ===== 顶部工具条 ===== */
.v2-topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--topbar-height);
  background: var(--color-heading);
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-xs);
  z-index: 501;
  display: flex;
  align-items: center;
}

.v2-topbar .v2-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.v2-topbar__phone {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-secondary);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
}

.v2-topbar__phone:hover {
  color: var(--color-secondary-light);
}

/* ===== Mega Menu (导航下拉) ===== */
.v2-mega-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-bg-white);
  box-shadow: var(--shadow-xl);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  z-index: 500;
  min-width: 680px;
}

.v2-mega-menu--visible {
  display: block;
}

.v2-mega-menu__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.v2-mega-menu__item {
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
  text-decoration: none;
  display: block;
}

.v2-mega-menu__item:hover {
  background: var(--color-bg);
}

.v2-mega-menu__age {
  font-size: var(--text-xs);
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 4px;
}

.v2-mega-menu__title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: 4px;
}

.v2-mega-menu__desc {
  font-size: var(--text-xs);
  color: var(--color-caption);
  line-height: 1.5;
}

/* ===== 信任数据条 ===== */
.v2-trust-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  padding: var(--space-3xl) 0;
}

.v2-trust-bar__item {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.v2-trust-bar__item:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-4px);
}

.v2-trust-bar__number {
  font-size: var(--text-5xl);
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: var(--space-sm);
}

.v2-trust-bar__label {
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.8);
  font-weight: 300;
}

/* 白底版本 */
.v2-trust-bar--light .v2-trust-bar__item {
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
}

.v2-trust-bar--light .v2-trust-bar__item:hover {
  background: var(--color-bg-white);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-lg);
}

.v2-trust-bar--light .v2-trust-bar__number {
  color: var(--color-primary);
  background: linear-gradient(135deg, var(--color-primary), #6C63FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.v2-trust-bar--light .v2-trust-bar__label {
  color: var(--color-caption);
  font-weight: 400;
}

/* ===== 竞赛荣誉卡片 ===== */
.v2-award-card {
  background: var(--color-bg-white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: all var(--transition-base);
}

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

.v2-award-card__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-md);
  background: var(--gradient-hero);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl);
  color: #fff;
}

.v2-award-card__title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: var(--space-xs);
}

.v2-award-card__result {
  font-size: var(--text-base);
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.v2-award-card__meta {
  font-size: var(--text-sm);
  color: var(--color-caption);
}

/* ===== 学生作品卡片 ===== */
.v2-project-card {
  background: var(--color-bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: all var(--transition-base);
  cursor: pointer;
}

.v2-project-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}

.v2-project-card__img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--color-bg);
}

.v2-project-card__body {
  padding: var(--space-md);
}

.v2-project-card__title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: 4px;
}

.v2-project-card__meta {
  font-size: var(--text-sm);
  color: var(--color-caption);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ===== 合作 Logo 墙 ===== */
.v2-logo-wall {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xl);
  padding: var(--space-xl) 0;
}

.v2-logo-wall__item {
  height: 48px;
  opacity: 0.5;
  filter: grayscale(100%);
  transition: all var(--transition-base);
}

.v2-logo-wall__item:hover {
  opacity: 1;
  filter: grayscale(0%);
}

/* ===== 弹窗/灯箱 ===== */
.v2-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 33, 56, 0.7);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.v2-modal-overlay--visible {
  display: flex;
}

.v2-modal {
  background: var(--color-bg-white);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  max-width: 480px;
  width: 90%;
  position: relative;
  box-shadow: var(--shadow-2xl);
  animation: v2-modal-in 0.3s ease;
}

.v2-modal__close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--color-bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  color: var(--color-caption);
  transition: all var(--transition-fast);
}

.v2-modal__close:hover {
  background: var(--color-border);
  color: var(--color-heading);
}

.v2-modal__title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: var(--space-lg);
  text-align: center;
}

.v2-modal .v2-lead-form-inline {
  flex-direction: column;
}

.v2-modal .v2-input,
.v2-modal .v2-select {
  width: 100%;
}

/* ===== 加载骨架屏 ===== */
.v2-skeleton {
  background: linear-gradient(90deg, var(--color-bg) 25%, var(--color-border) 50%, var(--color-bg) 75%);
  background-size: 200% 100%;
  animation: v2-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes v2-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

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