:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #161f3d;
  --text-muted: #5b6478;
  --border: #e4e7f0;
  --accent: #2f6fed;
  --accent-hover: #2559c4;
  --accent-lang: #8b7cf0;
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1526;
    --surface: #1a2140;
    --text: #eef0f8;
    --text-muted: #9aa2bd;
    --border: #2b3358;
    --accent: #5c8dff;
    --accent-hover: #7ea2ff;
    --accent-lang: #a698ff;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Open Sans", "Noto Sans TC", -apple-system, "PingFang TC", "Microsoft JhengHei", Segoe UI, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

.site-header {
  padding: 36px 0 18px;
}

.site-header h1 {
  margin: 0;
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.subtitle {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.about-section {
  padding-bottom: 20px;
}

.about-section p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 640px;
}

.banner-section {
  margin-bottom: 24px;
}

.banner-section img {
  width: 100%;
  border-radius: var(--radius);
  display: block;
}

#search {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}

.login-gate {
  padding: 60px 0;
}

.login-box {
  max-width: 420px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 2px rgba(22, 31, 61, 0.06);
}

.login-error {
  color: #d64545;
  font-size: 0.85rem;
  margin: 0;
}

.content-section {
  margin-bottom: 40px;
}

.section-heading {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.toolbar #search {
  flex: 1;
}

.session-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 40px;
}

.session-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(22, 31, 61, 0.05);
}

.session-card h2 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 700;
}

.session-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.session-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.tag {
  background: #f4f5f9;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.lang-tag {
  background: var(--accent-lang);
  border-color: var(--accent-lang);
  color: #fff;
  font-weight: 700;
}

.resources-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.resource-item {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  text-decoration: none;
  color: var(--text);
}

.resource-item:hover {
  border-color: var(--accent);
}

.resource-title {
  font-size: 0.95rem;
  font-weight: 700;
}

.resource-desc {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 2px;
}

.session-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn.primary:hover {
  background: var(--accent-hover);
}

.video-embed {
  margin-top: 14px;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.video-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
}

.support-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: 0 1px 2px rgba(22, 31, 61, 0.05);
}

.support-box h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
}

.support-box p {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.support-box a {
  color: var(--accent);
  font-weight: 600;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
}
