:root {
  --bg: #0f1720;
  --card: #0b1220;
  --muted: #9aa6b2;
  --accent: #06b6d4;
  --glass: rgba(255, 255, 255, 0.03);
  --card-radius: 12px;
  --max-width: 1100px;
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  background: linear-gradient(180deg, #071021 0%, #071827 100%);
  color: #e6eef6;
  -webkit-font-smoothing: antialiased;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-title h1 {
  margin: 0;
  font-size: 1.25rem
}

.site-title .title-zh {
  font-weight: 700
}

.site-title .title-en {
  margin-left: 0.6rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500
}

.site-title .subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem
}

.site-title .subtitle-en {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 2px
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 0.25rem
}

#search {
  width: 320px;
  max-width: 60vw;
  padding: 0.6rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--glass);
  color: inherit
}

#clearSearch {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem
}

/* Language switch buttons */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 0.75rem
}

.lang-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: inherit;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 150ms ease
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.02);
  transform: translateY(-2px)
}

.lang-btn:focus {
  outline: 3px solid rgba(6, 182, 212, 0.14);
  outline-offset: 2px
}

.lang-btn.active {
  background: var(--accent);
  color: #042023;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 20px rgba(6, 182, 212, 0.12)
}

@media (max-width:520px) {
  .lang-switch {
    margin-top: 0.5rem
  }

  .lang-btn {
    padding: 6px 8px;
    font-size: 0.85rem
  }
}

main {
  max-width: var(--max-width);
  margin: 1rem auto;
  padding: 0 1rem
}

.stats {
  color: var(--muted);
  margin-bottom: 0.5rem
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.02));
  border-radius: var(--card-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 160px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.thumb {
  background: #111827;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 700;
  font-size: 1.1rem
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block
}

.card-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1
}

.card-title {
  font-size: 1rem;
  margin: 0
}

.card-desc {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
  flex: 1
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center
}

.play-btn {
  margin-left: auto;
  background: var(--accent);
  border: 0;
  color: #042023;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem
}

.tag {
  background: rgba(255, 255, 255, 0.03);
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--muted)
}

@media (max-width:520px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start
  }

  #search {
    width: 100%
  }
}

.empty-state {
  padding: 2rem;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(0, 0, 0, 0.02));
  color: var(--muted);
  text-align: center
}

/* Footer message styles */
.site-footer{
  max-width: var(--max-width);
  margin: 1.25rem auto;
  padding: 0 1rem;
  text-align: center;
}
.site-footer .footer-content-inner{
  padding: 0.75rem 0;
}
.site-footer .footer-msg{ display: none; color: var(--muted); font-size: 0.95rem }
.site-footer .footer-msg-zh{ display: inline }
