/* ==========================================================================
   1. Root Variables & Global Styles
   ========================================================================== */
:root {
  --bg: #071023;
  --muted: #9fb4ff;
  --accent: #7b5cff;
  --accent-hover: #6a48ff;
  --card-bg: #0b1220;
  --card-bg-alt: #071421;
  --border-color: rgba(255, 255, 255, 0.06);
  --success: #00c7a4;
  --danger: #c93454;
  --roobet-color: #ff8800;
  --roobet-hover: #ffad4d;
}

html,
body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: #e6eef8;
  font-family: 'Inter', system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

h1 {
  margin: 0 0 6px 0;
  font-size: 20px;
}

h2 {
  font-size: 16px;
  margin-top: 24px;
  margin-bottom: 8px;
  color: var(--muted);
}

p.lead {
  margin: 0 0 18px 0;
  color: var(--muted);
  font-size: 13px;
}

/* ==========================================================================
     2. Main Layout
     ========================================================================== */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #0b1220;
  /* Dark background */
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  z-index: 9999;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
}

.loading-text {
  font-family: sans-serif;
  /* Added for better display */
  font-size: 4rem;
  font-weight: 700;
  color: transparent;
  /* Makes the base text see-through */
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.4);
  /* The outline effect */
  position: relative;
  white-space: nowrap;
  margin: 0;
}

/* The inner span holds the "filled" text */
.loading-text span {
  position: absolute;
  top: 0;
  left: 0;
  color: #ffffff;
  /* The solid fill color */
  width: 0%;
  overflow: hidden;
  white-space: nowrap;
  -webkit-animation: fillText 5s ease-in-out infinite;
          animation: fillText 5s ease-in-out infinite;
}

.loading-subtext {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.2rem;
  letter-spacing: 2px;
}

/* The animation that grows and shrinks the width of the span */
@-webkit-keyframes fillText {
  0% {
    width: 0%;
  }
  45% {
    width: 100%;
  }
  55% {
    width: 100%;
  }
  /* Pauses for a moment when full */
  100% {
    width: 0%;
  }
}
@keyframes fillText {
  0% {
    width: 0%;
  }
  45% {
    width: 100%;
  }
  55% {
    width: 100%;
  }
  /* Pauses for a moment when full */
  100% {
    width: 0%;
  }
}

.menu-item-header {
  padding: 8px 16px;
  font-size: 12px;
  color: #8a96a0;
  text-transform: uppercase;
  font-weight: 600;
}

.menu-item-header-small {
  padding: 8px 16px;
  font-size: 9px;
  color: #8a96a0;
  text-transform: uppercase;
  font-weight: 600;
}

.casino-selector {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  padding: 0 16px 8px;
  gap: 8px;
}

.casino-select-btn {
  -webkit-box-flex: 1;
      -ms-flex-positive: 1;
          flex-grow: 1;
  background-color: var(--card-bg-alt);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  -webkit-transition: background-color 0.2s, border-color 0.2s;
  transition: background-color 0.2s, border-color 0.2s;
}

.casino-select-btn:hover {
  background-color: #313f4f;
}

.casino-select-btn.active {
  background-color: red;
  border-color: red;
  color: #fff;
  font-weight: 600;
}

.wrap {
  max-width: 1400px;
  margin: 18px auto;
  padding: 18px;
  padding-top: 70px;
  /* Space for the fixed header */
}

.main-layout {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 18px;
}

.main-content {
  -webkit-box-flex: 1;
      -ms-flex-positive: 1;
          flex-grow: 1;
}

.page {
  display: block;
}

/* The controls div is now empty, but we'll keep it for structure */
/* ==========================================================================
     3. Header & Dropdown Menu
     ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  width: 100%;
  height: 70px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  /* This is the key change */
  padding: 10px 30px;
  /* Adjust padding as needed */
  background-color: var(--bg);
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

/* Replace your existing .user-menu-container rule with this */
.user-menu-container {
  position: relative;
  /* This is correct, it acts as an anchor for the dropdown */
  pointer-events: auto;
}

.header-title {
  font-size: 22px;
  font-weight: 700;
  color: #e6eef8;
}

.user-menu-container {
  position: absolute;
  right: 30px;
  /* Moves the gear icon off the edge of the screen */
  top: 50%;
  -webkit-transform: translateY(-50%);
          transform: translateY(-50%);
  /* Vertically centers the icon in the header */
}

