/* ========================================
   JACKPOT TAMBOLA - BASE STYLES
   Modern, Clean, Cross-theme CSS
   ======================================== */

/* === ROOT CSS VARIABLES (Theme-Agnostic) === */
:root {
  /* Layout & Spacing */
  --ticket-min: clamp(110px, 16vw, 160px);
  --ticket-max: clamp(120px, 18vw, 200px);
  --ticket-h: clamp(66px, 10.5vw, 96px);
  --border-w: clamp(4px, 0.5vw, 6px);
  --gap: 12px;
  
  /* Shadows (Universal) */
  --shadow-light: rgba(0, 0, 0, 0.08);
  --shadow-medium: rgba(0, 0, 0, 0.14);
  --shadow-dark: rgba(0, 0, 0, 0.22);
  --shadow-extra-dark: rgba(0, 0, 0, 0.32);
  
  /* Overlays (Universal) */
  --overlay-light: rgba(0, 0, 0, 0.02);
  --overlay-medium: rgba(0, 0, 0, 0.06);
  --overlay-dark: rgba(0, 0, 0, 0.3);
  --overlay-deep: rgba(0, 0, 0, 0.5);
  
  /* Theme Colors (will be overridden by theme files) */
  --bg: #ffffff;
  --card: #f8f9fa;
  --text: #2c2c54;
  --text-light: #5a6c7d;
  --accent: #d84d7c;
  --accent-light: #e67fb0;
  --border: #f76c5e;
  --primary: #ff9d5c;
  --secondary: #f76c5e;
}

/* === RESET & BASE STYLES === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: "Comic Neue", "Comic Sans MS", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  position: relative;
  padding-bottom: 80px;
  font-size: 16px;
  line-height: 1.5;
}

body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* === PAGE BACKGROUND === */
.page-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: -1;
}

/* === HEADER / BANNER === */
.banner {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
  color: white;
  padding: clamp(12px, 3vw, 18px) clamp(10px, 2vw, 16px);
  box-shadow: 0 6px 18px var(--shadow-dark);
  position: relative;
  z-index: 2;
}

.banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: clamp(320px, 90vw, 480px);
  margin: 0 auto;
  padding: 0 clamp(8px, 2vw, 16px);
}

.banner .title {
  text-align: center;
}

.banner h1 {
  font-size: clamp(30px, 4vw, 28px);
  font-weight: 700;
  letter-spacing: 1px;
  color: white;
  margin-bottom: clamp(4px, 0.5vw, 8px);
}

.banner .subtitle {
  font-size: clamp(20px, 2.5vw, 16px);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.banner .trees {
  font-size: clamp(20px, 5vw, 28px);
}

/* Tree animation */
.trees{
  display: inline-block;
  font-size: 28px;
  animation: floatGlow 3s ease-in-out infinite;
}

@keyframes floatGlow {
  0% {
    transform: translateY(0) scale(1);
    text-shadow: 0 0 5px rgba(0,255,150,0.4);
  }
  50% {
    transform: translateY(-8px) scale(1.1);
    text-shadow: 0 0 15px rgba(0,255,150,0.8);
  }
  100% {
    transform: translateY(0) scale(1);
    text-shadow: 0 0 5px rgba(0,255,150,0.4);
  }
}

/* Banner snowfall container */
.banner{
  position: relative;
  overflow: hidden;
}

/* Snowflake */
.snowflake{
  position: absolute;
  top: -10px;
  color: white;
  font-size: 14px;
  opacity: 0.8;
  pointer-events: none;
  animation: snowFall linear forwards;
}

@keyframes snowFall {
  from {
    top: -20px;
    opacity: 0.8;
  }
  to {
    top: 100%;
    opacity: 0;
  }
}

/* === TOOLBAR === */
.toolbar {
  max-width: clamp(320px, 90vw, 480px);
  margin: clamp(10px, 2vw, 16px) auto;
  padding: clamp(10px, 2vw, 14px);
  z-index: 2;
  position: relative;
}

.toolbar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: clamp(8px, 1.5vw, 12px);
  color: var(--text);
  flex-wrap: wrap;
  gap: clamp(6px, 1vw, 12px);
}

.date, .time {
  background: var(--primary);
  padding: clamp(6px, 1.2vw, 10px) clamp(8px, 1.5vw, 14px);
  border-radius: clamp(6px, 1vw, 8px);
  color: white;
  font-weight: 700;
  font-size: clamp(13px, 2.5vw, 15px);
  box-shadow: 0 4px 10px var(--shadow-medium);
}

.time {
  margin-right: clamp(6px, 1vw, 10px);
}

.clock {
  font-size: clamp(12px, 2.2vw, 14px);
  color: white;
  opacity: 0.95;
}

/* === ICONS ROW === */
.icons-row {
  display: flex;
  gap: clamp(12px, 3vw, 24px);
  flex-wrap: wrap;
  margin-bottom: clamp(12px, 2vw, 16px);
  justify-content: center;
  align-items: flex-start;
}

.icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(6px, 1.5vw, 10px);
  flex: 0 1 auto;
}

.icon-btn {
  background: transparent;
  color: white;
  border: none;
  padding: 0;
  border-radius: clamp(8px, 1.5vw, 12px);
  font-weight: 700;
  font-size: clamp(12px, 2.5vw, 15px);
  box-shadow: none;
  text-align: center;
  cursor: pointer;
  font-family: "Comic Neue", "Comic Sans MS", system-ui, sans-serif;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  transform: translateY(-4px);
}

