/* The Tune Machine - Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --bg-page: #f0f2f5;
  --bg-card: #ffffff;
  --text-primary: #11141a;
  --text-muted: #555d6b;
  --text-subtle: #8a92a0;
  --accent-blue: #0b57d0;
  --accent-blue-hover: #0842a0;
  --border-light: #e3e6ec;
  --border-focus: #0b57d0;
  --badge-bg: #f1f3f7;
  --tag-color: #2b303b;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Courier New', Courier, monospace;
}

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

body {
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 14px;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.browser-window {
  background-color: var(--bg-card);
  width: 100%;
  max-width: 860px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

/* Site Content Container */
.site-content {
  padding: 2rem 2.25rem 2.5rem;
}

/* Brand & Search Header */
.brand-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
  gap: 1.25rem;
  flex-wrap: wrap;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-logo {
  height: 58px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
  display: block;
}

/* Search Bar */
.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 0.38rem 1rem;
  border: 1px solid #7e8796;
  border-radius: 16px;
  width: 210px;
  background-color: #ffffff;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}

.search-input::placeholder {
  color: #4b5260;
  opacity: 0.85;
}

.search-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(11, 87, 208, 0.15);
  width: 250px;
}

.clear-search-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-subtle);
  font-size: 0.9rem;
  cursor: pointer;
  display: none;
}

.clear-search-btn.active {
  display: block;
}

/* Heading & Subtitle */
.database-heading-wrapper {
  margin-top: 1.5rem;
  margin-bottom: 1.25rem;
}

.database-heading {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #000000;
  line-height: 1.5;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.database-subheading {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Active Filter Pill Bar */
.active-filter-bar {
  display: none;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.75rem;
  background: #f1f5fa;
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  border: 1px solid #dbe2ea;
}

.active-filter-bar.visible {
  display: flex;
}

.active-filter-label {
  font-weight: 600;
  color: var(--text-primary);
}

.active-filter-clear {
  color: var(--accent-blue);
  cursor: pointer;
  text-decoration: underline;
  margin-left: auto;
}

/* Show List */
.show-list {
  display: flex;
  flex-direction: column;
}

.show-item {
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: background-color 0.15s ease;
}

.show-item:last-child {
  border-bottom: 1px solid var(--border-light);
}

.show-item:hover {
  background-color: #fafbfc;
}

.show-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  position: relative;
}

.show-title-link {
  font-size: 0.95rem;
  font-weight: 700;
  color: #000000;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.15s ease;
}

.show-title-link:hover {
  color: var(--accent-blue);
}

.arrow-icon {
  font-size: 0.85rem;
  font-weight: 600;
}

/* Tooltip Badge on Hover */
.youtube-tooltip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: #eef2f6;
  border: 1px solid #d5dce5;
  color: #2b303b;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  opacity: 0;
  transform: translateY(2px);
  transition: all 0.15s ease;
  pointer-events: none;
}

.show-item:hover .youtube-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.show-description {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.show-tags-wrapper {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.15rem;
}

.tag-btn {
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: #11141a;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  transition: color 0.15s ease;
}

.tag-btn:hover {
  color: var(--accent-blue);
  text-decoration: underline;
}

/* No results state */
.no-results {
  display: none;
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.no-results.visible {
  display: block;
}

/* Footer Card */
.site-footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-subtle);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
}

.footer-link:hover {
  color: var(--accent-blue);
  text-decoration: underline;
}

@media (max-width: 680px) {
  body {
    padding: 0.75rem 0.5rem;
    font-size: 13px;
  }
  .site-content {
    padding: 1.25rem 1rem 1.5rem;
  }
  .brand-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .search-input {
    width: 100%;
  }
  .search-input:focus {
    width: 100%;
  }
  .database-heading {
    font-size: 0.95rem;
  }
  .show-title-link {
    font-size: 0.88rem;
  }
}
