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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans TC", sans-serif;
  background: #f7f7f7;
  color: #333;
  line-height: 1.6;
}

header {
  background: #1a1a1a;
  color: white;
  text-align: center;
  padding: 40px 20px;
}

header h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.filters {
  background: white;
  padding: 20px;
  margin: 20px auto;
  max-width: 1200px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.filter-group {
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filter-group span {
  font-weight: 600;
  min-width: 50px;
}

.filter-btn {
  padding: 6px 14px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: #333;
}

.filter-btn.active {
  background: #1a1a1a;
  color: white;
  border-color: #1a1a1a;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 20px;
}

.course-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
}

.course-card:hover {
  transform: translateY(-4px);
}

.course-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 12px;
}

.tags {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.tag {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: #f0f0f0;
}

.tag.online {
  background: #e6f4ea;
  color: #137333;
}

.tag.offline {
  background: #e8f0fe;
  color: #1a73e8;
}

.description {
  font-size: 0.9rem;
  color: #555;
  flex-grow: 1;
  margin-bottom: 16px;
}

.book-btn {
  display: inline-block;
  text-align: center;
  background: #1a1a1a;
  color: white;
  text-decoration: none;
  padding: 10px;
  border-radius: 8px;
  font-weight: 500;
  transition: background 0.2s;
}

.book-btn:hover {
  background: #333;
}

footer {
  text-align: center;
  padding: 30px 20px;
  color: #888;
  font-size: 0.9rem;
}

footer a {
  color: #1a1a1a;
}