.icon-label {
  font-size: clamp(11px, 2vw, 13px);
  font-weight: 700;
  color: var(--text);
  text-align: center;
  letter-spacing: 0.5px;
}

.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 4px 10px var(--shadow-light);
}

.icon-circle.whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.icon-circle.call {
  background: linear-gradient(135deg, #ff7e47 0%, #ffae47 100%);
}

.icon-circle.agent {
  background: linear-gradient(135deg, #4d9dff 0%, #80c7ff 100%);
}

/* === CHECK BUTTON === */
.check-row {
  text-align: center;
  margin-top: clamp(6px, 1.5vw, 10px);
}

.check-btn {
  background: var(--primary);
  color: white;
  padding: clamp(10px, 2vw, 14px) clamp(16px, 3vw, 24px);
  border-radius: clamp(6px, 1vw, 10px);
  border: 2px solid var(--secondary);
  font-weight: 800;
  font-size: clamp(13px, 2.8vw, 17px);
  box-shadow: 0 6px 16px var(--shadow-dark);
  width: clamp(240px, 85%, 360px);
  margin: 0 auto;
  cursor: pointer;
  font-family: "Comic Neue", "Comic Sans MS", system-ui, sans-serif;
  transition: all 0.2s ease;
}

.check-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--shadow-dark);
}

/* === TICKET COUNTS === */
#ticketCounts {
  max-width: clamp(320px, 92%, 480px);
  margin: 12px auto 0;
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--primary) 0%, rgba(247, 108, 94, 0.1) 100%);
  border: 2px solid var(--secondary);
  border-radius: 12px;
  box-shadow: 0 6px 16px var(--shadow-medium);
}

#ticketCounts .count-box {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 8px 10px;
}

#ticketCounts .count-box.center {
  align-items: center;
}

#ticketCounts .count-box.right {
  align-items: flex-end;
}

#ticketCounts .count-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
}

#ticketCounts .count-value {
  font-weight: 800;
  font-size: clamp(18px, 4vw, 24px);
  font-family: "Comic Neue", "Comic Sans MS", system-ui, sans-serif;
  text-align: center;
}

#ticketCounts.low-stock {
  border-color: var(--accent);
}

/* === NUMBER BOARD === */
.toolbar .small-number-board {
  display: grid !important;
  grid-template-columns: repeat(10, minmax(clamp(20px, 6vw, 32px), 1fr)) !important;
  gap: clamp(4px, 0.8vw, 8px) !important;
  margin: clamp(12px, 2vw, 20px) auto !important;
  padding: clamp(8px, 1.5vw, 12px) !important;
  width: clamp(280px, calc(100% - 20px), 420px) !important;
  max-width: 420px !important;
  box-sizing: border-box;
  background: transparent !important;
  border-radius: 10px !important;
  position: relative !important;
  justify-content: center !important;
  align-items: center !important;
  justify-self: center !important;
}

#userNumberBoard, .called-numbers {
  display: none !important;
}

.user-show-boards #userNumberBoard {
  display: grid !important;
}

.user-show-boards .called-numbers {
  display: flex !important;
}

.user-hide-tickets #ticketsWrap, .user-hide-tickets #checkAvailable {
  display: none !important;
}

#userSearchArea {
  max-width: 420px;
  margin: 10px auto;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

#userSearchArea input {
  padding: 10px 12px;
  border-radius: 8px;
  border: 2px solid var(--secondary);
  width: 60%;
  font-weight: 700;
  background: var(--card);
  color: var(--text);
}

#userSearchArea button {
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  background: var(--primary);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.toolbar .small-number-board .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: clamp(12px, 2.8vw, 17px);
  padding: clamp(6px, 1vw, 10px);
  border-radius: clamp(6px, 1vw, 8px);
  aspect-ratio: 1;
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--secondary);
  transition: all 0.2s ease;
  user-select: none;
  min-width: clamp(26px, 7vw, 38px);
  min-height: clamp(26px, 7vw, 38px);
  cursor: pointer;
}

.toolbar .small-number-board .num.drawn {
  background: var(--primary) !important;
  color: white !important;
  box-shadow: 0 4px 10px var(--shadow-light);
}

.toolbar .small-number-board .num.current {
  background: var(--accent) !important;
  color: white !important;
  transform: scale(1.15);
  box-shadow: 0 6px 14px var(--shadow-dark);
}

.toolbar .small-number-board .num:hover, .toolbar .small-number-board .num:focus {
  outline: none;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 14px var(--shadow-light);
}

@media (min-width: 480px) {
  .toolbar .small-number-board {
    grid-template-columns: repeat(10, 1fr) !important;
  }
}

/* === CALLED NUMBERS === */
.called-numbers {
  max-width: 420px;
  margin: 14px auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  box-sizing: border-box;
  background: none;
  border-radius: none;
  position: relative;
  z-index: 9999 !important;
}

.number-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 32px;
  flex-wrap: nowrap;
}