/* Note the ".user-dropdown-menu" prefix has been removed from all rules */
.switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #334155;
  /* Changed default color for dark theme */
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--success);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

input:checked + .slider:before {
  -webkit-transform: translateX(14px);
          transform: translateX(14px);
}

.user-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  /* Positions the triangle just above the menu's top edge */
  left: 50%;
  /* Moves the triangle's left edge to the center */
  -webkit-transform: translateX(-50%);
          transform: translateX(-50%);
  /* Shifts the triangle back by half its own width */
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #fcfcfd;
  /* This color MUST match the menu's background-color */
}

.menu-toggle-btn {
  background: transparent;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  width: 44px;
  margin-right: 102px;
  height: 44px;
  padding: 8px;
  cursor: pointer;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-transition: -webkit-transform 0.3s ease-in;
  transition: -webkit-transform 0.3s ease-in;
  transition: transform 0.3s ease-in;
  transition: transform 0.3s ease-in, -webkit-transform 0.3s ease-in;
}

.menu-toggle-btn:hover {
  -webkit-transform: rotate(90deg);
          transform: rotate(90deg);
  background-color: transparent;
}

.menu-toggle-btn svg {
  width: 24px;
  height: 24px;
  stroke: #FFFFFF;
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 15px);
  right: 0;
  width: 250px;
  background-color: #fcfcfd;
  border-radius: 12px;
  -webkit-box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
          box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  padding: 8px;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  display: block;
  opacity: 0;
  -webkit-transform: translateY(-10px);
          transform: translateY(-10px);
  pointer-events: none;
  -webkit-transition: opacity 0.2s ease, -webkit-transform 0.2s ease;
  transition: opacity 0.2s ease, -webkit-transform 0.2s ease;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transition: opacity 0.2s ease, transform 0.2s ease, -webkit-transform 0.2s ease;
}

.user-dropdown-menu.visible {
  opacity: 1;
  -webkit-transform: translateY(0);
          transform: translateY(0);
  pointer-events: auto;
}

.user-dropdown-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.user-dropdown-menu a {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  color: #262f36;
  -webkit-transition: background-color 0.2s ease;
  transition: background-color 0.2s ease;
}

.user-dropdown-menu a:hover {
  background-color: #f0f2f5;
}

.user-dropdown-menu a svg {
  width: 20px;
  height: 20px;
  -ms-flex-negative: 0;
      flex-shrink: 0;
  fill: #555;
  /* Use fill for the new solid icons */
  stroke: none;
  /* Turn off stroke */
}

.user-dropdown-menu a:first-child svg {
  fill: #555;
  /* The settings icon looks better with a fill */
  stroke: none;
}

.user-dropdown-menu li.divider {
  height: 1px;
  border-top: 1px solid #e5e7eb;
  margin: 8px 2px;
  padding: 0;
}

/* --- Controls within the dropdown --- */
.user-dropdown-menu .menu-item-control {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 500;
  color: #262f36;
  cursor: default;
}

.user-dropdown-menu .menu-item-control label:first-child {
  pointer-events: none;
}

.user-dropdown-menu:has(nav.controls-locked) {
  pointer-events: none;
  opacity: 0.7;
}

/* --- Buttons within the dropdown --- */
.list-widget {
  margin-bottom: 20px;
}

.list-widget-header {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  cursor: pointer;
  padding: 10px;
  border-radius: 6px;
  background-color: var(--card-bg-alt);
  -webkit-transition: background-color 0.2s ease;
  transition: background-color 0.2s ease;
}

.list-widget-header:hover {
  background-color: var(--border-color);
}

.list-widget-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.toggle-button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: var(--text-color);
  cursor: pointer;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
}

.toggle-button:hover {
  background-color: transparent;
}

.toggle-button svg {
  -webkit-transition: -webkit-transform 0.3s ease-in-out;
  transition: -webkit-transform 0.3s ease-in-out;
  transition: transform 0.3s ease-in-out;
  transition: transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;
}

/* The collapsible content area */
.list-widget-content {
  /* The magic starts here: Hide by default */
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  -webkit-transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out, margin-top 0.4s ease-in-out;
  transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out, margin-top 0.4s ease-in-out;
  margin-top: 0;
}

