:root {
  --bg: #0b0e14;
  --bg-alt: #12161f;
  --panel: #161b26;
  --border: #262d3d;
  --text: #e8ecf4;
  --text-dim: #9aa4b8;
  --accent: #5ee6c5;
  --accent-2: #8a7dff;
  --danger: #ff5c7c;
  --gold: #ffd23f;
  --star-off: #2a3040;
  --radius: 10px;
  --pixel-font: 'Press Start 2P', monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.brand {
  font-family: var(--pixel-font);
  font-size: 14px;
  letter-spacing: 1px;
}

.brand span {
  color: var(--accent);
}

.lang-switch {
  display: flex;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
}

.lang-switch button {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.lang-switch button.active {
  background: var(--accent);
  color: #05130f;
}

/* ---------- Main / Hero ---------- */
main {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 20px 40px;
}

.hero {
  text-align: center;
}

.hero h1 {
  font-size: clamp(22px, 4vw, 34px);
  margin: 0 0 12px;
  line-height: 1.3;
}

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

.search-wrap {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
}

#job-search {
  width: 100%;
  padding: 16px 20px;
  font-size: 16px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: var(--panel);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

#job-search:focus {
  border-color: var(--accent);
}

.suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
  z-index: 10;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: 0 12px 28px rgba(0,0,0,0.4);
}

.suggestions li {
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
}

.suggestions li .cat {
  color: var(--text-dim);
  font-size: 12px;
}

.suggestions li:hover,
.suggestions li.active {
  background: rgba(94, 230, 197, 0.12);
}

.hint {
  margin-top: 18px;
  font-size: 14px;
}

.hint-error {
  color: var(--danger);
}

/* ---------- Rating filter ---------- */
.rating-filter {
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.rating-filter-label {
  font-size: 14px;
  color: var(--text-dim);
}

.filter-stars {
  display: flex;
  gap: 8px;
}

.star-btn {
  border: none;
  background: transparent;
  padding: 4px;
  cursor: pointer;
  border-radius: 6px;
  line-height: 0;
}

.star-btn:hover,
.star-btn:focus-visible {
  background: rgba(255, 210, 63, 0.08);
  outline: none;
}

.star-btn .pixel-star {
  grid-template-columns: repeat(7, 5px);
  grid-template-rows: repeat(7, 5px);
}

.star-btn .pixel-star span {
  width: 5px;
  height: 5px;
  transition: background 0.1s;
}

.star-btn .pixel-star.filled span.on {
  background: var(--gold);
}

.star-btn .pixel-star.empty span.on {
  background: var(--star-off);
}

.rating-results-wrap {
  margin-top: 20px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.rating-results-title {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 0 10px;
  text-align: center;
}

.rating-results {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.job-pill {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.job-pill:hover,
.job-pill:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

/* ---------- Job card ---------- */
.job-card {
  margin-top: 40px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  text-align: left;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.job-card .job-category {
  color: var(--accent-2);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0 0 4px;
}

.job-card h2 {
  margin: 0 0 20px;
  font-size: 26px;
}

.rating-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 0 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.stars {
  display: flex;
  gap: 10px;
}

.pixel-star {
  display: grid;
  grid-template-columns: repeat(7, 4px);
  grid-template-rows: repeat(7, 4px);
}

.pixel-star span {
  width: 4px;
  height: 4px;
}

.pixel-star.filled span.on {
  background: var(--gold);
  box-shadow: 0 0 6px rgba(255, 210, 63, 0.6);
}

.pixel-star.empty span.on {
  background: var(--star-off);
}

.pixel-star span.off {
  background: transparent;
}

.verdict-label {
  font-family: var(--pixel-font);
  font-size: 12px;
  padding: 8px 16px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}

.verdict-label.good {
  background: rgba(94, 230, 197, 0.15);
  color: var(--accent);
}

.verdict-label.bad {
  background: rgba(255, 92, 124, 0.15);
  color: var(--danger);
}

.rating-score {
  color: var(--text-dim);
  font-size: 13px;
}

.job-card section {
  margin-bottom: 24px;
}

.job-card h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin: 0 0 10px;
}

.job-card p {
  line-height: 1.6;
  margin: 0;
  font-size: 15px;
}

.criteria-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.criteria-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}

.crit-icon {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.crit-icon.positive {
  background: rgba(94, 230, 197, 0.15);
  color: var(--accent);
}

.crit-icon.negative {
  background: rgba(255, 92, 124, 0.15);
  color: var(--danger);
}

.crit-body strong {
  display: block;
  font-size: 14px;
  margin-bottom: 3px;
}

.crit-body span {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.5;
}

.robots-box {
  background: linear-gradient(135deg, rgba(138, 125, 255, 0.12), rgba(94, 230, 197, 0.08));
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}

/* ---------- Tip banner ---------- */
.tip-banner {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  text-align: center;
}

.tip-text {
  font-size: 13px;
  color: var(--text-dim);
}

.tip-button {
  display: inline-block;
  background: var(--accent);
  color: #05130f;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 999px;
  transition: filter 0.15s;
}

.tip-button:hover,
.tip-button:focus-visible {
  filter: brightness(1.08);
  outline: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .topbar { padding: 14px 16px; }
  main { padding: 32px 14px 30px; }
  .job-card { padding: 22px; }
  .pixel-star { grid-template-columns: repeat(7, 3px); grid-template-rows: repeat(7, 3px); }
  .pixel-star span { width: 3px; height: 3px; }
}