.called-ball {
  flex: 0 0 auto;
  width: clamp(32px, 8vw, 42px);
  height: clamp(32px, 8vw, 42px);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: white;
  font-size: clamp(14px, 3vw, 18px);
  box-shadow: 0 6px 14px var(--shadow-dark);
  transform: translateY(100px) scale(0.8);
  opacity: 0;
  will-change: transform, opacity;
  position: relative;
  background: var(--primary);
}

.called-ball.animate-rise {
  animation: riseToPosition 2s cubic-bezier(0.2, 0.85, 0.25, 1.2) forwards;
  filter: drop-shadow(0 8px 14px var(--overlay-deep));
}

.called-ball.landed {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* === ORIGINAL TAMBOLA BALL COLORS (FIXED - NOT THEMED) === */
/* These colors remain consistent across all themes */

/* 1-10: Orange/Red */
.called-ball[data-number="1"],
.called-ball[data-number="2"],
.called-ball[data-number="3"],
.called-ball[data-number="4"],
.called-ball[data-number="5"],
.called-ball[data-number="6"],
.called-ball[data-number="7"],
.called-ball[data-number="8"],
.called-ball[data-number="9"],
.called-ball[data-number="10"] {
  background: #FF6B35 !important;
  box-shadow: 0 6px 14px rgba(255, 107, 53, 0.5) !important;
}

/* 11-20: Blue */
.called-ball[data-number="11"],
.called-ball[data-number="12"],
.called-ball[data-number="13"],
.called-ball[data-number="14"],
.called-ball[data-number="15"],
.called-ball[data-number="16"],
.called-ball[data-number="17"],
.called-ball[data-number="18"],
.called-ball[data-number="19"],
.called-ball[data-number="20"] {
  background: #004E89 !important;
  box-shadow: 0 6px 14px rgba(0, 78, 137, 0.5) !important;
}

/* 21-30: Yellow */
.called-ball[data-number="21"],
.called-ball[data-number="22"],
.called-ball[data-number="23"],
.called-ball[data-number="24"],
.called-ball[data-number="25"],
.called-ball[data-number="26"],
.called-ball[data-number="27"],
.called-ball[data-number="28"],
.called-ball[data-number="29"],
.called-ball[data-number="30"] {
  background: #FFB703 !important;
  box-shadow: 0 6px 14px rgba(255, 183, 3, 0.5) !important;
  color: #000 !important;
}

/* 31-40: Purple */
.called-ball[data-number="31"],
.called-ball[data-number="32"],
.called-ball[data-number="33"],
.called-ball[data-number="34"],
.called-ball[data-number="35"],
.called-ball[data-number="36"],
.called-ball[data-number="37"],
.called-ball[data-number="38"],
.called-ball[data-number="39"],
.called-ball[data-number="40"] {
  background: #6D3B8E !important;
  box-shadow: 0 6px 14px rgba(109, 59, 142, 0.5) !important;
}

/* 41-50: Green */
.called-ball[data-number="41"],
.called-ball[data-number="42"],
.called-ball[data-number="43"],
.called-ball[data-number="44"],
.called-ball[data-number="45"],
.called-ball[data-number="46"],
.called-ball[data-number="47"],
.called-ball[data-number="48"],
.called-ball[data-number="49"],
.called-ball[data-number="50"] {
  background: #2A9D8F !important;
  box-shadow: 0 6px 14px rgba(42, 157, 143, 0.5) !important;
}

/* 51-60: Pink/Magenta */
.called-ball[data-number="51"],
.called-ball[data-number="52"],
.called-ball[data-number="53"],
.called-ball[data-number="54"],
.called-ball[data-number="55"],
.called-ball[data-number="56"],
.called-ball[data-number="57"],
.called-ball[data-number="58"],
.called-ball[data-number="59"],
.called-ball[data-number="60"] {
  background: #E91E63 !important;
  box-shadow: 0 6px 14px rgba(233, 30, 99, 0.5) !important;
}

/* 61-70: Orange */
.called-ball[data-number="61"],
.called-ball[data-number="62"],
.called-ball[data-number="63"],
.called-ball[data-number="64"],
.called-ball[data-number="65"],
.called-ball[data-number="66"],
.called-ball[data-number="67"],
.called-ball[data-number="68"],
.called-ball[data-number="69"],
.called-ball[data-number="70"] {
  background: #FF9800 !important;
  box-shadow: 0 6px 14px rgba(255, 152, 0, 0.5) !important;
}

/* 71-80: Teal/Cyan */
.called-ball[data-number="71"],
.called-ball[data-number="72"],
.called-ball[data-number="73"],
.called-ball[data-number="74"],
.called-ball[data-number="75"],
.called-ball[data-number="76"],
.called-ball[data-number="77"],
.called-ball[data-number="78"],
.called-ball[data-number="79"],
.called-ball[data-number="80"] {
  background: #00BCD4 !important;
  box-shadow: 0 6px 14px rgba(0, 188, 212, 0.5) !important;
  color: #000 !important;
}

/* 81-90: Red */
.called-ball[data-number="81"],
.called-ball[data-number="82"],
.called-ball[data-number="83"],
.called-ball[data-number="84"],
.called-ball[data-number="85"],
.called-ball[data-number="86"],
.called-ball[data-number="87"],
.called-ball[data-number="88"],
.called-ball[data-number="89"],
.called-ball[data-number="90"] {
  background: #D32F2F !important;
  box-shadow: 0 6px 14px rgba(211, 47, 47, 0.5) !important;
}

/* 91-99: Brown */
.called-ball[data-number="91"],
.called-ball[data-number="92"],
.called-ball[data-number="93"],
.called-ball[data-number="94"],
.called-ball[data-number="95"],
.called-ball[data-number="96"],
.called-ball[data-number="97"],
.called-ball[data-number="98"],
.called-ball[data-number="99"] {
  background: #795548 !important;
  box-shadow: 0 6px 14px rgba(121, 85, 72, 0.5) !important;
}

@keyframes riseToPosition {
  0% {
    transform: translateY(100vh) scale(1);
    opacity: 1;
  }
  60% {
    transform: translateY(-10px) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@media (max-width: 420px) {
  .called-numbers {
    max-width: 96%;
    padding: clamp(8px, 2vw, 12px);
    min-height: clamp(72px, 15vw, 84px);
  }
  .number-row {
    gap: clamp(6px, 1.5vw, 10px);
  }
  .called-ball {
    width: clamp(26px, 5.5vw, 32px);
    height: clamp(26px, 5.5vw, 32px);
    font-size: clamp(12px, 2.5vw, 16px);
  }
}

/* === TICKETS WRAP === */
.tickets-wrap {
  max-width: clamp(320px, 92vw, 480px);
  margin: clamp(12px, 3vw, 18px) auto clamp(100px, 20vh, 140px);
  position: relative;
  z-index: 2;
  padding: clamp(6px, 1vw, 10px);
}

.ticket-card {
  border: 3px solid var(--secondary);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, rgba(255, 157, 92, 0.3) 100%);
  margin-bottom: clamp(14px, 3vw, 24px);
  padding: clamp(10px, 2vw, 14px);
  position: relative;
  transition: all 0.22s cubic-bezier(0.2, 0.9, 0.2, 1);
  will-change: transform, box-shadow;
  box-shadow: 0 8px 20px var(--shadow-dark), 0 2px 8px var(--overlay-medium);
}

.ticket-card:hover, .ticket-card:focus-within {
  transform: translateY(-8px) rotateX(0.4deg);
  box-shadow: 0 14px 32px var(--shadow-dark), 0 4px 12px var(--shadow-light);
  border-color: var(--accent);
}

.ticket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(12px, 2vw, 16px);
  position: relative;
  gap: clamp(12px, 2vw, 16px);
}

.ticket-index {
  background: linear-gradient(135deg, var(--accent) 0%, var(--secondary) 100%);
  color: white;
  width: clamp(48px, 10vw, 60px);
  height: clamp(48px, 10vw, 60px);
  border-radius: 50%;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(16px, 3vw, 22px);
  box-shadow: 0 8px 16px var(--shadow-dark);
  flex-shrink: 0;
}

.ticket-number,
.search-card .ticket-number,
.dw-ticket {
  background: linear-gradient(135deg, var(--accent) 0%, var(--secondary) 100%);
  color: white;
  width: clamp(48px, 10vw, 60px);
  height: clamp(48px, 10vw, 60px);
  border-radius: 50%;
  margin-bottom: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: clamp(16px, 3vw, 22px);
  box-shadow: 0 8px 16px var(--shadow-dark);
  flex-shrink: 0;
  line-height: 1;
}

.search-card .ticket-number {
  margin-right: 12px;
}

.modal-winner-card .ticket-number {
  width: clamp(56px, 12vw, 60px);
  height: clamp(56px, 12vw, 60px);
  font-size: clamp(18px, 3.6vw, 28px);
}

.ticket-actions {
  position: relative;
  z-index: 5;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  width: auto;
  flex-shrink: 0;
}

.ticket-actions button {
  border: none;
  border-radius: 8px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ticket-actions .book-btn {
  min-width: 56px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  background: var(--accent);
  color: white;
  box-shadow: 0 6px 14px var(--shadow-medium);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ticket-actions .book-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px var(--shadow-medium);
}

.ticket-actions .sold-btn {
  min-width: 56px;
  padding: 8px 12px;
  margin-top: -9px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  background: #666666;
  color: white;
  box-shadow: 0 4px 10px var(--shadow-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(4px);
}

@media (max-width: 720px) {
  .ticket-actions .book-btn {
    font-size: 12px;
    min-width: auto;
    padding: 6px 10px;
  }
}

@media (max-width: 520px) {
  .ticket-actions .book-btn {
    min-width: auto;
    padding: 5px 8px;
    font-size: 11px;
  }
  .ticket-actions .sold-btn {
    min-width: auto;
    padding: 5px 8px;
  }
}

.ticket-grid {
  border: 3px solid var(--secondary);
  padding: 8px;
  border-radius: 8px;
  background: var(--card);
}

.ticket-table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
}

.ticket-table td {
  width: 11.11%;
  height: clamp(36px, 8vw, 48px);
  border: 2px solid var(--secondary);
  text-align: center;
  vertical-align: middle;
  font-weight: 700;
  color: var(--text);
  font-size: clamp(13px, 3vw, 17px);
  padding: clamp(4px, 0.5vw, 6px);
  background: var(--bg);
}

.ticket-table td.blank {
  background: transparent;
  color: transparent;
  border: none;
  opacity: 0.2;
  border: 2px solid var(--secondary);
}

.booked {
  opacity: 0.8;
}

.booked .ticket-actions button {
  background: #666666;
  color: white;
}

.ticket-left {
  display: flex;
  flex-direction: row;
  gap: clamp(8px, 2vw, 12px);
  align-items: center;
  justify-content: flex-start;
  flex: 1;
  min-width: 0;
}

.ticket-number-text {
  font-size: clamp(14px, 3vw, 18px);
  font-weight: 800;
  color: white;
}

.ticket-status {
  font-size: clamp(12px, 2.5vw, 15px);
  font-weight: 900;
  color: white;
  padding: clamp(4px, 1vw, 8px) clamp(8px, 1.5vw, 12px);
  border-radius: 6px;
  background: rgba(216, 77, 123, 0);
  display: inline-block;
  width: fit-content;
  white-space: nowrap;
}

.ticket-status.status-unsold {
  color: rgba(255, 255, 255, 0.9);
  background: var(--accent);
  padding: 5px;
  padding-top: 2px !important;
  padding-bottom: 4px !important;
}

.ticket-status.status-sold {
  color: white;
  background: var(--accent);
  padding: 5px;
  padding-top: 2px !important;
  padding-bottom: 4px !important;

}

.player-name {
  margin-top: 6px;
  font-size: 14px;
  color: white;
  font-weight: 700;
  background: var(--accent);
  padding: 8px 12px;
  border-radius: 8px;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.18s ease;
}

.ticket-table td.num.drawn {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 10px var(--shadow-light);
  border-radius: 4px;
}

.ticket-table td.num.current {
  background: var(--accent);
  color: white;
  transform: scale(1.08);
  box-shadow: 0 8px 16px var(--shadow-medium);
}

#genControls {
  max-width: 420px;
  margin: 12px auto 0;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 8px;
}

/* === THEME MENU & SWITCHER === */
.theme-menu {
  position: fixed;
  right: 14px;
  top: 14px;
  z-index: 999999;
}

.dots-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 16px var(--shadow-dark);
  z-index: 1000000;
  transition: all 0.2s ease;
}

