/* 超简化版 CSS */
:root {
  --primary: #50a3fc;
  --focus: #ff6b35;
  --text: #2c3e50;
  --text-light: #7f8c8d;
  --shadow: rgba(0, 0, 0, 0.08);
  --transition: 0.3s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font: 16px/1.6 -apple-system, 'Microsoft YaHei', sans-serif;
  background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
  min-height: 100vh;
  color: #2c3e50;
  color: var(--text);
  padding: 15px;
  opacity: 0;
  transition: opacity 0.3s;
  transition: opacity var(--transition);
}

body.language-loaded {
  opacity: 1;
}

/* 布局 */
.main-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px 15px;
}

.action-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  gap: 20px;
  flex-wrap: wrap;
}

.left-group {
  display: flex;
  gap: 15px;
}

/* 按钮基础样式 */
.action-btn,
.lang-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: white;
  color: #2c3e50;
  color: var(--text);
  text-decoration: none;
  border-radius: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 15px var(--shadow);
  transition: all 0.3s;
  transition: all var(--transition);
  font-weight: 500;
  border: none;
  cursor: pointer;
  gap: 10px;
  outline: none;
}

/* 语言按钮组 */
.lang-group {
  display: flex;
  background: white;
  padding: 5px;
  border-radius: 35px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 15px var(--shadow);
}

.lang-action-btn {
  background: transparent;
  box-shadow: none;
  min-width: 100px;
  padding: 10px 20px;
  margin: 0 2px;
}

/* 按钮状态 */
.action-btn:hover,
.action-btn:focus {
  background: #ff6b35;
  background: var(--focus);
  color: white;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4), 0 0 0 3px #ff6b35;
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4), 0 0 0 3px var(--focus);
}

.lang-action-btn.active {
  background: #50a3fc;
  background: var(--primary);
  color: white;
  transform: scale(1.05);
}

.lang-action-btn:hover,
.lang-action-btn:focus,
.lang-action-btn.active:hover,
.lang-action-btn.active:focus {
  background: #ff6b35;
  background: var(--focus);
  color: white;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

.lang-action-btn.active:hover,
.lang-action-btn.active:focus {
  transform: translateY(-2px) scale(1.08);
}

/* 应用网格 */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-gap: 25px;
}

/* 应用卡片 */
.app-card {
  background: white;
  border-radius: 20px;
  padding: 30px 20px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  box-shadow: 0 5px 20px var(--shadow);
  transition: all 0.3s;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
  animation-delay: calc(0.1s * var(--i));
}

.app-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ffb088, #ff8c61);
  transform: translateX(-100%);
  transition: all 0.3s;
  transition: all var(--transition);
}

.app-card:hover,
.app-card:focus,
.app-card:focus-within {
  background: #ff6b35;
  background: var(--focus);
  transform: scale(1.08);
  box-shadow: 0 10px 40px rgba(255, 107, 53, 0.5), 0 0 0 3px #ff6b35;
  box-shadow: 0 10px 40px rgba(255, 107, 53, 0.5), 0 0 0 3px var(--focus);
  z-index: 10;
}

.app-card:hover::before,
.app-card:focus::before,
.app-card:focus-within::before {
  transform: translateX(0);
  background: linear-gradient(90deg, #fff, #ffe4d6);
  height: 6px;
}

/* 应用内容 */
.app-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 15px;
  border-radius: 18px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
  transition: all var(--transition);
}

