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

/* 浅色主题 - 白底蓝字 */
:root,
[data-theme="light"] {
  --background: #ffffff;
  --foreground: #1e40af;
  --text-secondary: #3b82f6;
  --link-hover: #1d4ed8;
  --card-bg: #f8fafc;
  --card-border: #e2e8f0;
  --badge-bg: #dbeafe;
  --badge-text: #1e40af;
  --badge-hot-bg: #fef3c7;
  --badge-hot-text: #d97706;
  --section-title-border: #3b82f6;
  --footer-text: #64748b;
  --toggle-bg: #f1f5f9;
  --toggle-text: #475569;
}

/* 深色主题 - 黑底橙字 */
[data-theme="dark"] {
  --background: #000000;
  --foreground: #fb923c;
  --text-secondary: #f97316;
  --link-hover: #fdba74;
  --card-bg: #171717;
  --card-border: #404040;
  --badge-bg: #78350f;
  --badge-text: #fdba74;
  --badge-hot-bg: #78350f;
  --badge-hot-text: #fbbf24;
  --section-title-border: #f97316;
  --footer-text: #a1a1aa;
  --toggle-bg: #262626;
  --toggle-text: #d4d4d4;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Noto Sans SC', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 头部样式 */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--card-border);
}

.title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--toggle-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.theme-toggle:hover {
  opacity: 0.8;
}

.toggle-icon {
  font-size: 1.25rem;
}

/* 主内容区域 */
.main-content {
  flex: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
  width: 100%;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--section-title-border);
}

/* 简介区域 */
.intro-section {
  margin-bottom: 2.5rem;
}

.intro-text {
  line-height: 1.8;
  color: var(--foreground);
}

/* 资源列表 */
.resource-section {
  margin-bottom: 2.5rem;
}

.resource-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.resource-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.2s ease;
}

.resource-card:hover {
  border-color: var(--foreground);
}

.resource-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.resource-name {
  font-size: 1.125rem;
  font-weight: 600;
}

.resource-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.625rem;
  background: var(--badge-bg);
  color: var(--badge-text);
  border-radius: 4px;
  font-weight: 500;
}

.resource-badge.hot {
  background: var(--badge-hot-bg);
  color: var(--badge-hot-text);
}

.resource-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.resource-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--foreground);
  color: var(--background);
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.resource-link:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

/* 观看须知 */
.notice-section {
  margin-bottom: 2rem;
}

.notice-list {
  list-style: none;
  padding: 0;
}

.notice-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.notice-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--foreground);
}

/* 页脚 */
.footer {
  text-align: center;
  padding: 1.5rem;
  border-top: 1px solid var(--card-border);
  color: var(--footer-text);
  font-size: 0.875rem;
}

/* 响应式设计 */
@media (max-width: 640px) {
  .header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .title {
    font-size: 1.5rem;
  }

  .main-content {
    padding: 1.5rem 1rem;
  }

  .resource-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .resource-links {
    flex-direction: column;
  }

  .resource-link {
    text-align: center;
  }
}