.dots-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px var(--shadow-dark);
}

.theme-panel {
  position: fixed;
  right: 14px;
  top: 66px;
  z-index: 1000001;
  background: var(--bg);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 12px 32px var(--shadow-dark);
  min-width: 200px;
  display: flex;
  justify-content: center;
  border: 3px solid var(--secondary);
}

.theme-panel[hidden] {
  display: none !important;
}

.theme-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.theme-swatch {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 3px solid transparent;
  cursor: pointer;
  box-shadow: 0 2px 6px var(--shadow-light);
  transition: all 0.2s ease;
}

.theme-swatch:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 10px var(--shadow-medium);
}

.theme-swatch.active {
  border-color: var(--text);
  box-shadow: 0 4px 14px var(--shadow-dark);
}

.theme-swatch[data-theme="default"] {
  background: linear-gradient(135deg, #00468d 0%, #00468d 100%);
}

.theme-swatch[data-theme="glassmorph"] {
  background: linear-gradient(135deg, #a8d8f0 0%, #7ec8e3 100%);
}

.theme-swatch[data-theme="neon"] {
  background: linear-gradient(135deg, #00ff00 0%, #ff00ff 100%);
}

.theme-swatch[data-theme="darkpremium"] {
  background: linear-gradient(135deg, #2c2c54 0%, #1a1a3e 100%);
}

.theme-swatch[data-theme="pastel"] {
  background: linear-gradient(135deg, #ffb3d9 0%, #ffcceb 100%);
}

@media (max-width: 420px) {
  .theme-menu {
    right: 10px;
    top: 10px;
  }
  .dots-btn {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  .theme-panel {
    right: 10px;
    top: 58px;
    min-width: 180px;
    padding: 8px;
  }
}

/* === AVAILABLE MODAL === */
.avail-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
}

.avail-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1e3c72, #2a5298);
}

.avail-panel {
  position: relative;
  width: 92%;
  height: 90%;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding: 18px 28px;
  padding-top: calc(68px + 8px);
  min-height: 0;
  padding-bottom: 120px;
  box-shadow: 0 20px 40px rgba(0,0,0,.25);
}

.avail-header {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #ffffff;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 80;
  min-height: 64px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.avail-count {
  background: rgba(255, 255, 255, 0.3);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  font-weight: 700;
}

.avail-header .small-number-board {
  display: flex !important;
  gap: 10px !important;
  overflow-x: auto !important;
  padding: 10px 6px !important;
  width: 100%;
}

.avail-header .small-number-board .num {
  flex: 0 0 auto;
  min-width: 40px;
  text-align: center;
}

.avail-header h1 {
  margin: 0;
  font-size: 32px;
  letter-spacing: 1px;
  font-weight: 700;
}

.avail-close {
  position: absolute;
  right: 18px;
  top: 10px;
  background: transparent;
  border: none;
  color: white;
  font-size: 36px;
  cursor: pointer;
  padding: 6px;
  font-weight: bold;
  transition: all 0.2s ease;
}

.avail-header.avail-header-end {
  justify-content: space-between;
}

.selection-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  flex: 1;
  margin: 0 12px;
  padding: 4px 0;
}

.chip {
  background: rgba(255, 255, 255, 0.3);
  color: white;
  padding: 6px 10px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.5);
}

.chip .remove {
  color: #ff6b6b;
  font-weight: bold;
  cursor: pointer;
  padding: 0 4px;
}

.chip .remove:hover {
  color: #ff5252;
}

.avail-frame {
  padding: 12px;
  background: var(--card) !important;
  border-radius: 6px;
  flex: 1 1 auto;
  min-height: 0;
  display: block;
  overflow: visible;
  max-height: 60vh;
  overflow-y: auto;
}

.avail-grid {
  width: 100%;
  max-width: 1100px;
  background: linear-gradient(135deg, var(--primary) 0%, rgba(247, 108, 94, 0.1) 100%);
  padding: calc(var(--gap) * 0.75);
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--ticket-min), 1fr));
  gap: var(--gap);
  justify-content: center;
}