/* --- State change when the list is open --- */
/* When the parent has .is-open, the content expands */
.list-widget.is-open .list-widget-content {
  /* A large enough value to accommodate any number of items */
  max-height: 500000px;
  opacity: 1;
  margin-top: 10px;
  /* Add some space when open */
}

/* Rotate the chevron icon when open */
.list-widget.is-open .toggle-button svg {
  -webkit-transform: rotate(180deg);
          transform: rotate(180deg);
}

.user-dropdown-menu .menu-button {
  width: 100%;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  padding: 10px;
  margin-top: 8px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
}

#specialEventOverlay.fullscreen {
  pointer-events: auto;
  /* Make the overlay block clicks */
  background-color: rgba(0, 0, 0, 0.7);
  /* Optional: darken the background */
}

#specialEventOverlay video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  z-index: 100;
  /* Ensures the video is on top of other content */
}

/* Redesigned Reset Button */
#resetPartyBtn {
  background-color: #e5e7eb;
  color: #374151;
  opacity: 0;
  -webkit-transform: scale(0.95);
          transform: scale(0.95);
  pointer-events: none;
  height: 0;
  padding: 0 10px;
  margin: 0;
  overflow: hidden;
}

#resetPartyBtn:hover {
  background-color: #d1d5db;
  color: #1f2937;
}

#resetPartyBtn.visible {
  opacity: 1;
  -webkit-transform: scale(1);
          transform: scale(1);
  pointer-events: auto;
  height: 38px;
  padding: 10px;
  margin-top: 8px;
}

/* Redesigned Stake / Roobet Button */
#casinoBtn {
  color: white;
}

.stake-style {
  background-color: var(--accent);
  -webkit-box-shadow: 0 4px 15px -5px var(--accent);
          box-shadow: 0 4px 15px -5px var(--accent);
}

.stake-style:hover {
  background-color: var(--accent-hover);
  -webkit-transform: translateY(-1px);
          transform: translateY(-1px);
}

.roobet-style {
  background-color: var(--roobet-color);
  -webkit-box-shadow: 0 4px 15px -5px var(--roobet-color);
          box-shadow: 0 4px 15px -5px var(--roobet-color);
}

.roobet-style:hover {
  background-color: var(--roobet-hover);
  -webkit-transform: translateY(-1px);
          transform: translateY(-1px);
}

/* ==========================================================================
     4. Canvas & Wheel
     ========================================================================== */
