/**
 * 商讯IM - 主样式表
 * @description 网站全局样式定义
 */

/* ============================================
   目录
   ============================================
   1. 重置与基础样式
   2. 布局容器
   3. 导航栏
   4. 主要内容区
   5. 首屏展示区
   6. 下载按钮
   7. 聊天截图展示
   8. 功能特色区
   9. 下载区
   10. 页脚
   11. 法律页面
   12. 下载页面
   13. 滚动条
   14. 响应式设计
   ============================================ */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  line-height: 1.6;
  color: #333;
  overflow-x: hidden;
}

/* ============================================
   2. 布局容器
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================
   3. 导航栏
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 15px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
}

.logo-circle {
  width: 36px;
  height: 36px;
  background: #1877f2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  margin-right: 10px;
  font-size: 16px;
}

.logo-img {
  height: 36px;
  width: auto;
  margin-right: 10px;
}

.nav-logo span {
  font-size: 20px;
  font-weight: bold;
  color: #1877f2;
}

.nav-menu {
  display: flex;
  list-style: none;
}

.nav-menu li {
  margin-left: 30px;
}

.nav-menu a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: #1877f2;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 3px;
  background-color: #333;
  margin: 3px 0;
  transition: 0.3s;
}

/* ============================================
   4. 主要内容区
   ============================================ */
main {
  margin-top: 70px;
}

/* ============================================
   5. 首屏展示区
   ============================================ */