.ticket-btn {
  background: var(--bg);
  border-radius: 10px;
  width: 100%;
  max-width: var(--ticket-max);
  height: var(--ticket-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  text-align: center;
  font-weight: 800;
  font-size: clamp(15px, 2.2vw, 20px);
  color: var(--text);
  border-width: var(--border-w);
  border-style: solid;
  border-color: var(--secondary);
  cursor: pointer;
  box-shadow: 0 6px 14px var(--shadow-medium);
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: all 0.26s ease;
  opacity: 0;
  transform: translateY(10px);
}

.ticket-btn.revealed {
  opacity: 1;
  transform: none;
}

.ticket-btn.selected {
  background: linear-gradient(135deg, var(--accent) 0%, rgba(216, 77, 124, 0.8) 100%);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 12px 30px var(--shadow-dark);
  transform: translateY(-4px);
}

.ticket-btn:focus {
  outline: none;
  box-shadow: 0 0 0 4px var(--overlay-medium), 0 6px 18px var(--shadow-medium);
  transform: translateY(-2px);
}

.ticket-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px var(--overlay-medium) inset;
}

.ticket-btn.sold {
  background: #dc5579;
  color: white;
}

.ticket-btn.sold.selected {
  background: linear-gradient(135deg, #666666 0%, #d9d9d9 100%);
  color: var(--text);
  border-color: var(--overlay-medium);
  transform: none;
}

.ticket-btn.sold::before {
  content: "SOLD";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  font-weight: 900;
  font-size: calc(var(--ticket-h, 72px) * 0.36 - 4px);
  color: rgb(149 23 23);
  opacity: 0.9;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  z-index: -1;
}

@media (max-width: 900px) {
  .avail-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 520px) {
  :root {
    --border-w: 3px;
  }
  .avail-grid {
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    gap: 10px;
  }
  .avail-panel {
    height: 80%;
    width: 98%;
    padding: 10px;
  }
  .ticket-btn {
    height: clamp(60px, 12vw, 84px);
  }
}

@media (max-width: 420px) {
  .avail-panel {
    max-width: 360px;
    padding: 12px;
  }
  .avail-grid {
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  }
}

.avail-modal[hidden] {
  display: none !important;
}

.avail-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 12px 12px 12px;
  flex: 0 0 auto;
}