.canvas-wrap {
  background: -webkit-gradient(linear, left top, left bottom, from(#051025), to(#071427));
  background: linear-gradient(180deg, #051025, #071427);
  padding: 14px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  pointer-events: auto;
}

.canvas-wrap::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 50%;
  -webkit-transform: translateX(-50%);
          transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background-color: var(--accent);
  border-radius: 50%;
  -webkit-box-shadow: 0 0 10px 2px var(--accent);
          box-shadow: 0 0 10px 2px var(--accent);
  z-index: 5;
}

/* SPIN BUTTON */
.unique-button {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  gap: 12px;
  padding: 16px 32px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  border-radius: 12px;
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
  -webkit-box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
          box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  /* Consolidated margin and max-height */
  margin: 15px auto 20px auto;
  max-height: 60px;
  /* Add the bounce animation back */
  -webkit-animation: unique-bounce 2s infinite ease-in-out;
          animation: unique-bounce 2s infinite ease-in-out;
  /* <-- ADD THIS LINE */
}

@-webkit-keyframes unique-bounce {
  0%, 100% {
    -webkit-transform: translateY(0);
            transform: translateY(0);
  }
  50% {
    -webkit-transform: translateY(-4px);
            transform: translateY(-4px);
    /* A more subtle bounce */
  }
}

@keyframes unique-bounce {
  0%, 100% {
    -webkit-transform: translateY(0);
            transform: translateY(0);
  }
  50% {
    -webkit-transform: translateY(-4px);
            transform: translateY(-4px);
    /* A more subtle bounce */
  }
}

/* Create the animated gradient background */
.unique-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background: linear-gradient(115deg, var(--accent), #5a52d4, #8a52d4, var(--accent));
  background-size: 50% 100%;
  -webkit-animation: gradient-slide 4s linear infinite;
          animation: gradient-slide 4s linear infinite;
}

.unique-button span,
.unique-button svg {
  position: relative;
  /* Bring the text and icon above the gradient */
  z-index: 1;
}

.unique-button:hover {
  -webkit-transform: translateY(-3px);
          transform: translateY(-3px);
  -webkit-box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
          box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.unique-button:active {
  -webkit-transform: translateY(1px);
          transform: translateY(1px);
  -webkit-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
          box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

#spinBtn.fade-out {
  /* The 'forwards' keyword is essential - it holds the final state */
  -webkit-animation: fadeAndCollapse 1s ease-in-out forwards;
          animation: fadeAndCollapse 1s ease-in-out forwards;
}

@-webkit-keyframes fadeAndCollapse {
  /* --- STARTING STATE --- */
  from {
    opacity: 1;
    max-height: 60px;
    margin-top: 15px;
    /* <-- ADD THIS */
    margin-bottom: 20px;
    padding-top: 16px;
    padding-bottom: 16px;
    -webkit-transform: translateY(0);
            transform: translateY(0);
    visibility: visible;
  }
  /* --- ENDING STATE --- */
  to {
    opacity: 0;
    max-height: 0;
    margin-top: 0;
    /* <-- ADD THIS */
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
    -webkit-transform: translateY(10px);
            transform: translateY(10px);
    visibility: hidden;
  }
}

@keyframes fadeAndCollapse {
  /* --- STARTING STATE --- */
  from {
    opacity: 1;
    max-height: 60px;
    margin-top: 15px;
    /* <-- ADD THIS */
    margin-bottom: 20px;
    padding-top: 16px;
    padding-bottom: 16px;
    -webkit-transform: translateY(0);
            transform: translateY(0);
    visibility: visible;
  }
  /* --- ENDING STATE --- */
  to {
    opacity: 0;
    max-height: 0;
    margin-top: 0;
    /* <-- ADD THIS */
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
    -webkit-transform: translateY(10px);
            transform: translateY(10px);
    visibility: hidden;
  }
}

/* Keyframes to slide the gradient */
@-webkit-keyframes gradient-slide {
  0% {
    -webkit-transform: translateX(0);
            transform: translateX(0);
  }
  100% {
    -webkit-transform: translateX(-50%);
            transform: translateX(-50%);
  }
}
@keyframes gradient-slide {
  0% {
    -webkit-transform: translateX(0);
            transform: translateX(0);
  }
  100% {
    -webkit-transform: translateX(-50%);
            transform: translateX(-50%);
  }
}

/* Keyframes for the graceful exit animation */
#spinBtn:hover {
  background-color: var(--accent-hover);
}

/* This creates the immediate "press down" effect when you click and hold */
#spinBtn:active {
  -webkit-transform: translateY(4px);
          transform: translateY(4px);
  -webkit-box-shadow: 0 2px var(--accent-hover);
          box-shadow: 0 2px var(--accent-hover);
  -webkit-animation: none;
          animation: none;
  /* Temporarily disable bounce when pressing */
}

/* This class is added by your JavaScript to trigger the fade-out */
#spinBtn.clicked {
  -webkit-animation: unique-fade-out 2s ease-in forwards;
          animation: unique-fade-out 2s ease-in forwards;
  -webkit-animation-delay: 0.5s;
          animation-delay: 0.5s;
}

/* BAN BUTTON */
#banBtn {
  position: absolute;
  bottom: 10px;
  left: 50%;
  background-color: var(--danger);
  color: white;
  font-size: 16px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 12px;
  border: none;
  -webkit-box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
          box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  z-index: 20;
  cursor: pointer;
  opacity: 0;
  -webkit-transform: translateX(-50%) translateY(10px);
          transform: translateX(-50%) translateY(10px);
  pointer-events: none;
  -webkit-transition: opacity 0.2s ease-out, -webkit-transform 0.2s ease-out;
  transition: opacity 0.2s ease-out, -webkit-transform 0.2s ease-out;
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
  transition: opacity 0.2s ease-out, transform 0.2s ease-out, -webkit-transform 0.2s ease-out;
}

#banBtn:hover {
  background-color: #b12b48;
}

#banBtn.visible {
  opacity: 1;
  -webkit-transform: translateX(-50%) translateY(0);
          transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

button {
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: white;
  font-weight: 700;
  cursor: pointer;
  -webkit-transition: background-color 0.2s;
  transition: background-color 0.2s;
}

button:hover {
  background: var(--accent-hover);
}

/* Secondary Button Style (e.g., "Back to Wheel") */
button.secondary {
  background-color: #334155;
  color: #e2e8f0;
}

