/* ========================================
   梦途星伴门户网站 - 自定义样式
   ======================================== */

/* ---- 全局 ---- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: #2BAA8E;
  color: #fff;
}

/* ---- 文字渐变 ---- */
.text-gradient {
  background: #fff;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- 主按钮 ---- */
.btn-primary {
  background: linear-gradient(135deg, #2BAA8E 0%, #239B80 100%);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #239B80 0%, #1d8770 100%);
}

/* ========================================
   导航栏
   ======================================== */
#navbar {
  background: transparent;
}

#navbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.nav-link {
  color: rgba(255, 255, 255, 0.85);
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

#navbar .nav-link {
  color: #374151;
}

#navbar .nav-link:hover,
#navbar .nav-link.active {
  color: #2BAA8E;
  background: rgba(43, 170, 142, 0.08);
}

#navbar #menu-toggle {
  color: #374151;
}

#menu-toggle {
  color: #fff;
}

/* ========================================
   Hero 区域
   ======================================== */
.hero-gradient {
  background: linear-gradient(135deg, #1a7a65 0%, #2BAA8E 30%, #35b89a 60%, #4ECDC4 100%);
}

.hero-bg-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-bg-shapes::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 217, 61, 0.15) 0%, transparent 70%);
  top: -200px;
  right: -100px;
}

.hero-bg-shapes::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  bottom: 100px;
  left: -100px;
}

.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  z-index: 5;
}

.hero-wave svg {
  display: block;
  width: 100%;
  height: 60px;
}

@media (min-width: 768px) {
  .hero-wave svg {
    height: 100px;
  }
}

/* ---- Hero 视频播放器 ---- */
.hero-video {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-video-main {
  position: relative;
  width: 100%;
  aspect-ratio: 15 / 9;
  overflow: hidden;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-video-main:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.25);
}

.hero-video-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.hero-video-cover-img.loaded {
  display: block;
}

.hero-video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(43, 170, 142, 0.3) 0%, rgba(78, 205, 196, 0.2) 100%);
}

.hero-video-placeholder.hidden {
  display: none;
}

.hero-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 50%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hero-video-main:hover .hero-video-overlay,
.hero-video-overlay.visible {
  opacity: 1;
}

.hero-video-play-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: transform 0.3s ease, background 0.3s ease;
}

.hero-video-main:hover .hero-video-play-btn {
  transform: scale(1.1);
  background: rgba(43, 170, 142, 0.7);
}

.hero-video-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.hero-video-title {
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.hero-video-badge {
  color: #fff;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 12px;
  flex-shrink: 0;
}

.hero-video-badge:empty {
  display: none;
}

/* ---- 缩略图列表 ---- */
.hero-video-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.hero-video-thumbs:empty {
  display: none;
}

.hero-video-thumb {
  position: relative;
  flex-shrink: 0;
  width: 80px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.55;
  transition: all 0.25s ease;
  border: 2px solid transparent;
}

.hero-video-thumb:hover {
  opacity: 0.85;
}

.hero-video-thumb.active {
  opacity: 1;
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(43, 170, 142, 0.5);
}

.hero-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-video-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.65rem;
}

/* ---- 内联视频播放 ---- */
.hero-video-inline {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 10;
}

.hero-video-inline.hidden {
  display: none;
}

.hero-video-cover-img.hidden {
  display: none !important;
}

.hero-video-overlay.hidden {
  display: none !important;
}

