﻿:root {
  --bg: #08060f;
  --bg-2: #0f0a18;
  --panel: #151022;
  --panel-2: #1b142c;
  --accent: #a78bfa;
  --accent-2: #7c3aed;
  --accent-3: #f472b6;
  --neon: #d8b4fe;
  --text: #f7f3ff;
  --muted: #b9b3c9;
  --danger: #f87171;
  --success: #34d399;
  --warning: #fbbf24;
  --shadow: 0 18px 40px rgba(8, 6, 15, 0.6);
  --glow: 0 0 22px rgba(167, 139, 250, 0.4);
  --border: 1px solid rgba(167, 139, 250, 0.22);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Bahnschrift", "Segoe UI Variable", "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 520px at 12% -8%, #311652 0%, transparent 58%),
    radial-gradient(900px 520px at 90% -12%, #25113d 0%, transparent 55%),
    radial-gradient(700px 420px at 50% 0%, rgba(244, 114, 182, 0.1) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(167, 139, 250, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(167, 139, 250, 0.04) 1px, transparent 1px);
  background-size: 52px 52px;
  opacity: 0.28;
  pointer-events: none;
  z-index: 0;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 36px;
  background: rgba(8, 6, 15, 0.92);
  border-bottom: 1px solid rgba(167, 139, 250, 0.18);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #140a1f;
  box-shadow: var(--glow);
  font-size: 18px;
}

.brand-title {
  font-weight: 700;
  letter-spacing: 1px;
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
}

.nav-links {
  display: flex;
  gap: 16px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(167, 139, 250, 0.18);
}

.main-content {
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  align-items: center;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(36px, 6vw, 58px);
  letter-spacing: 0.5px;
  line-height: 0.94;
  background: linear-gradient(135deg, #ffffff 0%, #decfff 45%, #f7a8d0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 0 0 22px;
  color: var(--muted);
  max-width: 54ch;
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(167, 139, 250, 0.28);
  background: rgba(167, 139, 250, 0.1);
  color: #e6dcff;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.hero-panel {
  background:
    radial-gradient(circle at top right, rgba(244, 114, 182, 0.12), transparent 35%),
    linear-gradient(140deg, rgba(167, 139, 250, 0.18), rgba(14, 8, 22, 0.9));
  border-radius: 22px;
  padding: 30px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  border: 1px solid rgba(167, 139, 250, 0.2);
}

.stat-value {
  font-size: 34px;
  font-weight: 700;
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

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

.card {
  background: linear-gradient(160deg, rgba(30, 20, 45, 0.98), rgba(16, 10, 22, 0.98));
  border: var(--border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  position: relative;
  overflow: hidden;
}

.card h3 {
  margin-top: 0;
  letter-spacing: 0.3px;
}

.card p {
  color: var(--muted);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(167, 139, 250, 0.12), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.card:hover::after {
  opacity: 1;
}

.signal-card {
  min-height: 172px;
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  color: #160b24;
  box-shadow: var(--glow);
}

.btn.ghost {
  background: transparent;
  border: 1px solid rgba(167, 139, 250, 0.55);
  color: var(--text);
}

.btn.danger {
  background: rgba(248, 113, 113, 0.2);
  border: 1px solid rgba(248, 113, 113, 0.6);
  color: #fecaca;
}

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

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(216, 180, 254, 0.5);
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.search-sticky {
  position: sticky;
  top: 84px;
  z-index: 8;
  background: rgba(8, 6, 15, 0.88);
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 14px;
  padding: 10px;
  backdrop-filter: blur(10px);
}

.quick-menu {
  position: relative;
}

.quick-menu summary {
  list-style: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(167, 139, 250, 0.45);
  background: rgba(26, 17, 38, 0.92);
  color: var(--text);
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.quick-menu summary::-webkit-details-marker {
  display: none;
}

.quick-menu-list {
  position: absolute;
  right: 0;
  margin-top: 8px;
  width: 180px;
  background: rgba(25, 16, 36, 0.98);
  border: 1px solid rgba(167, 139, 250, 0.45);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
  display: grid;
  gap: 4px;
}

.quick-menu-item {
  display: block;
  color: var(--muted);
  text-decoration: none;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
}

.quick-menu-item:hover,
.quick-menu-item.active {
  background: rgba(167, 139, 250, 0.2);
  color: var(--text);
}

.search-box {
  display: flex;
  gap: 10px;
}

.search-box input,
.filter-bar input,
.filter-bar select,
form input,
form textarea,
form select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.3);
  background: rgba(26, 17, 38, 0.92);
  color: var(--text);
}

.autocomplete {
  position: relative;
}

.autocomplete-list {
  position: absolute;
  width: 100%;
  background: rgba(25, 16, 36, 0.98);
  border: 1px solid rgba(167, 139, 250, 0.45);
  border-radius: 12px;
  overflow: hidden;
  z-index: 5;
}

.autocomplete-item {
  padding: 10px 12px;
  cursor: pointer;
}

.autocomplete-item:hover {
  background: rgba(167, 139, 250, 0.18);
}

.status-badge {
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-OK {
  background: rgba(52, 211, 153, 0.2);
  color: #a7f3d0;
}

.status-TWEAK {
  background: rgba(251, 191, 36, 0.2);
  color: #fde68a;
}

.status-NO {
  background: rgba(248, 113, 113, 0.2);
  color: #fecaca;
}

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

.compare-table th,
.compare-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(167, 139, 250, 0.2);
}

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

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.reasons {
  display: grid;
  gap: 8px;
}

.reason {
  display: flex;
  justify-content: space-between;
  background: rgba(167, 139, 250, 0.12);
  padding: 8px 12px;
  border-radius: 10px;
}

.reason.fail {
  border: 1px solid rgba(248, 113, 113, 0.5);
}

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

.preset-item {
  background: rgba(167, 139, 250, 0.14);
  padding: 12px;
  border-radius: 12px;
  text-align: center;
}

.settings-list .list-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(167, 139, 250, 0.35);
}

.list-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
}

.filter-bar,
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.toolbar {
  justify-content: space-between;
}

.inline-form {
  display: inline;
}

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

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

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.flash-stack {
  display: grid;
  gap: 12px;
}

.flash {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.flash-success {
  background: rgba(52, 211, 153, 0.2);
  color: #a7f3d0;
}

.flash-danger {
  background: rgba(248, 113, 113, 0.2);
  color: #fecaca;
}

.flash-warning {
  background: rgba(251, 191, 36, 0.2);
  color: #fde68a;
}

.flash-info {
  background: rgba(96, 165, 250, 0.2);
  color: #bfdbfe;
}

.chip {
  background: rgba(167, 139, 250, 0.18);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid transparent;
}

.chip.active {
  border-color: rgba(167, 139, 250, 0.9);
  box-shadow: var(--glow);
}

.chip.disabled {
  opacity: 0.5;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tab-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tab-chip {
  border-radius: 999px;
  padding: 10px 14px;
  border: 1px solid rgba(167, 139, 250, 0.28);
  background: rgba(18, 12, 28, 0.82);
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s ease;
}

.tab-chip:hover,
.tab-chip.active {
  color: var(--text);
  background: rgba(167, 139, 250, 0.18);
  box-shadow: var(--glow);
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.popular-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.popular-card {
  display: grid;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  background: linear-gradient(160deg, rgba(30, 20, 45, 0.98), rgba(16, 10, 22, 0.98));
  border: var(--border);
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.popular-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.3);
}

.popular-card span {
  font-size: 12px;
  color: var(--muted);
}

.popular-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(216, 180, 254, 0.5);
}

.rec-toolbar {
  display: grid;
  grid-template-columns: 1fr repeat(4, minmax(140px, 180px));
  gap: 12px;
  align-items: center;
}

.rec-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rec-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rec-card {
  display: grid;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  background: linear-gradient(160deg, rgba(30, 20, 45, 0.98), rgba(16, 10, 22, 0.98));
  border: var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rec-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.rec-body {
  display: grid;
  gap: 6px;
  padding: 12px;
}

.rec-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.rec-preset {
  font-size: 12px;
  color: var(--muted);
}

.rec-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(216, 180, 254, 0.5);
}

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

.emu-card {
  background: linear-gradient(160deg, rgba(30, 20, 45, 0.98), rgba(16, 10, 22, 0.98));
  border: var(--border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.emu-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.emu-req {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(167, 139, 250, 0.3);
}

@media (max-width: 1000px) {
  .rec-toolbar {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) {
  .popular-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .rec-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .popular-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .rec-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.splash {
  min-height: 70vh;
  display: grid;
  place-items: center;
}

.splash-card {
  background: linear-gradient(160deg, rgba(28, 18, 44, 0.96), rgba(13, 8, 20, 0.96));
  border: var(--border);
  border-radius: 22px;
  padding: 44px 52px;
  text-align: center;
  box-shadow: var(--shadow);
  width: min(560px, 92vw);
}

.splash-logo {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #140a1f;
  margin: 0 auto 16px;
  box-shadow: var(--glow);
  font-size: 22px;
}

.splash-progress {
  height: 6px;
  background: rgba(167, 139, 250, 0.2);
  border-radius: 999px;
  margin: 18px 0 12px;
  overflow: hidden;
}

.splash-progress span {
  display: block;
  height: 100%;
  width: 60%;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  animation: splashMove 2s infinite ease-in-out;
}

.splash-status {
  display: flex;
  justify-content: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

.bottleneck {
  font-size: 28px;
  font-weight: 700;
  color: var(--neon);
  margin-bottom: 16px;
}

.checklist {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.check-item {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 8px;
  align-items: center;
  background: rgba(167, 139, 250, 0.08);
  padding: 10px 12px;
  border-radius: 12px;
}

.check-item.pass .icon {
  color: var(--success);
}

.check-item.fail .icon {
  color: var(--danger);
}

.slider-wrap {
  display: grid;
  gap: 10px;
  margin: 10px 0 20px;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

#perf-quality-slider {
  width: 100%;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.8), rgba(167, 139, 250, 0.8));
  outline: none;
}

#perf-quality-slider::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-3);
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 10px rgba(216, 180, 254, 0.7);
  cursor: pointer;
}

#perf-quality-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-3);
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 10px rgba(216, 180, 254, 0.7);
  cursor: pointer;
}

.slider-output {
  display: grid;
  gap: 6px;
  background: rgba(167, 139, 250, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
}

@keyframes splashMove {
  0% {
    transform: translateX(-40%);
  }
  100% {
    transform: translateX(100%);
  }
}

@media (max-width: 900px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .nav-links {
    flex-wrap: wrap;
  }

  .result-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-topbar {
    align-items: center;
  }

  .search-sticky {
    top: 132px;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }
}

.nav-links a.nav-active {
  color: var(--text);
  background: rgba(167, 139, 250, 0.22);
  box-shadow: var(--glow);
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.page-header h2,
.page-header p {
  margin: 0;
}

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

.section-spacer {
  margin-top: 10px;
}

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

.form-group {
  display: grid;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.4px;
}

.empty-state {
  text-align: center;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.empty-state h2,
.empty-state p {
  margin: 0;
}

.source-details {
  margin-top: 18px;
  border-top: 1px solid rgba(167, 139, 250, 0.16);
  padding-top: 14px;
}

.source-details summary {
  cursor: pointer;
  color: #eadfff;
  font-weight: 600;
}

.source-text {
  margin: 12px 0 0;
  padding: 14px;
  border-radius: 14px;
  background: rgba(8, 6, 15, 0.72);
  color: #ece7ff;
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid rgba(167, 139, 250, 0.14);
}

.tip-list {
  display: grid;
  gap: 10px;
}