button.secondary:hover {
  background-color: #475569;
}

/* File Upload Button */
.file-input-wrapper .btn {
  background: #334155;
  pointer-events: none;
}

/* Danger / Reset Button */
#resetBtn {
  background-color: var(--danger);
}

#resetBtn:hover {
  background-color: #e11d48;
  /* Brighter danger color on hover */
}

/* ==========================================================================
     5. List Containers (History, Banned, Options)
     ========================================================================== */
.list-container {
  margin-top: 18px;
  background: var(--card-bg);
  padding: 12px;
  border-radius: 10px;
  overflow: auto;
}

.list-item {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  padding: 8px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

.list-item > div:first-child {
  /* This is the key: It allows the container to shrink and the text to wrap. */
  min-width: 0;
  /* This adds a safety gap between the text and the controls. */
  margin-right: 1rem;
}

.list-item:last-child {
  border-bottom: none;
}

.list-item button {
  margin-left: 8px;
  padding: 3px 8px;
  font-size: 12px;
  background-color: var(--danger);
}

.list-item button:hover {
  background-color: #b12b48;
}

.weight-controls button {
  background-color: #334155;
  min-width: 24px;
  height: 24px;
  padding: 0;
  font-size: 16px;
  line-height: 24px;
}

.weight-controls span {
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

.history-item {
  color: #ccc;
}

.history-item .winner-name {
  font-weight: bold;
  color: var(--success);
}

#banList .list-item {
  color: #888;
  text-decoration: line-through;
}

.weight-controls .danger-button {
  background-color: var(--danger);
  background-color: var(--danger, #c93454);
  color: #fff;
  padding-bottom: 4px;
  padding-left: 4px;
  padding-right: 4px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  -webkit-transition: background-color 0.2s ease;
  transition: background-color 0.2s ease;
}

.weight-controls .danger-button:hover {
  background-color: #a12842;
  /* A darker red for hover */
}

/* Ensure settings widgets have some space */
#optionsPage .list-widget {
  margin-top: 20px;
}

/* ==========================================================================
     6. Overlays & Modals
     ========================================================================== */
#confettiCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

#specialEventOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  -webkit-transition: opacity 0.5s ease;
  transition: opacity 0.5s ease;
  -webkit-backdrop-filter: blur(5px);
          backdrop-filter: blur(5px);
}

#specialEventOverlay.active {
  opacity: 1;
  pointer-events: auto;
}

#specialEventVideo {
  max-width: 80vw;
  max-height: 80vh;
  opacity: 0;
  -webkit-transform: scale(0.2);
          transform: scale(0.2);
  -webkit-transition: opacity 0.7s ease, -webkit-transform 0.7s ease;
  transition: opacity 0.7s ease, -webkit-transform 0.7s ease;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition: opacity 0.7s ease, transform 0.7s ease, -webkit-transform 0.7s ease;
  border-radius: 12px;
  -webkit-box-shadow: 0 0 80px rgba(0, 0, 0, 0.5);
          box-shadow: 0 0 80px rgba(0, 0, 0, 0.5);
}

#specialEventOverlay.active #specialEventVideo {
  opacity: 0.8;
  -webkit-transform: scale(1);
          transform: scale(1);
}

#banOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  z-index: 200;
  opacity: 0;
  -webkit-transform: scale(1.5);
          transform: scale(1.5);
  pointer-events: none;
  -webkit-transition: opacity 0.2s ease-in-out, -webkit-transform 0.2s ease-in-out;
  transition: opacity 0.2s ease-in-out, -webkit-transform 0.2s ease-in-out;
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out, -webkit-transform 0.2s ease-in-out;
  font-family: sans-serif;
  font-size: 40vw;
  font-weight: bold;
  color: var(--danger);
  text-shadow: 0 0 10px #fff, 0 0 20px #ff4d4d, 0 0 35px #ff4d4d, 0 0 50px var(--danger), 0 0 75px var(--danger), 0 0 100px var(--danger);
}

#banOverlay.active {
  opacity: 1;
  -webkit-transform: scale(1);
          transform: scale(1);
}

#flashOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 0, 0, 0.5);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
}

#flashOverlay.flash {
  -webkit-animation: red-flash 0.3s ease-out;
          animation: red-flash 0.3s ease-out;
}