@media (max-width: 1023px) {
  .hero-video {
    max-width: 480px;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .hero-video-thumb {
    width: 64px;
    height: 42px;
  }

  .hero-video-play-btn {
    width: 44px;
    height: 44px;
  }
}

/* ========================================
   功能卡片
   ======================================== */
.feature-card {
  background: #fff;
  border-radius: 24px;
  padding: 32px;
  border: 1px solid #f3f4f6;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2BAA8E, #4ECDC4);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: left;
}

.feature-card:hover {
  box-shadow: 0 20px 60px rgba(43, 170, 142, 0.1);
  border-color: transparent;
  transform: translateY(-4px);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

/* ========================================
   产品特色 - 展示卡片
   ======================================== */
.showcase-visual {
  position: relative;
  border-radius: 24px;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
}

.showcase-visual-1 {
  background: linear-gradient(135deg, #eefaf6 0%, #d5f2ea 100%);
}

.showcase-visual-2 {
  background: linear-gradient(135deg, #fffbeb 0%, #fff3c4 100%);
}

.showcase-visual-3 {
  background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
}

.showcase-inner-card {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 320px;
  transition: transform 0.3s ease;
}

.showcase-inner-card:hover {
  transform: translateY(-4px);
}

/* ========================================
   适用人群区
   ======================================== */
.audience-bg {
  background: linear-gradient(135deg, #1a7a65 0%, #2BAA8E 50%, #4ECDC4 100%);
}

.audience-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 32px 28px;
  position: relative;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.audience-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.audience-card-highlight {
  border-color: #2BAA8E;
  box-shadow: 0 10px 40px rgba(43, 170, 142, 0.2);
}

/* ========================================
   新闻/公告 Tab
   ======================================== */
.news-tab {
  color: #6b7280;
  cursor: pointer;
}

.news-tab.active {
  background: #fff;
  color: #2BAA8E;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  font-weight: 700;
}

.news-panel {
  display: none;
}

.news-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ========================================
   回到顶部
   ======================================== */
#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* ========================================
   滚动条美化
   ======================================== */
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 9999px;
}

*::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 9999px;
  border: 2px solid transparent;
  background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.4);
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

/* Firefox fallback */
@supports not selector(::-webkit-scrollbar) {
  * {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
  }
}

/* ========================================
   登录按钮（导航栏滚动后变色）
   ======================================== */
#navbar .login-btn {
  background: #2BAA8E;
  color: #fff;
  border-color: #2BAA8E;
}

#navbar .login-btn:hover {
  background: #239B80;
  border-color: #239B80;
}

/* ========================================
   全屏登录页
   ======================================== */
.login-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  animation: modalFadeIn 0.3s ease;
}

.login-modal-overlay.hidden {
  display: none;
}

.login-page {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 100vh;
}

.login-page-brand {
  display: none;
  position: relative;
  width: 50%;
  background: linear-gradient(135deg, #0f172a 0%, #1a3a32 40%, #14483f 100%);
  overflow: hidden;
}

.login-page-brand::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(43, 170, 142, 0.2) 0%, transparent 70%);
  top: -150px;
  right: -100px;
  pointer-events: none;
}

.login-page-brand::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 217, 61, 0.08) 0%, transparent 70%);
  bottom: -100px;
  left: -50px;
  pointer-events: none;
}

.login-brand-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding: 60px;
}

.login-page-form {
  width: 100%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  overflow-y: auto;
  position: relative;
}

.login-form-inner {
  width: 100%;
  max-width: 400px;
}

@media (min-width: 768px) {
  .login-page-brand {
    display: block;
  }

  .login-page-form {
    width: 50%;
    padding: 60px 48px;
  }
}

@media (max-width: 767px) {
  .login-page-form {
    min-height: 100vh;
  }
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ========================================
   1V1 真人陪练区
   ======================================== */
.coaching-hero-bg {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 40%, #0f172a 100%);
  position: relative;
  overflow: hidden;
}

.coaching-hero-bg::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(43, 170, 142, 0.15) 0%, transparent 70%);
  top: -150px;
  right: -100px;
  pointer-events: none;
}

.coaching-hero-bg::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 217, 61, 0.08) 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
  pointer-events: none;
}

/* ---- 视频通话卡片 ---- */
.coaching-video-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  max-width: 420px;
  margin: 0 auto;
}

.coaching-video-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.coaching-video-body {
  padding: 40px 24px;
}

.coaching-avatar-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.coaching-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.coaching-connect-icon {
  animation: pulse-dots 2s ease-in-out infinite;
}

@keyframes pulse-dots {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}

.coaching-video-footer {
  display: flex;
  justify-content: space-around;
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.coaching-stat {
  text-align: center;
}

.coaching-stat-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
}

.coaching-stat-label {
  display: block;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}

/* ---- 三大训练板块卡片 ---- */
.coaching-pillar {
  background: #fff;
  border-radius: 24px;
  padding: 32px 28px;
  border: 1px solid #f3f4f6;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.coaching-pillar:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  border-color: transparent;
}

.coaching-pillar-vocab:hover  { box-shadow: 0 20px 60px rgba(43, 170, 142, 0.12); }
.coaching-pillar-reading:hover { box-shadow: 0 20px 60px rgba(59, 130, 246, 0.12); }
.coaching-pillar-grammar:hover { box-shadow: 0 20px 60px rgba(139, 92, 246, 0.12); }

.coaching-pillar-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.coaching-pillar-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.coaching-pillar-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.coaching-pillar-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.875rem;
  color: #374151;
  line-height: 1.5;
  border-bottom: 1px solid #f9fafb;
  flex: 1;
}

.coaching-pillar-list li:last-child {
  border-bottom: none;
}

.coaching-pillar-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 7px;
  flex-shrink: 0;
}

.coaching-pillar-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed #e5e7eb;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
}

/* ========================================
   响应式微调
   ======================================== */
@media (max-width: 767px) {
  .showcase-visual {
    min-height: 280px;
    padding: 24px;
  }
}
