:root {
  --brand-green: #4E5851;
  --brand-green-dark: #3B4A45;
  --brand-orange: #FF7800;
  --bg-page: #FAFBFC;
  --bg-card: #FFFFFF;
  --text-main: #1F2A28;
  --text-secondary: #6B7A76;
  --border-line: #E5E8E7;
  --error: #D9534F;
  --cat-producthunt: #6C63D6;
  --cat-producthunt-bg: #ECEAFB;
  --cat-dribbble: #159E7A;
  --cat-dribbble-bg: #E1F5EE;
  --cat-macro: #C2571F;
  --cat-macro-bg: #FBE8DD;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans TC", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-page);
  color: var(--text-main);
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 96px;
}

.header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 32px;
}

.header-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-green-dark);
  color: #F4F7F6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-icon svg {
  width: 24px;
  height: 24px;
}

.header-text h1 {
  font-weight: 900;
  font-size: 32px;
  color: var(--brand-green-dark);
  margin: 0 0 6px;
}

.subtitle {
  color: var(--text-secondary);
  margin: 0;
  font-size: 15px;
}

.category-section {
  margin-bottom: 28px;
}

.category-title {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  border-radius: 8px;
  padding: 8px 16px;
  margin-bottom: 14px;
}

.category-title.producthunt {
  background: var(--cat-producthunt-bg);
  color: var(--cat-producthunt);
}

.category-title.dribbble {
  background: var(--cat-dribbble-bg);
  color: var(--cat-dribbble);
}

.category-title.macro {
  background: var(--cat-macro-bg);
  color: var(--cat-macro);
}

.candidate-card {
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 14px;
}

.candidate-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 4px;
}

.candidate-title a {
  color: var(--text-main);
  text-decoration: none;
}

.candidate-title a:hover {
  text-decoration: underline;
  color: var(--brand-green);
}

.candidate-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 10px;
  line-height: 1.6;
}

.ai-guess {
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-page);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 12px;
  line-height: 1.6;
}

.ai-guess strong {
  color: var(--brand-green-dark);
}

.answer-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.answer-select {
  font-family: inherit;
  font-size: 14px;
  border: 1px solid var(--border-line);
  border-radius: 10px;
  padding: 7px 10px;
  color: var(--text-main);
  background: #fff;
}

.answer-reason {
  flex: 1;
  min-width: 160px;
  font-family: inherit;
  font-size: 14px;
  border: 1px solid var(--border-line);
  border-radius: 10px;
  padding: 7px 12px;
  color: var(--text-main);
}

.answer-reason:focus,
.answer-select:focus {
  outline: none;
  border-color: var(--brand-green);
}

.btn-submit {
  background: var(--brand-orange);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.btn-submit:hover:not(:disabled) {
  box-shadow: 0 4px 16px rgba(255, 120, 0, 0.28);
}

.btn-submit:active:not(:disabled) {
  transform: scale(0.97);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.answered-badge {
  font-size: 13px;
  color: var(--brand-green-dark);
  background: #E7EEE9;
  border-radius: 10px;
  padding: 8px 12px;
  line-height: 1.6;
}

.empty-state {
  text-align: center;
  color: var(--text-secondary);
  padding: 56px 0;
}

.empty-state p {
  margin: 0;
  font-size: 15px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  background: var(--brand-green-dark);
  color: #F4F7F6;
  padding: 12px 22px;
  border-radius: 20px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.is-error {
  background: var(--error);
}

@media (max-width: 480px) {
  .page {
    padding: 28px 16px 88px;
  }

  .header-text h1 {
    font-size: 26px;
  }

  .answer-form {
    flex-direction: column;
    align-items: stretch;
  }
}
