:root {
  --primary: #10aafb;
  --text-main: #0d0d12;
  --text-secondary: #666d80;
  --bg-light: #ffffff;
  --bg-gray: #f9fafb;
  --radius-pill: 9999px;
  --transition: 0.24s cubic-bezier(0.08, 0.52, 0.52, 1);
}

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

html, body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  color: var(--text-main);
  background-color: var(--bg-light);
  scroll-behavior: smooth;
  caret-color: transparent; 
}

img {
  max-width: 100%;
  display: block;
}

/* Utility */
.container {
  width: 90%;
  max-width: 1160px;
  margin: 0 auto;
}

.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 1rem;
  transition: background var(--transition), transform var(--transition);
}

.btn-primary:hover {
  background: #10aafb;
  transform: translateY(-2px);
}

/* ===== Header ===== */
.navbar {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  z-index: 100;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.brand {
  display: flex;
  align-items: center;
  font-weight: 700;
  text-decoration: none;
  color: var(--text-main);
  gap: 8px;
}

.brand img {
  height: 31px;
  width: 31px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-weight: 500;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-main);
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--primary);
}

.badge {
  background: var(--bg-gray);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
}

.github-icon {
  width: 24px;
  height: 24px;
  background: url('assets/img/github.svg') center / contain no-repeat;
  display: inline-block;
  opacity: 0.9;
  transition: opacity var(--transition), filter var(--transition);
}

.github-icon:hover,
.github-icon:focus {
  opacity: 1;
  filter: grayscale(1) brightness(0.65);
}

.github-icon:active {
  opacity: 1;
  filter: grayscale(1) brightness(0.45);
}

/* ===== Hero ===== */
.hero {
  padding: 100px 0 60px;
  text-align: center;
  background-image: url("assets/img/carousel-background.png");
  background-size: cover;
  background-position: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: clamp(1rem, 2vw, 2rem);
  color: var(--text-secondary);
  margin-top: 16px;
}

.hero-actions {
  margin-top: 42px;
}

/* ===== Carousel ===== */
.carousel-wrapper {
  padding: 80px 0;
  background: var(--bg-light);
  position: relative;
}

.carousel {
  position: relative;
  width: 90%;
  max-width: 1288px;
  margin: 0 auto;
  overflow: hidden;
}

.slides {
  display: flex;
  transition: transform var(--transition);
  overflow: hidden;
  width: 300%;
}

.slide {
  flex: 0 0 33.333%;
  min-width: 33.333%;
  transition: transform var(--transition);
}

.slide img,
.slide picture {
  width: 100%;
  height: auto;
  display: block;
}

.arrow {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  font-size: 22px;
  color: var(--text-main);
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.arrow:hover {
  background: var(--primary);
  color: #fff;
}

.arrow.prev {
  left: -22px;
}

.arrow.next {
  right: -22px;
}

.dots {
  margin-top: 18px;
  text-align: center;
}

.dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  margin: 0 6px;
  background: #d0d5dd;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.dots button.active {
  background: var(--primary);
  transform: scale(1.1);
}

/* 允許圖片接收事件，但禁用拖拽在 JS 中處理 */
.slide img {
  pointer-events: auto;
  user-select: none; /* 阻止選取 */
}

.community {
  padding: 96px 0;
  text-align: center;
  background: linear-gradient(90deg, #ffffff 0%, #f6f9fc 50%, #ffffff 100%);
}

.community h2 {
  font-size: 2.25rem;
  font-weight: 600;
  margin-bottom: 42px;
}

.community-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
}

.community-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  transition: color var(--transition);
}

.community-item:hover {
  color: var(--primary);
}

.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  background-size: contain;
  background-repeat: no-repeat;
}

.icon.github {
  background-image: url('assets/img/github.svg');
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-light);
  padding: 40px 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ===== Responsive tweaks ===== */
@media (max-width: 768px) {
  .nav-links {
    gap: 16px;
  }
  .arrow.prev {
    left: 0;
  }
  .arrow.next {
    right: 0;
  }
}

/* WeChat QR image */
.wechat-qr {
  width: 200px;
  max-width: 60%;
  height: auto;
  margin: 24px auto 32px;
  display: block;
} 