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

[hidden] {
  display: none !important;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #0a0a0a;
  color: #e0e0e0;
  min-height: 100vh;
}

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

/* Homepage */
.home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding-bottom: 20vh;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}

.tagline {
  color: #888;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.search-wrapper {
  width: 100%;
  position: relative;
}

#search {
  width: 100%;
  padding: 16px 20px;
  font-size: 1.1rem;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  color: #fff;
  outline: none;
  transition: border-color 0.2s;
}

#search:focus {
  border-color: #555;
}

#search::placeholder {
  color: #666;
}

.results-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  overflow: hidden;
  display: none;
  z-index: 10;
}

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

.result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.result-item:hover {
  background: #252525;
}

.result-poster {
  width: 36px;
  height: 54px;
  border-radius: 4px;
  object-fit: cover;
  background: #333;
  flex-shrink: 0;
}

.result-poster.no-poster {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #666;
}

.result-info {
  flex: 1;
  min-width: 0;
}

.result-title {
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-year {
  font-size: 0.85rem;
  color: #888;
}

/* Movie page */
.movie-page {
  padding-top: 40px;
  padding-bottom: 60px;
}

.back-link {
  display: inline-block;
  color: #888;
  text-decoration: none;
  margin-bottom: 24px;
  font-size: 0.9rem;
}

.back-link:hover {
  color: #fff;
}

.movie-page h1 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

.loading {
  text-align: center;
  padding: 3rem 0;
  color: #888;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #333;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

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

.mentions {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.mention {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #1a1a1a;
}

.mention-time {
  font-family: "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  color: #888;
  white-space: nowrap;
  padding-top: 2px;
  flex-shrink: 0;
}

.mention-text {
  line-height: 1.5;
}

.mention-text mark {
  background: none;
  color: #facc15;
  font-weight: 600;
}

.empty-state,
.error-state {
  text-align: center;
  padding: 3rem 0;
  color: #888;
}

.error-state {
  color: #f87171;
}

.mention-count {
  color: #888;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
