/* ============ GLOBAL STYLES ============ */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #fafafa;
  color: #222;
}

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

button, select, input {
  font-family: inherit;
}

/* ============ HEADER ============ */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-logo {
  width: 30px;
  height: 30px;
}

.app-title {
  font-weight: 600;
  font-size: 1.2rem;
  color: #444;
}

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

.category-dropdown {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 0.95rem;
  background: #fff;
  color: #333;
  cursor: pointer;
}

.category-dropdown:focus {
  outline: 2px solid #4e73df;
  border-color: #4e73df;
}

.search-box {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 4px 10px;
  background: #fafafa;
  transition: all 0.2s ease;
}

.search-box:focus-within {
  border-color: #4e73df;
  background: #fff;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.95rem;
  width: 200px;
  padding: 6px 4px;
  color: #333;
}

.search-box button {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  color: #666;
  margin-left: 4px;
  transition: color 0.2s ease;
}

.search-box button:hover {
  color: #000;
}

/* ============ TAG FILTERS ============ */
.tag-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 24px;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
  position: sticky;
  top: 60px;
  z-index: 9;
}

.tag-label {
  color: #555;
  font-weight: 500;
}

.tag-pill {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid #ccc;
  background: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tag-pill:hover {
  background: #f3f3f3;
}

.tag-pill.active {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* ============ SONG LIST PAGE ============ */
.songs-list-container {
  padding: 16px 24px;
  background: #fafafa;
}

.song-count {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 10px;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background 0.2s ease;
}

.list-item:hover {
  background: #f9f9f9;
}

.item-num {
  font-weight: 600;
  color: #444;
  width: 30px;
  flex-shrink: 0;
}

.item-title {
  color: #333;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1rem;
}

/* Empty state */
.empty-state {
  text-align: center;
  color: #999;
  margin-top: 20px;
}

/* ============ SONG VIEW PAGE ============ */
.song-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 10;
}

.back-btn {
  font-size: 1rem;
  color: #4e73df;
  font-weight: 500;
}

.song-header-center {
  text-align: center;
}

.song-header-center #songNumber {
  font-weight: 600;
  font-size: 1rem;
}

.song-tag {
  font-size: 0.85rem;
  color: #777;
}

.lang-toggle-btn {
  background: #4e73df;
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lang-toggle-btn:hover {
  background: #3a5fd1;
}

/* Song content */
.song-view-container {
  padding: 20px;
  background: #fff;
  min-height: 100vh;
}

.song-content {
  font-size: 1.05rem;
  line-height: 1.7;
  white-space: pre-wrap;
  color: #222;
}

.song-content b {
  font-weight: 600;
  color: #111;
}

/* ============ RESPONSIVE DESIGN ============ */
@media (max-width: 768px) {
  .main-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .header-controls {
    width: 100%;
    justify-content: space-between;
  }

  .category-dropdown {
    flex: 1;
  }

  .search-box input {
    width: 100%;
  }

  .tag-container {
    top: 100px;
  }

  .song-content {
    font-size: 1rem;
  }

  .item-title {
    font-size: 0.95rem;
  }
}

/* ============ LANDING PAGE ============ */
.landing-container {
  padding: 40px 20px;
  text-align: center;
}

.landing-title {
  font-size: 1.8rem;
  color: #222;
  margin-bottom: 32px;
  font-weight: 600;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.category-card {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 20px;
  font-size: 1.05rem;
  color: #333;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
}

.category-card:hover {
  background: #f5f7ff;
  border-color: #d5d9ff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}

.footer {
  text-align: center;
  padding: 20px 10px;
  color: #777;
  font-size: 0.9rem;
  border-top: 1px solid #eee;
  background: #fff;
}

/* MOBILE OPTIMIZATION */
@media (max-width: 600px) {
  .landing-title {
    font-size: 1.5rem;
  }

  .category-card {
    padding: 16px;
    font-size: 1rem;
  }
}