.filterTab {
  background-color: var(--card-bg);
  padding: 1rem;
  border-radius: 8px;
}

/* ==========================================================================
     7. Settings Page & Form Elements
     ========================================================================== */
.settings-container {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  margin-top: 24px;
  /* Keeps the original top margin */
}

.provider-list-item {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  font-size: 14px;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  padding: 12px 8px;
  border-bottom: 1px solid var(--border-color);
}

.provider-list-item:last-child {
  border-bottom: none;
}

input[type="text"] {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: inherit;
  width: 220px;
  -webkit-transition: -webkit-box-shadow 0.2s;
  transition: -webkit-box-shadow 0.2s;
  transition: box-shadow 0.2s;
  transition: box-shadow 0.2s, -webkit-box-shadow 0.2s;
}

input:focus {
  outline: none;
  -webkit-box-shadow: 0 0 0 2px var(--accent);
          box-shadow: 0 0 0 2px var(--accent);
}

.file-input-wrapper {
  position: relative;
  display: inline-block;
}

.file-input-wrapper input[type=file] {
  font-size: 100px;
  position: absolute;
  height: 35px;
  width: 110px;
  opacity: 0;
  left: 0;
  top: 0;
  cursor: pointer;
}

.file-input-wrapper .btn {
  display: inline-block;
  padding: 10px 14px;
  overflow: hidden;
  border-radius: 8px;
  background: #334155;
  pointer-events: none;
}

.volume-control {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 10px;
}

.volume-control label {
  font-weight: 500;
}

input[type="range"] {
  -webkit-appearance: none;
  -moz-appearance: none;
       appearance: none;
  width: 150px;
  height: 8px;
  background: #334155;
  border-radius: 5px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
}

/* ==========================================================================
     8. Animations
     ========================================================================== */
@-webkit-keyframes red-flash {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@keyframes red-flash {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes unique-bounce {
  0%, 100% {
    -webkit-transform: translateY(0);
            transform: translateY(0);
  }
  50% {
    -webkit-transform: translateY(-0.2em);
            transform: translateY(-0.2em);
  }
}

@-webkit-keyframes unique-fade-out {
  0% {
    -webkit-transform: translateY(0);
            transform: translateY(0);
    -webkit-box-shadow: 0 6px #5c3fdb;
            box-shadow: 0 6px #5c3fdb;
    opacity: 1;
  }
  10% {
    -webkit-transform: translateY(6px);
            transform: translateY(6px);
    background-color: gold;
    -webkit-box-shadow: 0 4px goldenrod;
            box-shadow: 0 4px goldenrod;
    opacity: 1;
  }
  100% {
    background-color: gold;
    -webkit-transform: translateY(6px);
            transform: translateY(6px);
    -webkit-box-shadow: 0 2px goldenrod;
            box-shadow: 0 2px goldenrod;
    opacity: 0;
  }
}

@keyframes unique-fade-out {
  0% {
    -webkit-transform: translateY(0);
            transform: translateY(0);
    -webkit-box-shadow: 0 6px #5c3fdb;
            box-shadow: 0 6px #5c3fdb;
    opacity: 1;
  }
  10% {
    -webkit-transform: translateY(6px);
            transform: translateY(6px);
    background-color: gold;
    -webkit-box-shadow: 0 4px goldenrod;
            box-shadow: 0 4px goldenrod;
    opacity: 1;
  }
  100% {
    background-color: gold;
    -webkit-transform: translateY(6px);
            transform: translateY(6px);
    -webkit-box-shadow: 0 2px goldenrod;
            box-shadow: 0 2px goldenrod;
    opacity: 0;
  }
}

/* ==========================================================================
     9. Media Queries
     ========================================================================== */
@media (max-width: 820px) {
  .wrap {
    padding: 10px;
    padding-top: 70px;
  }
  input {
    width: 160px;
  }
  .main-layout {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
  }
}
/*# sourceMappingURL=style.css.map */


.ad-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--background-alt);
  padding: 12px 20px;
  margin-bottom: 20px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.ad-banner.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ad-banner-text {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-color-muted);
}

.ad-banner-cta {
  background: var(--accent);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: background-color 0.2s;
}

.ad-banner-cta:hover {
  background: var(--accent-hover);
}

/* Responsive adjustments for the banner */
@media (max-width: 768px) {
  .ad-banner {
      flex-direction: column;
      gap: 10px;
      text-align: center;
  }
}