@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  color-scheme: light;
  --bg: #f7f4ef;
  --bg-2: #efe8df;
  --ink: #1a1a1a;
  --muted: #5a5855;
  --accent: #ff6b4a;
  --accent-2: #0f8b8d;
  --accent-3: #c2f3e8;
  --card: rgba(255, 255, 255, 0.9);
  --stroke: rgba(26, 26, 26, 0.08);
  --shadow: 0 20px 60px rgba(22, 22, 22, 0.15);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Helvetica Neue", sans-serif;
  background: radial-gradient(circle at top, #fff7f0 0%, #f4efe8 45%, #f0f6f5 100%);
  color: var(--ink);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 120px 120px;
  pointer-events: none;
  opacity: 0.4;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(0px);
  opacity: 0.6;
  mix-blend-mode: multiply;
}

.orb-1 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(255, 107, 74, 0.4), transparent 70%);
  top: -120px;
  right: -80px;
}

.orb-2 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(15, 139, 141, 0.35), transparent 70%);
  bottom: -180px;
  left: -120px;
}

.hero {
  padding: 48px 8vw 24px;
  position: relative;
  z-index: 1;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  z-index: 2;
}

.auth-card {
  width: min(480px, 100%);
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.auth-card h1 {
  margin: 0 0 10px;
  font-size: 24px;
}

.auth-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 6px;
}

.auth-submit {
  margin-top: 6px;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}

.auth-error {
  margin-top: 12px;
  color: #bd3d26;
  font-size: 14px;
}

.brand {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 14px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}

.brand-mark {
  font-weight: 700;
  color: var(--accent);
}

.brand-sub {
  font-family: "IBM Plex Mono", monospace;
  color: var(--accent-2);
}

.hero h1 {
  font-size: clamp(32px, 4vw, 48px);
  margin: 0 0 12px;
}

.hero p {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.container {
  padding: 0 8vw 64px;
  position: relative;
  z-index: 1;
}

.grid {
  display: grid;
  gap: 24px;
  margin-bottom: 24px;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

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

.pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 107, 74, 0.1);
  color: var(--accent);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 14px;
  color: var(--muted);
}

.hint {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.hint strong {
  color: var(--ink);
  font-weight: 600;
}

.field input,
.field select {
  font-family: inherit;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: #fff;
  font-size: 15px;
  color: var(--ink);
}

.field input:focus,
.field select:focus {
  outline: 2px solid rgba(255, 107, 74, 0.3);
  border-color: rgba(255, 107, 74, 0.6);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  overflow: hidden;
}

.segmented button {
  padding: 12px 8px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  color: var(--muted);
}

.segmented button.active {
  background: rgba(15, 139, 141, 0.15);
  color: var(--accent-2);
  font-weight: 600;
}

.range-group {
  display: grid;
  grid-template-columns: 1fr 90px;
  gap: 12px;
  align-items: center;
}

.range-group input[type="range"] {
  width: 100%;
}

.output {
  background: linear-gradient(145deg, #1a1a1a, #2f2922);
  color: #fff;
}

.output .pill {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.output .field {
  color: rgba(255, 255, 255, 0.75);
}

.output .field select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

.output .field select:focus {
  outline: 2px solid rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
}

.output .hint {
  color: rgba(255, 255, 255, 0.72);
}

.output .hint strong {
  color: #fff;
}

.output-select {
  margin-bottom: 20px;
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.metric-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.metric-value {
  font-size: 22px;
  font-weight: 600;
}

.metric.main .metric-value {
  font-size: clamp(28px, 3vw, 40px);
  color: #ffd9c9;
}

.note {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 12px;
  line-height: 1.4;
}

.output .note {
  color: rgba(255, 255, 255, 0.7);
}

.specs-details {
  margin-top: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  padding: 12px 14px;
}

.specs-title {
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
}

.specs-body {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

.specs-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.specs-source {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.specs-empty {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.divider {
  height: 1px;
  background: var(--stroke);
  margin: 16px 0;
}

.total-line {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 600;
}

.gpu-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.gpu-info .label {
  font-size: 12px;
  color: var(--muted);
}

.gpu-info .value {
  font-size: 18px;
  font-weight: 600;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.actions button {
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: #fff;
  font-family: inherit;
  cursor: pointer;
}

.actions button.primary {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.checkbox .checkbox-row {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
}

.checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-2);
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.header-actions button {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: #fff;
  font-family: inherit;
  cursor: pointer;
  font-size: 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.detail {
  display: grid;
  gap: 6px;
}

.detail .label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.output .detail span:last-child {
  font-weight: 600;
}

.badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge.prebuilt {
  background: rgba(255, 107, 74, 0.16);
  color: #8a2d1a;
  border: 1px solid rgba(255, 107, 74, 0.35);
}

.badge.custom {
  background: rgba(15, 139, 141, 0.16);
  color: #075f61;
  border: 1px solid rgba(15, 139, 141, 0.35);
}

.table-wrap {
  overflow-x: auto;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.compare-table th,
.compare-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--stroke);
}

.compare-table thead th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.compare-table tr.is-selected {
  background: rgba(255, 107, 74, 0.08);
}

.compare-table tr.is-best {
  background: rgba(15, 139, 141, 0.12);
}

.compare-table tr.is-best td:first-child::before {
  content: "★";
  margin-right: 6px;
  color: var(--accent);
}

.admin-panel {
  margin-top: 20px;
  border-top: 1px dashed rgba(255, 255, 255, 0.2);
  padding-top: 16px;
}

.admin-panel button#adminToggle {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
}

.admin-body.hidden {
  display: none;
}

.admin-body {
  margin-top: 16px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.footer {
  padding: 16px 8vw 40px;
  font-size: 13px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

@media (max-width: 720px) {
  .range-group {
    grid-template-columns: 1fr;
  }
  .brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}
