/* ================= GLOBAL ================= */
body {
  margin: 0;
  padding: 20px;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: radial-gradient(circle at top, #1a1a1f, #0b0b0f);
  color: white;
  text-align: center;
}

h1 { margin-bottom: 10px; font-weight: 600; }
#coins { font-size: 18px; font-weight: bold; margin-bottom: 20px; }


/* ================= NEON BANNER ================= */
#neon-banner {
  font-size: 28px;
  font-weight: bold;
  color: #ff0000;
  text-shadow:
    0 0 5px #ff0000,
    0 0 10px #ff0000,
    0 0 20px #ff4d4d,
    0 0 30px #ff4d4d,
    0 0 40px #ff6666;
  margin-bottom: 20px;
  animation: neonPulse 1.5s ease-in-out infinite alternate;
}
@keyframes neonPulse {
  0% { text-shadow: 0 0 5px #ff0000, 0 0 10px #ff0000, 0 0 20px #ff4d4d; }
  50% { text-shadow: 0 0 15px #ff4d4d, 0 0 30px #ff6666, 0 0 50px #ff8080; }
  100% { text-shadow: 0 0 25px #ff6666, 0 0 50px #ff8080, 0 0 70px #ff9999; }
}

/* ================= BUTTON THEME ================= */
.theme-btn {
  background: linear-gradient(135deg, #00bfa5, #1de9b6);
  border: none;
  padding: 10px 22px;
  font-size: 16px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  margin: 5px;
  transition: all 0.2s ease;
  color: black;
}
.theme-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px #00bfa5;
}

/* ================= CASE SECTION ================= */
#case-section {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  background: rgba(25,25,30,0.8);
  backdrop-filter: blur(8px);
  padding: 30px;
  border-radius: 20px;
  max-width: 950px;
  margin: 0 auto 30px auto;
  box-shadow: 0 0 40px rgba(0,0,0,0.6);
}

.case-left img { width: 220px; border-radius: 15px; }
.case-right h2 { margin-bottom: 15px; }

#case-items-list { margin-top: 10px; max-height: 300px; overflow-y: auto; }

/* Custom case dropdown */
.custom-dropdown {
  position: relative;
  width: 250px;
  margin: 10px 0;
  cursor: pointer;
}

#case-select-display {
  padding: 6px 10px;
  border: 2px solid #fff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #222;
  color: #fff;
}

#case-select-display img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  border-radius: 4px;
}

#case-select-options {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  border: 2px solid #fff;
  border-radius: 6px;
  background-color: #222;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  z-index: 10;
}

#case-select-options div {
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
}

#case-select-options div:hover {
  background-color: #444;
}

#case-select-options img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  border-radius: 4px;
}

/* Show odds inside case items nicely */
#case-items-list .inv-item small {
  display: block;
  font-size: 13px;
  color: #f0f0f0;
}
/* ================= OPEN BUTTON ================= */
#open-btn { margin-top: 10px; display: inline-block; }

/* ================= WINNER NAME ================= */
#winner-name { font-size: 22px; font-weight: bold; margin: 20px 0; }

/* ================= SPINNER ================= */
#spinner-wrapper { width: 1000px; max-width: 95%; margin: 20px auto; }
#spinner-container {
  height: 170px;
  overflow: hidden;
  background: rgba(20,20,25,0.9);
  backdrop-filter: blur(6px);
  border-radius: 15px;
  border: 2px solid #333;
  position: relative;
}
#spinner-strip { display: flex; align-items: center; transition: transform 6s cubic-bezier(.08,.6,0,1); }
#spinner-container::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  width: 4px;
  height: 100%;
  background: gold;
  border-radius: 2px;
  box-shadow: 0 0 15px gold, 0 0 35px orange;
  z-index: 10;
}
.spinner-item {
  flex: 0 0 auto;
  width: 110px;
  height: 140px;
  margin: 15px;
  background: #1a1a22;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}
.spinner-item img { width: 70px; height: 70px; object-fit: contain; }
.highlight-won { animation: glowScale 1.5s ease-in-out infinite alternate; z-index: 20; }
@keyframes glowScale {
  0% { transform: scale(1); box-shadow: 0 0 15px currentColor; }
  50% { transform: scale(1.25); box-shadow: 0 0 35px currentColor; }
  100% { transform: scale(1); box-shadow: 0 0 15px currentColor; }
}

/* ================= INVENTORY ================= */
#inventory {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}
.inv-item {
  width: 140px;
  padding: 15px;
  background: rgba(25,25,30,0.8);
  backdrop-filter: blur(6px);
  border-radius: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.inv-item:hover { transform: translateY(-6px); }
.inv-item img { width: 70px; height: 70px; object-fit: contain; }
.sell-btn {
  margin-top: 8px;
  padding: 6px;
  background: #00bfa5;
  border: none;
  border-radius: 6px;
  color: black;
  cursor: pointer;
  font-size: 13px;
}
.inventory-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 30px;
}
#sell-all-btn {
  background: linear-gradient(135deg, #00bfa5, #1de9b6);
  border: none;
  padding: 8px 18px;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  color: black;
}
#sell-all-btn:hover {
  transform: scale(1.07);
  box-shadow: 0 0 15px #00bfa5;
}

