/* 通用样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 头部样式 */
header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem 0;
  text-align: center;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

header p {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* 主要内容区域 */
main {
  padding: 2rem 0;
  min-height: calc(100vh - 200px);
}

/* 应用卡片网格 */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.app-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.app-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.app-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  background-color: #f8f9fa;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #e9ecef;
  overflow: hidden;
}

.app-logo img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.app-logo-large {
  width: 100px;
  height: 100px;
  background-color: #f8f9fa;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #e9ecef;
  overflow: hidden;
}

.app-logo-large img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 16px;
  object-fit: cover;
}

.app-header-with-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  max-width: 600px;
  margin: 0 auto;
}

.app-header-content {
  text-align: left;
}

.app-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

.app-info {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.app-status {
  background-color: #28a745;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.app-status.coming-soon {
  background-color: #ffc107;
  color: #212529;
}

.app-platform {
  background-color: #f8f9fa;
  color: #6c757d;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.doc-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.doc-meta {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #6c757d;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
  margin: 0 5px;
}

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

.btn-primary:hover {
  background-color: #5a6fd8;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background-color: #5a6268;
}

.app-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* 文档页面样式 */
.doc-nav {
  background: white;
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
  margin-bottom: 2rem;
}

.doc-nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.doc-nav .back-link {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.doc-nav .back-link:hover {
  text-decoration: underline;
}

.doc-content {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  max-width: 800px;
  margin: 0 auto;
}

.doc-content h1 {
  color: #333;
  margin-bottom: 1rem;
  border-bottom: 2px solid #667eea;
  padding-bottom: 0.5rem;
}

.doc-content h2 {
  color: #444;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.doc-content p {
  margin-bottom: 1rem;
  text-align: justify;
}

.doc-content ul,
.doc-content ol {
  margin-left: 2rem;
  margin-bottom: 1rem;
}

.doc-content li {
  margin-bottom: 0.5rem;
}

/* Language Switcher Styles */
.language-switcher {
  display: flex;
  background: #f8f9fa;
  border-radius: 25px;
  padding: 4px;
  gap: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #6c757d;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.lang-btn:hover {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  transform: translateY(-1px);
}

.lang-btn.active {
  background: #667eea;
  color: white;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.lang-btn.active:hover {
  background: #5a6fd8;
  transform: translateY(-1px);
}

.lang-flag {
  font-size: 16px;
  line-height: 1;
}

.lang-text {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* 页脚样式 */
footer {
  background-color: #333;
  color: white;
  text-align: center;
  padding: 1rem 0;
  margin-top: 2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }

  .apps-grid {
    grid-template-columns: 1fr;
    padding: 0 10px;
  }

  .app-card {
    padding: 1.5rem;
  }

  .doc-content {
    padding: 1.5rem;
    margin: 0 10px;
  }

  .app-header-with-logo {
    flex-direction: column;
    text-align: center;
  }

  .app-header-content {
    text-align: center;
  }

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

  .app-meta {
    align-items: center;
  }

  .language-switcher {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 10px;
  }

  .lang-btn {
    flex: 1;
    justify-content: center;
    max-width: 120px;
  }

  .doc-nav .container {
    justify-content: center;
  }

  .back-link {
    order: 1;
  }

  .nav-title {
    order: 2;
  }
}