.book-btn {
  display: inline-block;
  position: relative;
  width: auto;
  min-width: 150px;
  height: 35px;
  border-radius: 28px;
  border: none;
  padding: 12px 22px;
  font-size: 16px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px var(--shadow-dark);
  text-align: center;
  z-index: 60;
  transition: all 0.15s ease;
}

.book-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px var(--shadow-dark);
}

@media (max-width: 420px) {
  .book-btn {
    min-width: 110px;
    height: 34px;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 24px;
  }
}

/* === DASHBOARD === */
.dash-panel {
  position: fixed;
  right: 14px;
  bottom: 14px;
  width: 340px;
  max-width: calc(100% - 32px);
  max-height: 60vh;
  background: var(--bg);
  border-radius: 12px;
  box-shadow: 0 12px 32px var(--shadow-dark);
  overflow: hidden;
  z-index: 400000;
  display: flex;
  flex-direction: column;
  border: 2px solid var(--secondary);
}

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
  color: white;
}

.dash-title {
  font-weight: 800;
  font-size: 16px;
}

.dash-close {
  background: transparent;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  font-weight: bold;
  transition: all 0.2s ease;
}

.dash-close:hover {
  transform: scale(1.15);
}

.dash-grid {
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  overflow: auto;
  align-content: flex-start;
}

.dash-item {
  min-width: 52px;
  padding: 10px 12px;
  background: var(--card);
  border-radius: 8px;
  text-align: center;
  font-weight: 800;
  color: var(--text);
  border: 2px solid var(--secondary);
  cursor: default;
}

.dash-item.sold {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
  color: white;
  border-color: var(--accent);
}

/* === SEARCH RESULTS === */
#userTicketSearchResults {
  max-width: clamp(320px, 92vw, 480px);
  margin: 10px auto 20px;
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 3vw, 22px);
}

#userTicketSearchResults .search-card {
  border: 3px solid var(--secondary);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, #ffc999 100%);
  padding: clamp(10px, 1.5vw, 14px);
  position: relative;
  transition: all 0.22s cubic-bezier(0.2, 0.9, 0.2, 1);
  box-shadow: 0 6px 16px var(--shadow-medium);
}

