* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #08111f;
  --bg-soft: #0f1c31;
  --panel: rgba(14, 24, 42, 0.9);
  --panel-border: rgba(140, 173, 214, 0.18);
  --text: #eff4ff;
  --muted: #9fb0c8;
  --accent: #61d0ff;
  --accent-2: #8cffa8;
  --danger: #ff7c8e;
  --chip: rgba(97, 208, 255, 0.12);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(97, 208, 255, 0.16), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(140, 255, 168, 0.12), transparent 24%),
    linear-gradient(180deg, #050b14, var(--bg));
  color: var(--text);
}

button,
select {
  font: inherit;
}

[v-cloak] {
  display: none;
}

.shell {
  width: min(1400px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
  margin-bottom: 24px;
}

.hero-side {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent);
  font-size: 0.78rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
  margin-bottom: 12px;
}

.lede,
.panel-heading p,
.result-meta,
.hint,
.status-card p,
.relic-source {
  color: var(--muted);
}

.legal-disclaimer,
.mission-duration-note {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 0;
}

.status-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--panel-border);
  background: rgba(9, 16, 28, 0.65);
  border-radius: 18px;
  box-shadow: var(--shadow);
  min-width: 260px;
}

.status-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #4c627d;
  box-shadow: 0 0 0 6px rgba(76, 98, 125, 0.15);
}

.status-dot.ok {
  background: var(--accent-2);
  box-shadow: 0 0 0 6px rgba(140, 255, 168, 0.15);
}

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

.panel {
  padding: 20px;
  border-radius: 24px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-heading {
  margin-bottom: 16px;
}

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

.selector-card,
.result-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 18px;
  padding: 14px;
}

.result-card.full-coverage {
  border-color: rgba(140, 255, 168, 0.72);
  box-shadow: 0 0 0 1px rgba(140, 255, 168, 0.22), var(--shadow);
}

.selector-card label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

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

select {
  width: 100%;
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #0c1526;
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 0 14px;
  min-height: 42px;
  color: #00111a;
  background: linear-gradient(135deg, var(--accent), #a6f4ff);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(97, 208, 255, 0.2);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--text);
  background: var(--chip);
  border: 1px solid rgba(97, 208, 255, 0.18);
}

.primary {
  width: 100%;
  font-weight: 700;
  font-size: 1.06rem;
  min-height: 48px;
}

.checklist-panel {
  display: flex;
  flex-direction: column;
  align-self: start;
}

.checklist-panel .panel-heading {
  margin-bottom: 10px;
}

.checklist-panel h3 {
  margin-bottom: 6px;
}

.checklist-content {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.checklist-explanation {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.checklist-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.checklist-badges {
  margin-top: 6px;
}

.checklist-badge {
  position: relative;
}

.checklist-part-button,
.checklist-rarity-button {
  position: relative;
}

.checklist-part-button {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.checklist-rarity-button {
  min-height: auto;
  padding: 4px 8px;
}

.checklist-part-button:hover,
.checklist-rarity-button:hover {
  transform: none;
  box-shadow: none;
}

.checklist-part-button::after,
.checklist-rarity-button::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  color: #ecf4ff;
  background: rgba(8, 16, 28, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: opacity 0.15s ease;
}

.checklist-part-button:hover::after,
.checklist-rarity-button:hover::after {
  opacity: 1;
}

.dropped-confirm-popover {
  position: fixed;
  z-index: 60;
}

.confirm-drop-button {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffd58f, #f2b75e);
  color: #2c1b00;
  font-weight: 700;
}

.secondary-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.secondary-action {
  width: 100%;
  font-weight: 700;
}

.danger-action {
  color: #dbeeff;
  background: linear-gradient(135deg, #2c4e73, #1e3956);
  border: 1px solid rgba(97, 208, 255, 0.22);
}

.success-action {
  color: #dbeeff;
  background: linear-gradient(135deg, #35597e, #274667);
  border: 1px solid rgba(97, 208, 255, 0.18);
}

.help-button {
  min-height: 38px;
  padding: 0 16px;
  color: #eaf8ff;
  background: rgba(97, 208, 255, 0.14);
  border: 2px solid rgba(140, 255, 168, 0.95);
  border-radius: 999px;
  font-weight: 700;
}

.help-button:hover {
  box-shadow: 0 10px 20px rgba(140, 255, 168, 0.2);
}

.hint {
  margin: 14px 0 0;
  font-size: 0.92rem;
}

.error-box {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 124, 142, 0.35);
  background: rgba(255, 124, 142, 0.12);
  color: #ffd8df;
}

.warning-box {
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 210, 120, 0.42);
  background: rgba(255, 210, 120, 0.14);
  color: #ffe8b2;
  font-size: 0.92rem;
}

.success-box {
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(140, 255, 168, 0.42);
  background: rgba(140, 255, 168, 0.14);
  color: #d8ffe4;
  font-size: 0.92rem;
}

.help-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 5, 12, 0.72);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 40;
}

.help-modal {
  width: min(860px, 100%);
  max-height: min(82vh, 900px);
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(140, 173, 214, 0.24);
  background: rgba(10, 17, 30, 0.98);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
}

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

.help-close-button {
  min-height: 38px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.help-modal-content {
  overflow: auto;
  padding-right: 8px;
}

.help-section + .help-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.help-section h3 {
  margin-bottom: 10px;
  color: var(--accent);
}

.help-section p,
.help-section li {
  color: var(--muted);
  line-height: 1.55;
}

.help-section ul {
  margin: 10px 0 0;
  padding-left: 22px;
}

.results-list {
  display: grid;
  gap: 16px;
}

.results-panel {
  grid-column: 1 / -1;
}

.impressum {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.015);
  font-size: 0.9rem;
}

.impressum h2 {
  margin-bottom: 14px;
  font-size: 1.05rem;
  color: #b5c4d8;
}

.impressum-section + .impressum-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.impressum-section p {
  margin-bottom: 0;
  color: #8fa1b9;
  line-height: 1.5;
}

.impressum-section h3 {
  font-size: 0.95rem;
  color: #a8bbd3;
}

.impressum a {
  color: #9dc0df;
}

.recommendation-sections {
  display: grid;
  gap: 24px;
}

.recommendation-section {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.recommendation-section-title {
  margin: 0 0 12px;
  color: var(--accent-2);
  letter-spacing: 0.02em;
}

.recommendation-groups {
  display: grid;
  gap: 16px;
}

.recommendation-group {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.recommendation-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  padding: 16px 18px;
  color: var(--accent);
  font-weight: 700;
}

.recommendation-group > summary::-webkit-details-marker {
  display: none;
}

.recommendation-group > summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 10px;
  transition: transform 0.2s ease;
}

.recommendation-group[open] > summary::before {
  transform: rotate(90deg);
}

.group-count {
  min-width: 44px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(97, 208, 255, 0.12);
  color: var(--text);
  text-align: center;
}

.group-results-grid {
  padding: 0 18px 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nested-recommendation-groups {
  display: grid;
  gap: 10px;
  padding: 0 18px 18px;
}

.recommendation-subgroup {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.recommendation-subgroup > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  padding: 12px 14px;
  color: var(--text);
  font-weight: 600;
}

.recommendation-subgroup > summary::-webkit-details-marker {
  display: none;
}

.recommendation-subgroup > summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 8px;
  transition: transform 0.2s ease;
}

.recommendation-subgroup[open] > summary::before {
  transform: rotate(90deg);
}

.subgroup-results-grid {
  padding: 0 12px 12px;
}

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

.score-pill,
.score-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(140, 255, 168, 0.12);
  color: #c8ffd6;
  font-weight: 700;
}

.result-cover {
  margin: 10px 0 12px;
}

.full-coverage-hint {
  margin: 6px 0 0;
  color: #b8ffd1;
  font-size: 0.9rem;
}

.part-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.part-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.92rem;
}

