:root {
  --valorant-red: #FF4655;
  --valorant-dark: #0E0E10;
  --valorant-grey: #1A1A1C;
  --valorant-mid: #222226;
  --valorant-light-grey: #9A9A9A;
  --valorant-white: #ECE8E1;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--valorant-white);
  font-family: 'Teko', sans-serif;
  text-transform: uppercase;
  background:
    radial-gradient(60rem 60rem at -10% -10%, rgba(255,70,85,.15), transparent 60%),
    radial-gradient(50rem 50rem at 120% 20%, rgba(255,70,85,.12), transparent 60%),
    var(--valorant-dark);
  position: relative;
}

body::before {
  /* dark overlay on top of random splash for readability */
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(14,14,16,.88) 0%, rgba(14,14,16,.75) 40%, rgba(14,14,16,.88) 100%),
    var(--bg-image) center/cover no-repeat;
  z-index: -1;
  filter: saturate(.95);
}

.site-header {
  border-bottom: 2px solid var(--valorant-red);
  background: rgba(10,10,12,.6);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header h1 {
  font-size: 1.8rem;
  letter-spacing: .2rem;
}

.nav-tabs-wrapper .tab-button {
  appearance: none;
  background: transparent;
  border: 2px solid var(--valorant-mid);
  color: var(--valorant-light-grey);
  padding: .35rem 1rem;
  margin-left: .5rem;
  font-size: 1.1rem;
  letter-spacing: .08rem;
  transition: .15s ease;
  border-radius: 4px;
}

.nav-tabs-wrapper .tab-button:hover,
.nav-tabs-wrapper .tab-button.active {
  background: var(--valorant-red);
  border-color: var(--valorant-red);
  color: var(--valorant-white);
}

.main-wrap {
  padding-block: 1.25rem 2rem;
}

.tab-content {
  display: none;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: start;
}

.tab-content.active {
  display: grid;
}

@media (max-width: 992px) {
  .tab-content {
    grid-template-columns: 1fr;
  }
}

.controls-panel {
  background: linear-gradient(180deg, rgba(26,26,28,.95), rgba(18,18,20,.95));
  border: 1px solid var(--valorant-mid);
  border-radius: 10px;
  padding: 16px 16px 12px;
  max-height: 80vh;
  overflow: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.controls-panel h2 {
  margin: 0 0 .75rem;
  color: var(--valorant-red);
  border-bottom: 1px solid rgba(255,70,85,.35);
  padding-bottom: .35rem;
  letter-spacing: .12rem;
}

.controls-panel h3 {
  margin: .25rem 0 .35rem;
  font-size: 1.15rem;
  color: #dcd8d1;
  letter-spacing: .08rem;
}

.filter-group, .item-list {
  margin-bottom: 14px;
}

.item-list label, .filter-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 1.05rem;
  cursor: pointer;
  letter-spacing: .04rem;
}

.item-list label:hover {
  color: var(--valorant-red);
}

input[type="checkbox"] {
  accent-color: var(--valorant-red);
  transform: translateY(1px) scale(1.15);
  margin-right: 8px;
}

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

#priceRange { width: 70%; }

.custom-add-item {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

#customItemInput {
  flex: 1;
  background: var(--valorant-mid);
  border: 1px solid var(--valorant-mid);
  color: var(--valorant-white);
  padding: 8px 10px;
  font-size: 1.05rem;
  border-radius: 6px;
}

.custom-add-item button,
.preset-buttons button {
  background: var(--valorant-mid);
  border: 1px solid var(--valorant-mid);
  color: var(--valorant-white);
  padding: 8px 14px;
  border-radius: 6px;
  transition: .15s ease;
  font-size: 1rem;
  letter-spacing: .04rem;
}

.custom-add-item button:hover,
.preset-buttons button:hover {
  background: var(--valorant-red);
  border-color: var(--valorant-red);
}

.preset-buttons {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.custom-item-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--valorant-mid);
  padding: 6px 10px;
  margin-bottom: 6px;
  border-radius: 6px;
}

.custom-item-entry button {
  background: transparent;
  border: none;
  color: var(--valorant-red);
  font-size: 1.2rem;
  cursor: pointer;
}

.wheel-container {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 16px;
}

canvas {
  display: block;
  max-width: min(90vw, 520px);
  height: auto;
}

.wheel-marker {
  /* top center "pointer" */
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 28px solid var(--valorant-red);
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.4));
  pointer-events: none;
  z-index: 2;
}

.spin-button {
  background: var(--valorant-red);
  border: none;
  color: var(--valorant-white);
  padding: 12px 44px;
  font-size: 1.6rem;
  border-radius: 10px;
  letter-spacing: .12rem;
  transition: transform .08s ease, filter .15s ease;
  box-shadow: 0 10px 24px rgba(255,70,85,.22);
}

.spin-button:active { transform: translateY(1px) scale(.98); }
.spin-button:disabled { filter: grayscale(.4) opacity(.7); }

.loading-text { color: var(--valorant-light-grey); font-style: italic; }

/* Modal theme */
.modal-themed {
  background: #111;
  color: var(--valorant-white);
  border: 1px solid var(--valorant-mid);
}
.modal-themed .modal-header,
.modal-themed .modal-footer {
  border-color: rgba(255,70,85,.35);
}


/* === Price slider VALORANT theme === */
#priceRange {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 8px;
  background: linear-gradient(to right, var(--valorant-red) 0%, var(--valorant-red) var(--range-progress, 100%), #2a2a2f var(--range-progress, 100%), #2a2a2f 100%);
  border: 1px solid var(--valorant-mid);
  outline: none;
}

/* WebKit (Chrome/Edge/Safari) */
#priceRange::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 8px;
  background: transparent; /* we paint via the main element's background */
}
#priceRange::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--valorant-red);
  border: 2px solid #0e0e10;
  box-shadow: 0 0 0 4px rgba(255,70,85,.25);
  margin-top: -6px; /* centers on 8px track */
  cursor: pointer;
}

/* Firefox */
#priceRange::-moz-range-track {
  height: 8px;
  border-radius: 8px;
  background: #2a2a2f;
  border: 1px solid var(--valorant-mid);
}
#priceRange::-moz-range-progress {
  height: 8px;
  border-radius: 8px 0 0 8px;
  background: var(--valorant-red);
}
#priceRange::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--valorant-red);
  border: 2px solid #0e0e10;
  box-shadow: 0 0 0 4px rgba(255,70,85,.25);
  cursor: pointer;
}


/* Center and enlarge spin result text */
#resultText {
  text-align: center;
  font-size: 2rem;
  font-weight: bold;
  color: var(--valorant-red);
  margin: 1rem 0;
  letter-spacing: .05rem;
}