.search-card-close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 28px;
  height: 28px;
  background: rgba(0, 0, 0, 0.1);
  border: none;
  border-radius: 50%;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 5;
  font-weight: bold;
}

.search-card-close:hover {
  background: rgba(0, 0, 0, 0.2);
  transform: scale(1.12);
}

/* === DIVISIONS === */
.divisions-wrap {
  max-width: 420px;
  margin: 10px auto 140px;
  display: none !important;
}

.user-show-boards .divisions-wrap {
  display: grid !important;
}

.division-card {
  background: linear-gradient(135deg, var(--bg) 0%, var(--card) 100%);
  border: 2px solid var(--secondary);
  padding: 12px 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.division-view-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 14px var(--shadow-medium);
  transition: all 0.2s ease;
}

.division-view-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--shadow-medium);
}

.division-winners-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.division-winner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.division-winner-center {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  color: var(--text) !important;
  font-weight: 800 !important;
}

.division-winner-center .dw-name {
  color: var(--text);
  font-weight: 800;
  font-size: clamp(14px, 2.6vw, 16px);
  margin-left: -120px;
}

.division-winner-center .dw-ticket {
  background: transparent !important;
  color: var(--text) !important;
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
  margin-top: 6px !important;
  box-shadow: none !important;
  padding: 0 6px !important;
  font-size: clamp(13px, 2.4vw, 15px) !important;
}

.division-view-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.division-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1300;
  padding: clamp(10px, 2vw, 20px);
  overflow-y: auto;
  background: var(--overlay-dark);
}

.division-modal[open] {
  display: flex;
}

.division-modal-backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
}

.division-modal-content {
  position: relative;
  width: 90%;
  max-width: 520px;
  max-height: 80vh;
  background: var(--bg);
  border: 4px solid var(--secondary);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px var(--shadow-extra-dark);
  margin: auto;
  z-index: 1301;
}

.division-modal-header {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
  color: white;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
  font-size: clamp(16px, 3vw, 20px);
  flex-shrink: 0;
  border-radius: 12px 12px 0 0;
}

.division-modal-close {
  background: transparent;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  padding: 4px 8px;
  font-weight: bold;
  transition: all 0.2s ease;
}

.division-modal-close:hover {
  transform: scale(1.15);
}

.division-tickets-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--ticket-min), 1fr));
  gap: var(--gap);
  padding: clamp(14px, 3vw, 20px);
  background: var(--card);
  border-radius: 10px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.division-ticket-item {
  border: 3px solid var(--secondary);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, rgba(255, 157, 92, 0.3) 100%);
  padding: clamp(10px, 2vw, 14px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 120px;
  box-shadow: 0 8px 18px var(--shadow-dark);
  transition: all 0.2s ease;
}

.division-ticket-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px var(--shadow-medium);
}

.division-ticket-item .ticket-index {
  margin: 0;
}

.division-ticket-item .player-name {
  margin: 0;
  font-size: clamp(12px, 2.5vw, 14px);
}

@media (max-width: 520px) {
  .division-modal-content {
    max-height: 85vh;
    width: 95%;
  }
  .division-tickets-wrap {
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 12px;
    padding: 12px;
  }
  .division-modal {
    padding: 8px;
  }
}

@media (max-width: 420px) {
  .division-modal-content {
    max-height: 90vh;
    max-width: 100%;
    width: 98%;
    border-radius: 12px;
  }
  .division-tickets-wrap {
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
    padding: 10px;
  }
  .division-modal-header {
    padding: 12px 16px;
    font-size: 18px;
  }
  .divisions-wrap {
    max-width: 96%;
    margin: 8px auto 120px;
  }
  .division-card {
    padding: 10px 12px;
    gap: 10px;
  }
  .division-winner-center .dw-name {
    margin-left: 0 !important;
    font-size: 12px;
  }
  .division-winner-center .dw-ticket {
    font-size: 11px;
  }
  .division-view-btn {
    padding: 8px 10px;
    font-size: 12px;
  }
}

/* === WINNER TICKET MODAL === */
.winner-ticket-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1500;
  background: var(--overlay-dark);
  padding: clamp(10px, 2vw, 20px);
  overflow-y: auto;
}

.winner-ticket-panel {
  position: relative;
  width: 90%;
  max-width: 520px;
  max-height: 85vh;
  background: var(--bg);
  border-radius: 16px;
  box-shadow: 0 20px 60px var(--shadow-extra-dark);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: auto;
}

.winner-ticket-close {
  position: absolute;
  top: 21px;
  right: 21px;
  width: 36px;
  height: 36px;
  border: none;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
  color: white;
  font-size: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s ease;
  font-weight: bold;
}

.winner-ticket-close:hover {
  transform: scale(1.1);
}

.winner-ticket-body {
  flex: 1;
  overflow-y: auto;
  padding: clamp(14px, 3vw, 20px);
}

.winner-crest {
  text-align: center;
  padding: clamp(14px, 2vw, 20px);
  background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
  color: white;
  border-radius: 12px;
  margin-bottom: clamp(14px, 2vw, 20px);
}

.winner-crest-emojis {
  font-size: clamp(32px, 6vw, 48px);
  margin-bottom: 10px;
  animation: pulse 1s ease-in-out infinite;
}

.winner-crest-text {
  font-size: clamp(14px, 2.5vw, 18px);
  font-weight: 800;
}

