﻿:root {
  --bg: #0f172a;
  --text: #e2e8f0;
  --accent: #38bdf8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 32px;
  
}

.loot-table {
  background-color: #27182d;
}

.page {
  text-align: center;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(226, 232, 240, 0.08);
  border-radius: 16px;
  padding: 32px 40px;
  width: 100%;

  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px);
}

h1 {
  margin: 0 0 12px;
  font-size: 32px;
  letter-spacing: 0.5px;
}

p {
  margin: 0;
  opacity: 0.85;
  max-width: 420px;
}

.config-form {
  margin-top: 24px;
  display: grid;
  gap: 16px;
  text-align: left;
}

.config-alert {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fecdd3;
  font-weight: 600;
  display: none;
}

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

.field-grid.inline-four {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.field-separator {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(226, 232, 240, 0.15);
  margin: 6px 0 2px;
}

.field.full-span {
  grid-column: 1 / -1;
}

.form-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.08);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.35);
}

.section-title {
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  color: #869d2f;

}

.form-section-xp-config {
  background-color: #2e183d;

}

.notice {
  color: #78ef82;
  background-color: #113b18;
  padding: 20px;
  border-radius: 10px;


}

a {
  color: #38bdf8;
}

.form-section-build-config {
  background-color: #071433;

}

.form-section-bases {
  background-color: #483b51;

}

.field {
  margin-top: 30px;
}

.form-section[open]>summary.section-title {
  margin-bottom: 8px;
}

.compute-levels {
  margin-top: 12px;
  border: 1px solid rgba(226, 232, 240, 0.08);
  border-radius: 12px;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.35);
}

.compute-levels>summary.section-title {
  list-style: none;
}

.result-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.4px;
  margin: 10px 0 6px;
}

.attr-table {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(226, 232, 240, 0.08);
  border-radius: 10px;
  padding: 12px;
}

.attr-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  align-items: center;
  gap: 10px;
}

.attr-row.header {
  font-weight: 700;
  opacity: 0.9;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.formula-row {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 10px;
  align-items: center;
}

.formula-display {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(226, 232, 240, 0.18);
  background: rgba(15, 23, 42, 0.55);
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  min-height: 44px;
  display: flex;
  align-items: center;
  white-space: pre-wrap;
}


#flat-damage-chart {
  width: 100%;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.08), rgba(15, 23, 42, 0.75));
  border: 1px solid rgba(56, 189, 248, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#attack-speed-chart {
  width: 100%;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.08), rgba(15, 23, 42, 0.75));
  border: 1px solid rgba(34, 197, 94, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#mod-damage-chart {
  width: 100%;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(234, 179, 8, 0.08), rgba(15, 23, 42, 0.75));
  border: 1px solid rgba(234, 179, 8, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#dps-planning-chart {
  width: 100%;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(49, 46, 129, 0.12), rgba(15, 23, 42, 0.75));
  border: 1px solid rgba(99, 102, 241, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.dps-planning-list {
  max-height: 240px;
  overflow: auto;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(99, 102, 241, 0.28);
  background: rgba(49, 46, 129, 0.12);
  color: #e2e8f0;
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 13px;
}

.field input[type="number"],
.field input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(226, 232, 240, 0.18);
  background: rgba(15, 23, 42, 0.65);
  color: var(--text);
  font-size: 15px;
}

.tag-input {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.tag-input button {
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #0f172a;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.tag-input button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.25);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: var(--text);
}

.remove-tag {
  background: transparent;
  color: var(--text);
  border: none;
  cursor: pointer;
  font-weight: 700;
}

.config-preview {
  display: none;
  margin-top: 24px;
  text-align: left;
  padding: 18px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(226, 232, 240, 0.08);
  font-size: 14px;
  overflow-x: auto;
}

.compute-result {
  margin-top: 18px;
  text-align: left;
  display: grid;
  gap: 10px;
}

.compute-json-btn {
  margin-top: 12px;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #0f172a;
  font-weight: 700;
  cursor: pointer;
}

#recompute-btn {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.25);
}

