:root {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(70, 109, 156, 0.18), transparent 34%),
    linear-gradient(180deg, #080b0f 0%, #10151d 100%);
}

.xp-shell {
  max-width: 1680px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.xp-panel,
.xp-metric {
  border: 1px solid rgba(94, 126, 171, 0.45);
  border-radius: 10px;
  background: rgba(8, 11, 15, 0.72);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.xp-header {
  margin-bottom: 18px;
  padding: 4px 2px 0;
}

.xp-header h1 {
  margin: 0;
  color: #d8e6f7;
  font-size: 38px;
  line-height: 1.15;
}

.xp-level-progress {
  margin-bottom: 18px;
}

.xp-level-progress-meta {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  color: #bfd8f2;
  font-size: 18px;
}

.xp-level-progress-meta span:nth-child(2) {
  text-align: center;
}

.xp-level-progress-meta span:last-child {
  text-align: right;
}

.xp-bar {
  position: relative;
  height: 26px;
  background:
    linear-gradient(180deg, #1b1c1a 0%, #050505 38%, #0b0c0b 62%, #22231f 100%);
  box-shadow:
    0 0 0 1px rgba(77, 77, 70, 0.45),
    0 2px 8px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.xp-bar-fill {
  position: absolute;
  top: 10px;
  left: 4px;
  height: 6px;
  width: 0;
  background:
    linear-gradient(180deg, #fff5b7 0%, #ffe083 28%, #bd822c 62%, #f0ca64 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    inset 0 -1px 0 rgba(73, 42, 7, 0.88),
    0 0 4px rgba(236, 194, 80, 0.42);
  pointer-events: none;
  z-index: 1;
}

.xp-bar-frame {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.xp-bar-frame .xp-bar-dividers rect {
  fill: url("#xp-frame-edge");
  stroke: #080908;
  stroke-width: 1;
}

.xp-bar-frame .xp-bar-notches path {
  fill: #5f6058;
  stroke: #11120f;
  stroke-width: 1.2;
}

.xp-bar-frame .xp-bar-noise path {
  fill: none;
  stroke: #87877c;
  stroke-width: 1;
}

.xp-panel {
  margin-bottom: 18px;
  padding: 18px;
}

.xp-panel h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.xp-input-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.xp-field {
  display: grid;
  gap: 7px;
  color: #c7dcf5;
  font-size: 18px;
}

.xp-field input {
  width: 100%;
  box-sizing: border-box;
  min-height: 46px;
  padding: 9px 12px;
  border: 1px solid rgba(118, 152, 199, 0.5);
  border-radius: 6px;
  background: rgba(3, 7, 11, 0.82);
  color: #d8e6f7;
  font-size: 18px;
}

.xp-session-controls {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.xp-reset-time {
  min-height: 46px;
  font-size: 18px !important;
}

.xp-summary {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.xp-rate-table {
  display: grid;
  gap: 10px;
}

.xp-rate-table > h2 {
  margin: 0;
  color: #d8e6f7;
  font-size: 20px;
  line-height: 1.2;
  text-transform: uppercase;
}

.xp-rate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
}

.xp-metric-group {
  display: grid;
  gap: 7px;
}

.xp-metric-group h3 {
  margin: 0;
  color: #d8e6f7;
  font-size: 18px;
  line-height: 1.2;
  text-transform: uppercase;
}

.xp-metric {
  display: grid;
  align-content: center;
  gap: 7px;
  min-height: 104px;
  padding: 17px;
}

.xp-metric strong {
  color: #d8e6f7;
  font-size: 30px;
  line-height: 1.15;
}

.is-hidden {
  display: none !important;
}

.xp-history-heading h2 {
  margin: 0 0 14px;
}

.xp-hourly-chart-panel {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(118, 152, 199, 0.25);
  background: rgba(3, 7, 11, 0.42);
}

.xp-hourly-chart-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.xp-hourly-chart-heading h3 {
  margin: 0;
  color: #d8e6f7;
  font-size: 18px;
  line-height: 1.2;
  text-transform: uppercase;
}

.xp-hourly-chart-heading span {
  color: #bfd8f2;
  font-size: 16px;
}

.xp-hourly-chart {
  display: block;
  width: 100%;
  height: 220px;
}

.xp-hourly-chart .xp-chart-grid {
  stroke: rgba(118, 152, 199, 0.16);
  stroke-width: 1;
}

.xp-hourly-chart .xp-chart-axis {
  stroke: rgba(191, 216, 242, 0.42);
  stroke-width: 1;
}

.xp-hourly-chart .xp-chart-area {
  fill: rgba(218, 165, 62, 0.16);
}

.xp-hourly-chart .xp-chart-line {
  fill: none;
  stroke: #e8bd58;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.xp-hourly-chart .xp-chart-point {
  fill: #ffe4a0;
  stroke: #3c2408;
  stroke-width: 1;
}

.xp-hourly-chart text {
  fill: #bfd8f2;
  font-size: 14px;
}

.xp-hourly-chart-empty {
  margin: 10px 0 0;
  color: #bfd8f2;
  font-size: 16px;
}

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

.xp-history-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: #d8e6f6;
}

.xp-history-table th,
.xp-history-table td {
  padding: 12px 14px;
  border-top: 1px solid rgba(118, 152, 199, 0.2);
  text-align: left;
  white-space: nowrap;
  font-size: 18px;
}

.xp-history-table th {
  color: #bfd8f2;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
}

.xp-history-table tbody td {
  background: rgba(255, 255, 255, 0.02);
}

.xp-history-table th:first-child,
.xp-history-table td:first-child {
  width: 42px;
  padding-left: 0;
  text-align: center;
}

.xp-history-table tbody tr:hover {
  background: rgba(118, 152, 199, 0.08);
}

.xp-history-table tbody tr.is-outside-tracking-window {
  opacity: 0.46;
}

.xp-history-table tbody tr.is-outside-tracking-window td {
  background: rgba(255, 255, 255, 0.01);
}

.xp-delete-entry {
  position: relative;
  width: 28px;
  height: 28px;
  border: 1px solid #80502d;
  border-radius: 3px;
  background:
    linear-gradient(145deg, #5e1e18, #1d0707 58%, #090303);
  box-shadow:
    inset 0 1px 0 rgba(255, 214, 152, 0.24),
    0 2px 8px rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

.xp-delete-entry::before,
.xp-delete-entry::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 13px;
  width: 2px;
  height: 14px;
  background: #f2c083;
  box-shadow: 0 0 5px rgba(255, 99, 74, 0.58);
  transition: transform 150ms ease, background 150ms ease;
}

.xp-delete-entry::before {
  transform: rotate(45deg);
}

.xp-delete-entry::after {
  transform: rotate(-45deg);
}

.xp-delete-entry:hover {
  border-color: #d48a4f;
  animation: xp-close-pulse 420ms ease;
}

.xp-delete-entry:hover::before {
  transform: rotate(135deg);
  background: #ffe0a8;
}

.xp-delete-entry:hover::after {
  transform: rotate(45deg);
  background: #ffe0a8;
}

@keyframes xp-close-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@media (max-width: 760px) {
  .xp-input-grid,
  .xp-rate-grid {
    grid-template-columns: 1fr;
  }

}