.winner-crest-division {
  font-size: clamp(12px, 2vw, 14px);
  opacity: 0.95;
  margin-bottom: 6px;
}

.winner-crest-name {
  font-size: clamp(16px, 3vw, 20px);
  font-weight: 900;
  margin-top: 4px;
}

.modal-winner-card {
  border: 3px solid var(--secondary);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, rgba(255, 157, 92, 0.3) 100%);
  box-shadow: 0 10px 24px var(--shadow-dark);
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@media (max-width: 520px) {
  .winner-ticket-panel {
    max-height: 85vh;
    width: 95%;
  }
  .winner-ticket-close {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    font-size: 20px;
  }
}

@media (max-width: 420px) {
  .winner-ticket-modal {
    padding: 8px;
  }
  .winner-ticket-panel {
    max-height: 90vh;
    width: 98%;
  }
  .winner-ticket-body {
    padding: 12px;
  }
}

/* === AGENT MODAL === */
#agentModalBackdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 520000;
  background: var(--overlay-dark);
  padding: clamp(10px, 2vw, 20px);
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.2s ease;
}

#agentModalBackdrop[style*="display: flex"], #agentModalBackdrop.show {
  display: flex !important;
  opacity: 1 !important;
}

#agentModal {
  background: var(--bg);
  padding: 0;
  border-radius: 16px;
  max-width: 520px;
  width: 90%;
  box-shadow: 0 20px 60px var(--shadow-extra-dark);
  border: 4px solid var(--secondary);
  display: flex;
  flex-direction: column;
  max-height: 80vh;
  overflow: hidden;
  margin: auto;
  z-index: 520001;
}

.agent-modal-header {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
  color: white;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
  font-size: clamp(16px, 3vw, 20px);
  flex-shrink: 0;
  border-radius: 12px 12px 0 0;
}

.agent-modal-close {
  border: none;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
  color: white;
  font-weight: bold;
  padding: 4px 8px;
  transition: all 0.2s ease;
}

.agent-modal-close:hover {
  transform: scale(1.15);
}

#agentList {
  flex: 1;
  overflow-y: auto;
  padding: clamp(14px, 2vw, 20px);
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 2vw, 14px);
}

.agent-list-body {
  flex: 1;
  overflow-y: auto;
}

.agent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(10px, 1.5vw, 14px);
  background: var(--card);
  border-radius: 10px;
  border: 2px solid var(--secondary);
  transition: all 0.2s ease;
  gap: 10px;
}

.agent-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--shadow-medium);
  background: rgba(255, 157, 92, 0.05);
}

.agent-item-info {
  flex: 1;
}

.agent-item-name {
  font-weight: 800;
  font-size: clamp(13px, 2.5vw, 15px);
  color: var(--text);
}

.agent-item-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: clamp(8px, 1.5vw, 10px) clamp(12px, 2vw, 16px);
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: clamp(12px, 2vw, 14px);
  transition: all 0.2s ease;
}

.agent-item-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px var(--shadow-medium);
}

@media (max-width: 520px) {
  #agentModal {
    max-height: 85vh;
    width: 95%;
  }
  #agentList {
    padding: 12px;
  }
}

@media (max-width: 420px) {
  #agentModalBackdrop {
    padding: 8px;
  }
  #agentModal {
    max-height: 90vh;
    width: 98%;
  }
  .agent-modal-header {
    padding: 12px 16px;
    font-size: 18px;
  }
  #agentList {
    padding: 10px;
  }
}

/* Floating crown overlay – does NOT affect title */
.floating-crown{
  position: absolute;
  font-size: 22px;
  pointer-events: none;
  transform-origin: center;
  z-index: 9999;

  /* Glow effect */
  text-shadow:
    0 0 6px rgba(255, 215, 0, 0.8),
    0 0 12px rgba(255, 215, 0, 0.6),
    0 0 20px rgba(255, 165, 0, 0.5);
}
/* === COUNTDOWN TIMER STYLING === */
#userCountdown {
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 800;
  text-align: center;
  margin: 8px 75px;
  color: rgb(223, 52, 52);
  background: rgba(52, 223, 172, 0.1);
  border: 2px solid rgb(223, 52, 52);
  animation: countdownGlow 1.5s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(223, 52, 52, 0.3);
}

/* Glowing border animation */
@keyframes countdownGlow {
  0% {
    border-color: rgb(223, 52, 52);
    box-shadow: 0 0 10px rgba(223, 52, 52, 0.3), inset 0 0 10px rgba(223, 52, 52, 0.1);
    background: rgba(223, 52, 52, 0.1);
  }
  50% {
    border-color: rgb(80, 115, 255);
    box-shadow: 0 0 20px rgba(223, 52, 52, 0.6), inset 0 0 15px rgba(223, 52, 52, 0.15);
    background: rgba(223, 52, 52, 0.15);
  }
  100% {
    border-color: rgb(52, 223, 58);
    box-shadow: 0 0 10px rgba(223, 52, 52, 0.3), inset 0 0 10px rgba(223, 52, 52, 0.1);
    background: rgba(223, 52, 52, 0.1);
  }
}

/* Hide visual border/glow when countdown element is empty (no time set) */
#userCountdown:empty {
  border-color: transparent !important;
  box-shadow: none !important;
  animation: none !important;
  background: transparent !important;
}