:root {
  --primary: #6B1629;
  --primary-hover: #8C2038;
  --secondary: #8C2038;
  --neutral: #666666;
  --bg-light: #F5E6EA;
  --bg-lighter: #FAF5F6;
  --white: #FFFFFF;
  --text: #000000;
  --text-secondary: #666666;
  --border: #E0D0D5;
  --shadow: 0 2px 8px rgba(107, 22, 41, 0.08);
  --radius: 12px;
  --font-sans: 'Segoe UI', 'Noto Sans TC', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg-lighter);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: var(--white);
  padding: 60px 40px 48px;
  border-radius: 0 0 var(--radius) var(--radius);
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

header .eyebrow {
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 8px;
}

header h1 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: 1px;
}

header .subtitle {
  font-size: 18px;
  opacity: 0.9;
  margin-top: 8px;
  font-weight: 400;
}

header .meta {
  margin-top: 20px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 14px;
  opacity: 0.85;
}

header .presentation-link {
  margin-top: 16px;
}

header .presentation-link a {
  display: inline-block;
  padding: 10px 24px;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

header .presentation-link a:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.7);
}

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  padding: 0 4px;
}

.filter-btn {
  padding: 8px 20px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  font-family: var(--font-sans);
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.course-grid {
  display: grid;
  gap: 20px;
}

.course-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
}

.course-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

a { text-decoration: none; color: inherit; }

.illustration-wrap {
  width: 200px;
  height: 120px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg-lighter);
  cursor: pointer;
  position: relative;
}

.illustration-wrap::after {
  content: '放大';
  position: absolute;
  top: 4px; right: 4px;
  font-size: 11px;
  padding: 2px 8px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.illustration-wrap:hover::after {
  opacity: 1;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.6);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.open {
  display: flex;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.modal-close {
  position: absolute;
  top: 8px; right: 12px;
  font-size: 28px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--neutral);
  line-height: 1;
  z-index: 1;
}

.modal-close:hover {
  color: var(--primary);
}

.modal-body {
  padding: 32px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
}

.modal-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

.card-illustration {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.course-card-header {
  padding: 24px 28px 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.course-card-header .left { flex: 1; }

.course-date {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.course-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.3;
}

.course-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.course-badge {
  font-size: 12px;
  padding: 4px 14px;
  border-radius: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

.badge-copilot { background: #E8F0FE; color: #1A73E8; }
.badge-dev { background: #E6F7E6; color: #1B7A1B; }
.badge-excel { background: #F0F0F0; color: #217346; }
.badge-agent { background: #FFF3E0; color: #E65100; }
.badge-tool { background: #F3E8FF; color: #7B1FA2; }
.badge-risk { background: #FFEBEE; color: #C62828; }

.course-card-body {
  padding: 0 28px 24px;
}

.course-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.course-stats {
  display: flex;
  gap: 20px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--neutral);
}

.course-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.course-detail.open {
  max-height: 2000px;
}

.course-detail-inner {
  padding: 0 28px 28px;
  border-top: 1px solid var(--border);
}

.course-detail-inner h4 {
  font-size: 14px;
  color: var(--primary);
  margin: 20px 0 10px;
  font-weight: 700;
}

.course-detail-inner ul {
  list-style: none;
  padding: 0;
}

.course-detail-inner ul li {
  padding: 6px 0 6px 20px;
  position: relative;
  font-size: 14px;
  color: var(--text);
}

.course-detail-inner ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.scenario-cards {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.scenario-card {
  background: var(--bg-lighter);
  border-radius: 8px;
  padding: 14px 16px;
  border-left: 3px solid var(--primary);
}

.scenario-card .scenario-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

.scenario-card .scenario-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.takeaway-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.takeaway-tag {
  font-size: 12px;
  padding: 5px 14px;
  background: var(--bg-light);
  color: var(--primary);
  border-radius: 16px;
  font-weight: 500;
}

footer {
  text-align: center;
  padding: 40px 0;
  color: var(--neutral);
  font-size: 13px;
}

@media (max-width: 768px) {
  .app { padding: 0 16px; }
  header { padding: 40px 24px 32px; }
  header h1 { font-size: 26px; }
  header .subtitle { font-size: 15px; }
  .course-card-header { padding: 20px 20px 16px; flex-wrap: wrap; }
  .illustration-wrap { width: 100%; height: auto; max-height: 160px; }
  .course-card-body { padding: 0 20px 20px; }
  .course-detail-inner { padding: 0 20px 20px; }
  .course-title { font-size: 17px; }
  .filter-bar { gap: 8px; }
  .filter-btn { padding: 6px 14px; font-size: 13px; }
}
