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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f5f0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.container {
  width: 100%;
  max-width: 480px;
  padding-bottom: 48px;
}

.header {
  margin-bottom: 32px;
  text-align: center;
}

.header-inner {
  display: inline-block;
  text-align: center;
  margin-left: -80px;
  transition: margin-left 0.3s ease;
}

.header-inner.results-showing {
  margin-left: 0;
}

.logo {
  font-family: 'Great Vibes', cursive;
  font-size: 64px;
  font-weight: 400;
  color: #1a365d;
  line-height: 1.1;
  display: block;
  text-align: center;
}

.tagline {
  font-size: 14px;
  color: #718096;
  margin-top: 6px;
  text-align: center;
  display: block;
  white-space: nowrap;
}

.search-box {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.search-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrap input {
  width: 100%;
  padding: 14px 40px 14px 16px;
  font-size: 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
}

.search-input-wrap input:focus {
  border-color: #1a365d;
}

.clear-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #a0aec0;
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  transition: background 0.15s, color 0.15s;
}

.clear-btn:hover {
  background: #e2e8f0;
  color: #4a5568;
}

.clear-btn.hidden {
  display: none;
}

.search-box button#search-btn {
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  background: #1a365d;
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.search-box button#search-btn:hover {
  background: #2a4a7f;
}

.result-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  border: 1.5px solid #e2e8f0;
  width: 100%;
}

.result-card.hidden {
  display: none;
}

.result-top {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.movie-poster {
  width: 80px;
  min-width: 80px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.movie-poster-placeholder {
  width: 80px;
  min-width: 80px;
  height: 120px;
  border-radius: 8px;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.result-info {
  flex: 1;
}

.result-title {
  font-size: 20px;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 4px;
}

.result-meta {
  font-size: 13px;
  color: #718096;
  margin-bottom: 12px;
}

.verdict-badge {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
}

.verdict-clear {
  background: #f0fff4;
  color: #276749;
  border: 1.5px solid #9ae6b4;
}

.verdict-mild {
  background: #fffaf0;
  color: #c05621;
  border: 1.5px solid #fbd38d;
}

.verdict-explicit {
  background: #fff5f5;
  color: #9b2335;
  border: 1.5px solid #feb2b2;
}

.verdict-nudity {
  background: #fff5f5;
  color: #9b2335;
  border: 1.5px solid #feb2b2;
}

.result-note {
  font-size: 14px;
  color: #4a5568;
  line-height: 1.6;
  border-top: 1px solid #f0f0f0;
  padding-top: 16px;
  margin-top: 4px;
}

/* Source badge */
.source-row {
  margin-top: 12px;
  display: flex;
  align-items: center;
}

.source-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.3px;
}

.source-pluggedin {
  background: #ebf8ff;
  color: #2b6cb0;
  border: 1px solid #bee3f8;
}

.source-community {
  background: #f0fff4;
  color: #276749;
  border: 1px solid #9ae6b4;
}

.source-mpaa {
  background: #f7fafc;
  color: #718096;
  border: 1px solid #e2e8f0;
}

/* Community rating */
.community-rating-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}

.community-label {
  font-size: 13px;
  color: #718096;
  margin-bottom: 10px;
  font-weight: 500;
}

.community-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.community-btn {
  width: 100%;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #4a5568;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
}

.community-btn:hover {
  background: #f7fafc;
  border-color: #1a365d;
}

.community-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.community-btn-selected {
  border-color: #1a365d;
  background: #ebf8ff;
  color: #1a365d;
}

.community-confirm {
  font-size: 13px;
  margin-top: 10px;
  min-height: 18px;
  color: #276749;
}

/* Helpful feedback buttons (shown for PluggedIn results) */
.helpful-buttons {
  display: flex;
  gap: 8px;
}

.helpful-btn {
  flex: 1;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #4a5568;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.helpful-btn:hover {
  background: #f7fafc;
  border-color: #1a365d;
}

.helpful-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.helpful-btn-selected {
  border-color: #1a365d;
  background: #ebf8ff;
  color: #1a365d;
}

/* Accuracy reason options */
.accuracy-reason-wrap {
  margin-top: 12px;
}

.accuracy-reason-wrap.hidden {
  display: none;
}

.accuracy-reason-label {
  font-size: 13px;
  color: #4a5568;
  font-weight: 500;
  margin-bottom: 8px;
}

.accuracy-reason-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reason-btn {
  width: 100%;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #4a5568;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
}

.reason-btn:hover {
  background: #f7fafc;
  border-color: #1a365d;
}

.reason-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.reason-btn-selected {
  border-color: #1a365d;
  background: #ebf8ff;
  color: #1a365d;
}

.loading {
  text-align: center;
  padding: 24px;
  color: #718096;
  font-size: 15px;
}

.error-msg {
  text-align: center;
  padding: 0 0 16px 0;
  color: #9b2335;
  font-size: 15px;
}

/* Back button */
.back-wrap {
  margin-bottom: 16px;
}

.back-btn {
  background: none;
  border: none;
  color: #1a365d;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.back-btn:hover {
  color: #2a4a7f;
  text-decoration: underline;
}

/* Suggestions list */
.suggestions-label {
  font-size: 14px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 12px;
}

.suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  cursor: pointer;
  transition: background 0.15s;
  background: #fff;
}