.hero-section {
  padding: 100px 0;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-section .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.hero-content {
  flex: 1;
  max-width: 500px;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #1a1a1a;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 40px;
  max-width: 500px;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.download-options {
  display: flex;
  gap: 16px;
  align-items: stretch;
}

/* ============================================
   6. 下载按钮
   ============================================ */
/* 下载按钮统一样式 */
.download-options .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  min-width: 160px;
  gap: 10px;
}

.download-options .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.download-options .btn img {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* App Store 按钮 - 黑色 */
.download-options .btn-primary {
  background: #000;
  color: white;
  border: none;
}

.download-options .btn-primary:hover {
  background: #1a1a1a;
}

/* APK 按钮 - 绿色 */
.download-options .btn-apk {
  background: #34a853 !important;
  color: white !important;
  border: none !important;
}

.download-options .btn-apk:hover {
  background: #2d9249 !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 15px 25px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.btn-primary {
  background: #000;
  color: white;
}

.btn-secondary {
  background: #42a5f5;
  color: white;
}

.btn svg {
  width: 24px;
  height: 24px;
  margin-right: 10px;
}

/* ============================================
   7. 聊天截图展示
   ============================================ */
.app-screenshot-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.app-screenshot-placeholder {
  width: 100%;
  max-width: 300px; /* 限制最大宽度以适应响应式设计 */
  height: auto;
  border-radius: 40px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
  border: 12px solid #1a1a1a;
  aspect-ratio: 1284 / 2778; /* 按照1284x2778比例设置 */
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f2f5;
  position: relative;
}

.screenshot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.screenshot-placeholder-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #666;
  text-align: center;
  font-size: 14px;
  padding: 20px;
  box-sizing: border-box;
}

/* 旧的手机模拟器样式保留用于备用 */
.phone-mockup {
  width: 300px;
  height: 600px;
  background: #ffffff;
  border-radius: 40px;
  position: relative;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
  border: 12px solid #1a1a1a;
  overflow: hidden;
}

.screen {
  width: 100%;
  height: 100%;
  background: #e5ddd5;
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  background: #f0f2f5;
  padding: 15px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #e0e0e0;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1877f2;
  margin-right: 10px;
}

.contact-info {
  flex: 1;
}

.name {
  font-weight: 600;
  font-size: 16px;
}

.status {
  font-size: 12px;
  color: #666;
}

.actions {
  display: flex;
  gap: 15px;
}

.action-btn {
  width: 24px;
  height: 24px;
  background: #c0c0c0;
  border-radius: 50%;
}

.messages {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.message {
  display: flex;
  margin-bottom: 10px;
}

.message.received {
  justify-content: flex-start;
}

.message.sent {
  justify-content: flex-end;
}

.message-bubble {
  max-width: 70%;
  padding: 10px 15px;
  border-radius: 10px;
  position: relative;
}

.message.received .message-bubble {
  background: white;
  border-top-left-radius: 0;
}

.message.sent .message-bubble {
  background: #d9fdd3;
  border-top-right-radius: 0;
}

.message-time {
  font-size: 11px;
  color: #666;
  margin-top: 5px;
  text-align: right;
}

.input-area {
  background: #f0f2f5;
  padding: 10px;
  display: flex;
  align-items: center;
  border-top: 1px solid #e0e0e0;
}

.input-icons {
  display: flex;
  gap: 10px;
  margin-right: 10px;
}

.icon {
  width: 30px;
  height: 30px;
  background: #c0c0c0;
  border-radius: 50%;
}

.input-field {
  flex: 1;
  background: white;
  padding: 10px 15px;
  border-radius: 20px;
  font-size: 14px;
}

.send-btn {
  width: 30px;
  height: 30px;
  background: #1877f2;
  border-radius: 50%;
  margin-left: 10px;
}

/* ============================================
   8. 功能特色区
   ============================================ */
.features-section {
  padding: 100px 0;
  background-color: white;
}

.features-section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #1a1a1a;
}

.features-section p {
  text-align: center;
  color: #666;
  margin-bottom: 60px;
  font-size: 1.1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  text-align: center;
  padding: 40px 20px;
  border-radius: 15px;
  background: #f8f9fa;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8f4ff;
  border-radius: 50%;
}

.feature-icon svg {
  width: 40px;
  height: 40px;
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #1a1a1a;
}

.feature-card p {
  color: #666;
  margin: 0;
}

/* ============================================
   9. 下载区
   ============================================ */
.download-section {
  padding: 100px 0;
  background: linear-gradient(135deg, #1877f2 0%, #1565c0 100%);
  color: white;
}

.download-section h2,
.download-section p {
  text-align: center;
  margin-bottom: 60px;
}

.download-section h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.download-section p {
  font-size: 1.1rem;
  opacity: 0.9;
}

.platforms {
  display: flex;
  justify-content: center;
  gap: 50px;
  max-width: 1000px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.platform {
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  padding: 40px 30px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  width: 350px;
  transition: transform 0.3s ease;
}

.platform:hover {
  transform: scale(1.05);
}

.platform-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.platform-icon svg {
  width: 40px;
  height: 40px;
}

.platform h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.platform p {
  margin-bottom: 20px;
  opacity: 0.9;
}

.btn-apple {
  background: #000;
  color: white;
  margin-bottom: 15px;
  display: block;
}

.btn-android {
  background: #42a5f5;
  color: white;
  margin-bottom: 15px;
  display: block;
}

.btn-apk {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.5);
  display: block;
}

/* 首屏下载按钮样式覆盖 - 浅色背景适配 */
.hero-section .btn-apk {
  background: #34a853 !important;
  color: white !important;
  border: none !important;
}

/* ============================================
   10. 页脚
   ============================================ */
.footer {
  background: #1a1a1a;
  color: #fff;
  padding: 60px 0 20px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.footer-logo {
  flex: 1;
  min-width: 250px;
}

.footer-logo .logo-circle {
  width: 40px;
  height: 40px;
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-logo p {
  color: #aaa;
}

.footer-links {
  display: flex;
  flex: 2;
  min-width: 500px;
  justify-content: space-around;
  flex-wrap: wrap;
}

.footer-column {
  margin-bottom: 20px;
  min-width: 150px;
}

.footer-column h4 {
  margin-bottom: 15px;
  color: #fff;
}

.footer-column ul {
  list-style: none;
}

.footer-column li {
  margin-bottom: 10px;
}

.footer-column a {
  color: #aaa;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-column a:hover {
  color: #1877f2;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #333;
  color: #777;
}

/* ============================================
   11. 法律页面
   ============================================ */
.legal-section {
  .nav-menu {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero-section {
    padding: 80px 20px;
  }

  .hero-section .container {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }

  .hero-content {
    max-width: 100%;
    margin-bottom: 20px;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-image {
    width: 100%;
  }

  .download-options {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }

  .download-options .btn {
    min-width: 140px;
    padding: 12px 20px;
    font-size: 0.95rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .platforms {
    flex-direction: column;
    align-items: center;
  }

  .platform {
    width: 100%;
    max-width: 350px;
  }

  .footer-content {
    flex-direction: column;
  }

  .footer-links {
    flex-direction: column;
    min-width: auto;
  }
  
  .phone-mockup {
    width: 250px;
    height: 500px;
  }
}

/* 手机设备 (max-width: 480px) */
@media screen and (max-width: 480px) {
  .hero-content h1 {
    font-size: 2rem;
  }

  .features-section,
  .download-section {
    padding: 60px 20px;
  }

  .download-section h2 {
    font-size: 2rem;
  }
  
  .phone-mockup {
    width: 220px;
    height: 440px;
  }
}