.rarity-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.rarity-common {
  background: rgba(120, 76, 38, 0.34);
  border: 1px solid rgba(179, 116, 58, 0.65);
  color: #f1d1ab;
}

.rarity-uncommon {
  background: rgba(145, 153, 170, 0.26);
  border: 1px solid rgba(181, 189, 205, 0.54);
  color: #f2f4fa;
}

.rarity-rare {
  background: rgba(223, 182, 57, 0.44);
  border: 1px solid rgba(245, 211, 108, 0.78);
  color: #fff7d1;
}

.rarity-unknown {
  background: rgba(97, 208, 255, 0.2);
  border: 1px solid rgba(97, 208, 255, 0.45);
  color: #dff6ff;
}

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

.relic-details {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 8px 10px;
  background: rgba(5, 10, 18, 0.45);
}

.relic-details > summary {
  cursor: pointer;
  user-select: none;
  color: var(--accent);
  font-weight: 600;
  list-style: none;
}

.relic-details > summary::-webkit-details-marker {
  display: none;
}

.relic-details > summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 8px;
  transition: transform 0.2s ease;
}

.relic-details[open] > summary::before {
  transform: rotate(90deg);
}

.relic-details[open] .relic-list {
  margin-top: 10px;
}

.relic-row {
  padding: 12px;
  border-radius: 14px;
  background: rgba(6, 12, 22, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.relic-topline {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  align-items: center;
  margin-bottom: 6px;
}

.relic-parts,
.relic-source {
  margin-bottom: 0;
}

.rotation-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.action-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-self: start;
  gap: 12px;
}

.quality-panel {
  grid-column: 1 / -1;
  align-self: start;
}

.quality-details > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  color: var(--accent);
  font-weight: 700;
}

.quality-details > summary::-webkit-details-marker {
  display: none;
}

.quality-details > summary::before {
  content: '▸';
  display: inline-block;
  transition: transform 0.2s ease;
}

.quality-details[open] > summary::before {
  transform: rotate(90deg);
}

.quality-heading {
  margin: 10px 0 14px;
}

.quality-fields {
  display: grid;
  gap: 14px;
}

.quality-field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

@media (max-width: 900px) {
  .group-results-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .grid,
  .selector-grid,
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-side {
    justify-items: start;
  }
}