.suggestion-item:hover {
  background: #f7fafc;
  border-color: #1a365d;
}

.suggestion-poster {
  width: 40px;
  min-width: 40px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  background: #e2e8f0;
}

.suggestion-info {
  flex: 1;
}

.suggestion-title {
  font-size: 15px;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 2px;
}

.suggestion-year {
  font-size: 13px;
  color: #718096;
}

/* Not listed button */
.not-right-wrap {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
  text-align: center;
}

.not-right-btn {
  display: inline-block;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  color: #1a365d;
  background: #fff;
  border: 1.5px solid #bee3f8;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.not-right-btn:hover {
  background: #ebf8ff;
  border-color: #90cdf4;
}

/* Missing movie form */
.missing-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}

.missing-label {
  font-size: 13px;
  color: #718096;
  margin-bottom: 10px;
}

.missing-input-row {
  display: flex;
  gap: 8px;
}

.missing-input-row input {
  flex: 1;
  padding: 10px 14px;
  font-size: 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  outline: none;
}

.missing-input-row input:focus {
  border-color: #1a365d;
}

.missing-input-row button {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  background: #1a365d;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.missing-input-row button:disabled {
  background: #a0aec0;
  cursor: default;
}

.missing-confirm {
  font-size: 13px;
  margin-top: 8px;
  min-height: 18px;
}

/* Footer */
.app-footer {
  position: fixed;
  bottom: 16px;
  left: 0;
  right: 0;
  text-align: center;
  pointer-events: none;
}

.footer-link {
  font-size: 12px;
  color: #a0aec0;
  text-decoration: none;
  pointer-events: all;
}

.footer-link:hover {
  color: #718096;
  text-decoration: underline;
}

/* Mobile optimizations */
@media (max-width: 480px) {
  body {
    padding: 16px;
    align-items: flex-start;
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .logo {
    font-size: 52px;
  }

  .header-inner {
    margin-left: -60px;
  }

  .header-inner.results-showing {
    margin-left: 0;
  }

  .search-box button#search-btn {
    padding: 14px 18px;
  }

  .result-card {
    padding: 18px;
  }

  .result-title {
    font-size: 18px;
  }

  .movie-poster {
    width: 70px;
    min-width: 70px;
    height: 105px;
  }

  .community-buttons {
    gap: 6px;
  }

  .community-btn {
    font-size: 12px;
    padding: 10px 12px;
  }
}

/* Safe area for phones with notches */
@supports (padding-top: env(safe-area-inset-top)) {
  body {
    padding-top: calc(16px + env(safe-area-inset-top));
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
}