/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Base Styles */
body {
  font-family: sans-serif;
  background: #fff;
  color: #000;
  padding: 2rem;
}

h1 {
  margin-bottom: 1rem;
}

/* Search Input */
#search-input {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #000;
  margin-bottom: 0.5rem;
}

#status {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: #555;
}

/* Loading State */
#app[data-loading="true"] .spinner {
  display: block;
}

.spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid #ccc;
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-bottom: 0.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Layout */
#app {
  display: flex;
  flex-direction: column;
}

.main-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-top: 1rem;
}

.search-column {
  flex: 1;
  max-width: 500px;
}

.detail-column {
  flex: 1;
  max-width: 500px;
}

/* Results List */
#results-list {
  list-style: none;
  border: 1px solid #ccc;
  margin-bottom: 1rem;
}

#results-list li {
  padding: 0.5rem;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}

#results-list li:hover {
  background: #f0f0f0;
}

/* Active State */
#results-list li.active {
  background: #e0e0e0;
}

/* Highlighting */
.highlight {
  background: #ff0;
  font-weight: bold;
}

/* Detail Panel */
#detail-panel {
  display: none;
  border: 1px solid #000;
  padding: 1rem;
}

#detail-panel h2 {
  margin-bottom: 0.5rem;
}

#detail-panel p {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

#detail-videos a {
  color: #000;
}