:root {
  --primary: #3a86ff;
  --secondary: #8ecae6;
  --accent: #ffb703;
  --light: #f8f9fa;
  --dark: #023047;
  --danger: #e63946;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans TC', sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--light);
}

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

header {
  background: linear-gradient(to right, var(--primary), var(--secondary));
  color: white;
  padding: 2rem 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.header-logo {
  max-width: 200px;
  margin-bottom: 1.5rem;
}

.header-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.header-content p {
  font-size: 1.2rem;
  max-width: 800px;
}

main {
  padding: 3rem 0;
}

.categories {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.category-btn {
  padding: 0.5rem 1.5rem;
  background-color: white;
  border: 2px solid var(--primary);
  border-radius: 50px;
  color: var(--primary);
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-btn:hover, .category-btn.active {
  background-color: var(--primary);
  color: white;
}

.resources {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.resource-card {
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.resource-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.card-icon {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--light);
}

.card-icon svg {
  width: 50px;
  height: 50px;
  color: var(--primary);
}

.card-content {
  padding: 1.5rem;
}

.card-content h3 {
  margin-bottom: 0.5rem;
  color: var(--dark);
  font-size: 1.2rem;
}

.card-content p {
  color: #666;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.card-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.card-link:hover {
  background-color: #2a75e6;
}

.card-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 0.25rem 0.75rem;
  background-color: var(--accent);
  color: var(--dark);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: bold;
}

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

footer {
  background-color: var(--dark);
  color: white;
  padding: 3rem 0;
  text-align: center;
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
}

.footer-logo {
  max-width: 120px;
  margin-bottom: 1.5rem;
}

.footer-content p {
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0;
}

.footer-links a {
  color: white;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.team-logo {
  max-width: 60px;
  border-radius: 50%;
  margin-right: 10px;
}

.header-brand {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.header-brand h1 {
  margin-bottom: 0;
}

.no-results {
  text-align: center;
  padding: 2rem;
  width: 100%;
  color: var(--dark);
}

@media (max-width: 768px) {
  .header-content h1 {
    font-size: 2rem;
  }
  
  .resources {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  .header-brand {
    flex-direction: column;
    text-align: center;
  }
  
  .team-logo {
    margin-right: 0;
    margin-bottom: 1rem;
  }
}

@media (max-width: 480px) {
  .header-content h1 {
    font-size: 1.8rem;
  }
  
  .category-btn {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
  }
  
  .resources {
    grid-template-columns: 1fr;
  }
}