/* ================= TOP DROPS ================= */
#top-drops {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 30px;
}
.top-drop {
  width: 170px;
  padding: 15px;
  background: rgba(25,25,30,0.8);
  backdrop-filter: blur(6px);
  border-radius: 18px;
}
.top-drop img { width: 75px; height: 75px; object-fit: contain; }

/* ================= RARITY SYSTEM ================= */
.common     { border: 2px solid #777; box-shadow: 0 0 10px #777; color: #bbb; }
.rare       { border: 2px solid #4aa3ff; box-shadow: 0 0 14px #4aa3ff; color: #4aa3ff; }
.strange    { border: 2px solid orange; box-shadow: 0 0 16px orange; color: orange; }
.unusual    { border: 2px solid purple; box-shadow: 0 0 18px purple; color: purple; }
.legendary  { border: 2px solid gold; box-shadow: 0 0 22px gold; color: gold; }
.mythical   { border: 2px solid violet; box-shadow: 0 0 24px violet; color: violet; }
.genuine    { border: 2px solid #4D7455; box-shadow: 0 0 16px #4D7455; color: #4D7455; }
.vintage    { border: 2px solid #476291; box-shadow: 0 0 16px #476291; color: #476291; }
.collector  { border: 2px solid #AA0000; box-shadow: 0 0 22px #AA0000; color: #AA0000; }
.haunted    { border: 2px solid #38F3AB; box-shadow: 0 0 18px #38F3AB; color: #38F3AB; }

/* ================= COINFLIP SECTION ================= */
#coinflip-section {
  background: rgba(25,25,30,0.85);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 20px;
  margin: 30px auto;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 0 25px rgba(0,0,0,0.6);
}
#coinflip-select {
  width: 90%;
  padding: 8px;
  font-size: 16px;
  border-radius: 10px;
  border: 2px solid #444;
  background: rgba(20,20,25,0.9);
  color: white;
  margin-bottom: 15px;
  cursor: pointer;
}

/* ================= POKER CHIP COIN ================= */
#coin-container {
  perspective: 1000px;
  width: 100px;
  height: 100px;
  margin: 15px auto;
}
#coin {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.2s ease;
  border: 4px solid white;
}
#coin.head, #coin.tail {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  backface-visibility: hidden;
}
#coin.head { background: red; transform: rotateY(0deg); box-shadow: 0 0 15px red, 0 0 25px #ff4d4d; }
#coin.tail { background: #00bfa5; transform: rotateY(180deg); box-shadow: 0 0 15px #00bfa5, 0 0 25px #1de9b6; }

#admin-give-panel {
  position: fixed;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  max-height: 600px;
  overflow-y: auto;
  background: rgba(20, 20, 20, 0.95);
  border: 2px solid #ff4d4d;
  border-radius: 12px;
  padding: 15px;
  z-index: 9999;
  box-shadow: 0 0 25px rgba(255, 77, 77, 0.5);
}

#admin-give-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-weight: bold;
  color: #fff;
  font-size: 18px;
}

#admin-give-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-give-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(50, 50, 50, 0.9);
  padding: 6px 10px;
  border-radius: 8px;
  transition: transform 0.2s, background 0.2s;
}

.admin-give-item:hover {
  transform: scale(1.02);
  background: rgba(70, 70, 70, 0.95);
}

.admin-give-item img {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  margin-right: 10px;
  object-fit: cover;
  border: 1px solid #ff4d4d;
}

.admin-give-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  color: #fff;
}

.admin-give-info .name {
  font-weight: bold;
}

.admin-give-info .price {
  color: #ffcc00;
  font-size: 13px;
}

.admin-give-item button {
  padding: 5px 10px;
  border: none;
  border-radius: 6px;
  background: #ff4d4d;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.admin-give-item button:hover {
  background: #ff1a1a;
}

/* ================= CONTRIBUTORS ================= */
#contributors{
  margin: 40px auto;
  max-width: 500px;
}

#contributors textarea{
  width: 100%;
  height: 120px;
  background: white;
  color: black;
  border-radius: 10px;
  border: none;
  padding: 10px;
  font-size: 14px;
  resize: none;
}

.spinner-item.inactive img {
  filter: grayscale(100%) brightness(60%);
  opacity: 0.5;
}