.app-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  color: var(--text);
  margin-bottom: 8px;
  display: block;
  text-decoration: none;
  transition: color 0.3s;
  transition: color var(--transition);
  outline: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-description {
  color: #7f8c8d;
  color: var(--text-light);
  font-size: 0.85rem;
  line-height: 1.4;
  transition: color 0.3s;
  transition: color var(--transition);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-card:hover .app-icon,
.app-card:focus .app-icon,
.app-card:focus-within .app-icon {
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.app-card:hover .app-title,
.app-card:focus .app-title,
.app-card:focus-within .app-title {
  color: white;
}

.app-card:hover .app-description,
.app-card:focus .app-description,
.app-card:focus-within .app-description {
  color: #ffe4d6;
}

/* 加载动画 */
.loading {
  width: 50px;
  height: 50px;
  margin: 50px auto;
  border: 3px solid rgba(80, 163, 252, 0.3);
  border-top-color: #50a3fc;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* 动画 */
@keyframes spin {
  to { transform: rotate(360deg); }
}

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

/* 响应式 - 平板 */
@media (max-width: 768px) {
  .action-section { flex-direction: column; }
  .app-grid { grid-template-columns: repeat(4, 1fr); gap: 15px; }
  .app-card { padding: 20px 15px; }
  .app-icon { width: 60px; height: 60px; }
}

/* 响应式 - 大手机 */
@media (max-width: 580px) {
  .app-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .app-card { padding: 15px 10px; }
  .app-icon { width: 50px; height: 50px; }
  .app-title { font-size: 0.95rem; }
  .app-description { font-size: 0.75rem; }
  .lang-action-btn { min-width: 80px; padding: 8px 12px; font-size: 0.9rem; }
}

/* 响应式 - 小手机 */
@media (max-width: 420px) {
  .app-grid { grid-template-columns: repeat(2, 1fr); }
}

/* TV模式 - 仅大屏幕且高度受限时 */
@media screen and (min-width: 1200px) and (max-height: 1080px) {
  .app-grid { grid-template-columns: repeat(5, 1fr); }
}

/* ====================================================================== */
/* Help页面样式 */
/* ====================================================================== */

.help-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
  line-height: 1.6;
}

.help-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 3px solid #50a3fc;
  border-bottom: 3px solid var(--primary);
}

.help-header h1 {
  font-size: 2.5rem;
  color: #2c3e50;
  color: var(--text);
  margin-bottom: 15px;
  font-weight: 700;
}

.help-subtitle {
  font-size: 1.2rem;
  color: #7f8c8d;
  color: var(--text-light);
  font-weight: 500;
}

.step-section {
  margin-bottom: 40px;
  padding: 30px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  box-shadow: 0 5px 20px var(--shadow);
  position: relative;
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
  animation-delay: calc(0.1s * var(--i));
}

.step-number {
  font-size: 1.4rem;
  color: #50a3fc;
  color: var(--primary);
  margin-bottom: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.step-number::before {
  content: '';
  width: 6px;
  height: 30px;
  background: #ff6b35;
  background: var(--focus);
  margin-right: 15px;
  border-radius: 3px;
}

.step-content {
  color: #2c3e50;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.8;
  padding-left: 21px;
}

.step-image {
  margin-top: 20px;
  padding-left: 21px;
  text-align: center;
}

.step-image img {
  max-width: 280px;
  max-height: 500px;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 15px var(--shadow);
}

/* Tutorial Tabs */
.tutorial-tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 15px;
  background: white;
  padding: 5px;
  border-radius: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 15px var(--shadow);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.tab-btn {
  padding: 8px 24px;
  border: none;
  background: transparent;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 500;
  color: #2c3e50;
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s;
  transition: all var(--transition);
}

.tab-btn:hover {
  background: rgba(80, 163, 252, 0.1);
}

.tab-btn.active {
  background: #50a3fc;
  background: var(--primary);
  color: white;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeInUp 0.4s ease-out;
}

.video-section {
  margin-bottom: 30px;
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  box-shadow: 0 5px 20px var(--shadow);
  padding: 25px;
}

.video-wrapper {
  max-width: 400px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 15px var(--shadow);
}

.video-section video {
  display: block;
  width: 100%;
  max-width: 100%;
  background: #000;
}

.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  background: #50a3fc;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 30px;
  box-shadow: 0 4px 15px rgba(80, 163, 252, 0.3);
  transition: all 0.3s;
  transition: all var(--transition);
  font-weight: 500;
  gap: 10px;
  margin-top: 30px;
}

.back-button:hover,
.back-button:focus {
  background: #ff6b35;
  background: var(--focus);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
  color: white;
}

.back-button svg {
  transition: transform 0.3s;
  transition: transform var(--transition);
}

.back-button:hover svg,
.back-button:focus svg {
  transform: translateX(-3px);
}

/* Help页面响应式 */
@media (max-width: 768px) {
  .help-container {
    padding: 20px 15px;
  }
  
  .help-header h1 {
    font-size: 2rem;
  }
  
  .help-subtitle {
    font-size: 1rem;
  }
  
  .step-section {
    padding: 20px;
    margin-bottom: 25px;
  }
  
  .step-number {
    font-size: 1.2rem;
  }
  
  .step-content {
    font-size: 0.9rem;
    padding-left: 21px;
  }
}

/* ====================================================================== */
/* 选择界面样式 */
/* ====================================================================== */

.select-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 100px);
  text-align: center;
  padding: 40px 20px;
}

.select-title {
  font-size: 2.5rem;
  color: #2c3e50;
  color: var(--text);
  margin-bottom: 10px;
  font-weight: 700;
}

.select-subtitle {
  font-size: 1.2rem;
  color: #7f8c8d;
  color: var(--text-light);
  margin-bottom: 50px;
}

.platform-cards {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

.platform-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 220px;
  background: white;
  border-radius: 25px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
  box-shadow: 0 5px 25px var(--shadow);
  text-decoration: none;
  transition: all 0.3s;
  transition: all var(--transition);
  padding: 30px;
}

.platform-card:hover,
.platform-card:focus {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 15px 40px rgba(80, 163, 252, 0.3);
  background: #50a3fc;
  background: var(--primary);
}

.platform-card:hover .platform-icon,
.platform-card:focus .platform-icon {
  color: white;
}

.platform-card:hover .platform-name,
.platform-card:focus .platform-name {
  color: white;
}

.platform-card:hover .platform-desc,
.platform-card:focus .platform-desc {
  color: rgba(255, 255, 255, 0.8);
}

.platform-icon {
  color: #50a3fc;
  color: var(--primary);
  margin-bottom: 15px;
  transition: all 0.3s;
  transition: all var(--transition);
}

.platform-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2c3e50;
  color: var(--text);
  margin-bottom: 5px;
  transition: all 0.3s;
  transition: all var(--transition);
}

.platform-desc {
  font-size: 0.9rem;
  color: #7f8c8d;
  color: var(--text-light);
  transition: all 0.3s;
  transition: all var(--transition);
}

/* 选择界面响应式 */
@media (max-width: 500px) {
  .select-title {
    font-size: 1.8rem;
  }

  .select-subtitle {
    font-size: 1rem;
    margin-bottom: 30px;
  }

  .platform-cards {
    gap: 20px;
  }

  .platform-card {
    width: 160px;
    height: 180px;
    padding: 20px;
  }

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

  .platform-name {
    font-size: 1.2rem;
  }
}
/* 下载反馈 Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 8%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 14px 32px;
  border-radius: 999px;
  border: 2px solid #ff6b35;
  border: 2px solid var(--focus);
  font-size: 1.15rem;
  white-space: nowrap;
  max-width: 90vw;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  transition: opacity var(--transition), transform var(--transition);
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