#recompute-btn:hover {
  box-shadow: 0 10px 25px rgba(239, 68, 68, 0.35);
}

.compute-card summary {
  cursor: pointer;
  font-weight: 700;
  display: grid;
  grid-template-columns: 4fr 5fr 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgb(2 23 33);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 10px;
}

.compute-card[open] summary {
  background: rgb(0 59 77);
}

.compute-card summary::-webkit-details-marker {
  display: none;
}

.compute-card {
  border: 1px solid rgba(226, 232, 240, 0.1);
  border-radius: 10px;
  background: rgb(0 59 77);
}

.compute-card .body {
  padding: 10px 12px 12px;
  display: grid;
  gap: 8px;
}

.summary-col.base {
  text-align: left;
}

.summary-col.mix {
  text-align: left;
}

.summary-col.loot {
  text-align: right;
}

.dim-blue {
  color: #38bdf8;
  opacity: 0.75;
}

.gear-table,
.loot-table {
  margin-top: 6px;
  overflow-x: auto;
}

.gear-table table,
.loot-table table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(15, 23, 42, 0.25);
  border: 1px solid rgba(226, 232, 240, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.gear-table th,
.gear-table td,
.loot-table th,
.loot-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(226, 232, 240, 0.08);
  font-size: 14px;
}

.loot-meta {
  margin: 6px 0 10px;
  font-size: 14px;
  color: #e2e8f0;
  opacity: 1;
}

.level-meta {
  font-size: 14px;
  opacity: 0.9;
  display: grid;
  gap: 4px;
}

.level-grid {
  display: grid;
  grid-template-columns: 65% 35%;
  gap: 12px;
}

.level-col details summary {
  cursor: pointer;
}

.gear-table th,
.loot-table th {
  background: rgba(56, 189, 248, 0.12);
  font-weight: 700;
}

.gear-table tbody tr:nth-child(even),
.loot-table tbody tr:nth-child(even) {
  background: rgba(56, 189, 248, 0.05);
}

.gear-table.empty,
.loot-table.empty {
  padding: 8px 10px;
  border: 1px dashed rgba(226, 232, 240, 0.15);
  border-radius: 10px;
  font-size: 14px;
  color: #94a3b8;
}

.build-block {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(226, 232, 240, 0.12);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
  display: grid;
  gap: 6px;
}

.build-heading {
  font-weight: 800;
  letter-spacing: 0.2px;
}

.build-line {
  font-size: 14px;
}

.build-subtitle {
  margin-top: 4px;
  font-weight: 700;
}

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

.build-table table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(15, 23, 42, 0.25);
  border: 1px solid rgba(226, 232, 240, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.build-table th,
.build-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(226, 232, 240, 0.08);
  font-size: 14px;
}

.build-table th {
  background: rgba(56, 189, 248, 0.12);
  font-weight: 700;
}

.build-table tbody tr:nth-child(even) {
  background: rgba(56, 189, 248, 0.05);
}

.build-table.empty {
  padding: 8px 10px;
  border: 1px dashed rgba(226, 232, 240, 0.15);
  border-radius: 10px;
  font-size: 14px;
  color: #94a3b8;
}

.equip-flag {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.equip-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
  font-weight: 700;
  width: fit-content;
}

.gear-new-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fecdd3;
  font-weight: 700;
  font-size: 12px;
}

.dps-affix {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.6);
  background: rgba(56, 189, 248, 0.05);
}

.gear-table td:last-child,
.gear-table th:last-child {
  text-align: right;
  white-space: nowrap;
}

.equip-reason {
  font-size: 13px;
  color: #cbd5e1;
}

.equip-reason.muted {
  color: #94a3b8;
}

.compute-card ul {
  margin: 0;
  padding-left: 18px;
}

.computelabel {
  font-style: italic;
  color: #94a3b8;
}

.resisttext {
  text-decoration: underline;
}

.dps-chart {
  margin-top: 16px;
  padding: 10px;
  border: 1px solid rgba(226, 232, 240, 0.12);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
}

.compute-btn {
  margin-top: 12px;
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  background: #ef4444;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.compute-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(239, 68, 68, 0.35);
}
