:root {
  --bg-main: #fbfbf9;
  --bg-sub: #f0f4ea;
  --bg-card: #ffffff;
  --text-main: #2c332d;
  --text-muted: #6b726c;
  --brand-green: #4f7c45;
  --brand-orange: #e87a36;
  --brand-berry: #c94b5c;
  --border-light: #e2e8dd;
  --shadow-sm: 0 4px 12px rgba(79, 124, 69, 0.05);
  --shadow-md: 0 8px 24px rgba(79, 124, 69, 0.1);
  --shadow-lg: 0 12px 32px rgba(79, 124, 69, 0.15);
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 50px;
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

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

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

/* Typography */
h1, h2, h3 {
  font-weight: 700;
  line-height: 1.3;
}

.gradient-title {
  background: linear-gradient(90deg, var(--brand-green), var(--brand-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  background: rgba(251, 251, 249, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

.logo-group img {
  height: 32px;
  width: auto;
}

.nav-links {
  display: none;
  gap: 24px;
  font-size: 15px;
  color: var(--text-muted);
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-download-sm {
  background-color: var(--brand-green);
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.btn-download-sm:hover {
  background-color: #3d6135;
}

.menu-toggle {
  display: block;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-main);
  cursor: pointer;
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  width: 100%;
  background: var(--bg-main);
  border-bottom: 1px solid var(--border-light);
  padding: 16px 20px;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-md);
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu a {
  font-size: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

/* Sections */
section {
  padding: 60px 0;
}

.section-header {
  margin-bottom: 32px;
  text-align: center;
}

.section-header h2 {
  font-size: 28px;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 15px;
}

/* Hero */
.hero {
  padding: 40px 0 20px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

.hero-content h1 {
  font-size: 36px;
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.search-box {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 6px 6px 6px 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.search-box input {
  border: none;
  outline: none;
  background: transparent;
  flex: 1;
  font-size: 16px;
  color: var(--text-main);
}

.search-box input::placeholder {
  color: #a0a6a0;
}

.search-btn {
  background: var(--brand-green);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.search-btn:hover {
  background: #3d6135;
}

.hot-words {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.hot-words span {
  cursor: pointer;
  transition: color 0.2s;
}

.hot-words span:hover {
  color: var(--brand-orange);
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
}

.btn-primary {
  background: var(--brand-orange);
  color: white;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(232, 122, 54, 0.3);
}

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

.btn-secondary {
  background: var(--bg-card);
  color: var(--brand-green);
  border: 1px solid var(--brand-green);
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: var(--bg-sub);
}

.hero-stats {
  display: flex;
  gap: 24px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--brand-green);
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

.hero-visual {
  position: relative;
  height: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-sub);
  box-shadow: var(--shadow-lg);
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Horizontal Shelf */
.shelf-wrapper {
  margin-top: 40px;
  overflow: hidden;
}

.shelf-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.scroll-shelf {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 16px;
  scrollbar-width: none;
}

.scroll-shelf::-webkit-scrollbar {
  display: none;
}

.card {
  flex: 0 0 160px;
  scroll-snap-align: start;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  position: relative;
  cursor: pointer;
}

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

.card-cover {
  width: 100%;
  aspect-ratio: 3/4;
  position: relative;
  overflow: hidden;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-cover img {
  transform: scale(1.05);
}

.card-info {
  padding: 12px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.tag {
  font-size: 11px;
  color: var(--brand-green);
  background: var(--bg-sub);
  padding: 2px 6px;
  border-radius: 4px;
}

.card-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.card-hover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: white;
}

.card:hover .card-hover-overlay {
  opacity: 1;
}

.card-hover-desc {
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-hover-btn {
  background: var(--brand-orange);
  color: white;
  text-align: center;
  padding: 6px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
}

/* Category */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.category-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  cursor: pointer;
  border: 1px solid transparent;
}

.category-card:hover {
  border-color: var(--brand-green);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.category-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.category-name {
  font-size: 16px;
  font-weight: 600;
}

/* Ranking */
.ranking-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.tab-btn.active, .tab-btn:hover {
  background: var(--brand-green);
  color: white;
  border-color: var(--brand-green);
}

.ranking-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  padding: 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.rank-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.rank-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--brand-berry);
  width: 30px;
  text-align: center;
  font-style: italic;
}

.rank-num.top1 { color: var(--brand-orange); }
.rank-num.top2 { color: #a0a6a0; }
.rank-num.top3 { color: #cd7f32; }

.rank-cover {
  width: 60px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-info {
  flex: 1;
}

.rank-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.rank-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
}

/* Discovery */
.discovery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.empty-tip {
  display: none;
  text-align: center;
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 15px;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.feature-item {
  text-align: center;
  padding: 24px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.feature-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 14px;
  color: var(--text-muted);
}

/* Download */
.download-section {
  background: linear-gradient(135deg, var(--bg-sub), #e5edd8);
  text-align: center;
  padding: 60px 20px;
  border-radius: var(--radius-lg);
  margin: 40px 20px;
}

.download-section h2 {
  font-size: 28px;
  margin-bottom: 16px;
}

.download-section p {
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 16px;
}

.btn-download-large {
  display: inline-block;
  background: var(--brand-orange);
  color: white;
  padding: 16px 48px;
  border-radius: var(--radius-pill);
  font-size: 20px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(232, 122, 54, 0.4);
  transition: var(--transition-smooth);
}

.btn-download-large:hover {
  background: #d06b2b;
  transform: translateY(-4px);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-light);
  padding: 32px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  background: var(--bg-main);
}

.footer p {
  margin-bottom: 8px;
}

.footer a {
  color: var(--text-muted);
}

.footer a:hover {
  color: var(--brand-green);
}

/* Animations */
.fade-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.animate {
  opacity: 0;
  transform: translateY(20px);
}

/* Responsive */
@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .hero-content h1 {
    font-size: 42px;
  }

  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .ranking-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .discovery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .download-section {
    margin: 60px auto;
    max-width: 800px;
  }
}

@media (min-width: 1024px) {
  .nav-links {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .hero-content h1 {
    font-size: 48px;
  }

  .category-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .discovery-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .card {
    flex: 0 0 200px;
  }
}