/* ==========================================================================
   CardCoach TCG · Módulo de Ruleta y Sorteos Oficiales
   Estilos Corporativos 3D Glassmorphism (EMT COMERCIAL S.R.L.)
   Tipografía: Outfit & Orbitron
   ========================================================================== */

:root {
  --bg-main: #06080e;
  --surface-glass: rgba(18, 24, 40, 0.75);
  --surface-glass-heavy: rgba(13, 18, 30, 0.88);
  --surface-card: rgba(22, 30, 50, 0.65);
  --border-glass: rgba(255, 255, 255, 0.09);
  --border-glass-hover: rgba(99, 102, 241, 0.45);
  --primary-indigo: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.35);
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.35);
  --accent-gold: #f59e0b;
  --accent-gold-glow: rgba(245, 158, 11, 0.4);
  --accent-rose: #f43f5e;
  --accent-emerald: #10b981;
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
  --text-sub: #cbd5e1;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 10% 15%, rgba(99, 102, 241, 0.14) 0%, transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(6, 182, 212, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(139, 92, 246, 0.1) 0%, transparent 55%),
    linear-gradient(180deg, #070914 0%, #05060b 100%);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ==========================================================================
   TOP CO-BRANDING NAV BAR
   ========================================================================== */
.top-nav {
  background: var(--surface-glass-heavy);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-glass);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.brand-combo {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 8px 18px;
  transition: all 0.3s ease;
}

.brand-combo:hover {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.brand-cardcoach {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.5), 0 0 20px rgba(6, 182, 212, 0.35);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.brand-real-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-text-col, .sponsor-text-col {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
  line-height: 1.2;
}

.brand-title .accent-text {
  color: var(--accent-cyan);
}

.brand-sub {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.brand-separator {
  color: var(--accent-gold);
  font-size: 1.3rem;
  font-weight: 800;
  opacity: 0.85;
  user-select: none;
  padding: 0 4px;
}

.brand-sponsor {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 6px 14px;
  transition: all 0.3s ease;
}

.brand-sponsor:hover {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}

/* ÁREA DE LOGO DE EMPRESA AMPLIADA */
.sponsor-logo-box {
  min-width: 68px;
  height: 60px;
  max-width: 160px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(245, 158, 11, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  padding: 6px 10px;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.25), inset 0 0 10px rgba(245, 158, 11, 0.1);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.sponsor-logo-box:hover {
  border-color: #fbbf24;
  transform: scale(1.06);
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.45);
}

.sponsor-placeholder-icon {
  font-size: 1.9rem;
}

.sponsor-logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.sponsor-badge-tag {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 2px;
  width: fit-content;
}

.sponsor-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fbbf24;
  line-height: 1.2;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0 14px rgba(245, 158, 11, 0.35);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-nav {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-sub);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  min-height: 44px; /* Apple HIG standard */
}

.btn-nav:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.5);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-fullscreen {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.35);
  color: #67e8f9;
}

.btn-fullscreen:hover {
  background: rgba(6, 182, 212, 0.3);
  border-color: rgba(6, 182, 212, 0.6);
  color: #ffffff;
}

/* ==========================================================================
   MAIN LAYOUT & STAGE
   ========================================================================== */
.main-container {
  max-width: 1400px;
  margin: 24px auto 40px;
  padding: 0 20px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 28px;
  align-items: start;
}

@media (max-width: 1024px) {
  .main-container {
    grid-template-columns: 1fr;
  }
}

/* WHEEL STAGE CARD */
.wheel-stage-card {
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.wheel-stage-card::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.stage-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-glass);
}

.stage-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(6, 182, 212, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(6, 182, 212, 0); }
}

.stage-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ==========================================================================
   WHEEL COMPONENT & CANVAS
   ========================================================================== */
.wheel-outer-wrapper {
  position: relative;
  width: 100%;
  max-width: 580px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px auto 28px;
}

.canvas-box {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

#rouletteCanvas {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  box-shadow: 
    0 0 0 8px rgba(255, 255, 255, 0.04),
    0 0 40px rgba(99, 102, 241, 0.25),
    0 25px 60px rgba(0, 0, 0, 0.85);
  cursor: pointer;
}

/* POINTER / FLAPPER */
.wheel-pointer-container {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
}

.wheel-pointer {
  transition: transform 0.05s ease-out;
  transform-origin: 50% 15%;
}

.wheel-pointer.tick {
  transform: rotate(-18deg);
}

/* WHEEL CENTER HUB */
.wheel-center-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 136px;
  height: 136px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2a344d 0%, #101625 100%);
  border: 4px solid #f59e0b;
  box-shadow: 
    0 0 26px rgba(245, 158, 11, 0.45),
    inset 0 2px 6px rgba(255, 255, 255, 0.4),
    0 10px 25px rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.wheel-center-hub:hover {
  transform: translate(-50%, -50%) scale(1.05);
  border-color: #fbbf24;
  box-shadow: 
    0 0 35px rgba(245, 158, 11, 0.7),
    inset 0 2px 8px rgba(255, 255, 255, 0.6),
    0 12px 30px rgba(0, 0, 0, 0.9);
}

.hub-inner-ring {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: #090d16;
  border: 2px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.hub-logo-img, .hub-default-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
  display: block;
}

/* SPIN BUTTON */
.stage-controls {
  width: 100%;
  display: flex;
  justify-content: center;
}

.btn-spin-glow {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 50%, #3b82f6 100%);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 100px;
  padding: 18px 48px;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 
    0 0 35px rgba(99, 102, 241, 0.55),
    0 12px 30px rgba(0, 0, 0, 0.5);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 64px; /* Ergonomic Apple HIG */
  min-width: 280px;
  position: relative;
  overflow: hidden;
}

.btn-spin-glow::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.btn-spin-glow:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 
    0 0 50px rgba(99, 102, 241, 0.8),
    0 16px 36px rgba(0, 0, 0, 0.6);
}

.btn-spin-glow:hover::before {
  left: 100%;
}

.btn-spin-glow:active {
  transform: translateY(1px) scale(0.98);
}

.btn-spin-glow:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-spin-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.btn-spin-sub {
  font-size: 0.76rem;
  opacity: 0.8;
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   SIDEBAR: PARTICIPANTS & WINNERS
   ========================================================================== */
.sidebar-card {
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.sidebar-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 20px;
}

.side-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  min-height: 44px;
}

.side-tab-btn:hover {
  color: #ffffff;
}

.side-tab-btn.active {
  background: rgba(99, 102, 241, 0.25);
  border: 1px solid rgba(99, 102, 241, 0.45);
  color: #ffffff;
}

.side-tab-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: flex;
  flex-direction: column;
}

/* INPUT METHOD SWITCH */
.input-method-switch {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.method-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-sub);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 40px;
}

.method-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.method-btn.active {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.4);
  color: #67e8f9;
}

.method-btn.sample {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fcd34d;
}

.method-btn.sample:hover {
  background: rgba(245, 158, 11, 0.25);
}

.input-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
}

.participants-textarea {
  width: 100%;
  height: 200px;
  background: #050811;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px;
  color: #ffffff;
  font-size: 0.92rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: all 0.2s;
  font-family: 'Outfit', sans-serif;
}

.participants-textarea:focus {
  border-color: var(--primary-indigo);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* FILE DROP ZONE */
.file-drop-zone {
  border: 2px dashed rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.05);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
}

.file-drop-zone.dragover {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.15);
  transform: scale(0.99);
}

.drop-icon {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.drop-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.drop-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.btn-file-select {
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.5);
  color: #ffffff;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-file-select:hover {
  background: var(--primary-indigo);
}

.upload-feedback {
  margin-top: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
}

/* ACTION BUTTONS ROW */
.list-action-row {
  display: flex;
  gap: 8px;
  margin: 14px 0 18px;
}

.btn-action {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-sub);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.btn-action.danger:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: rgba(244, 63, 94, 0.5);
  color: #fecdd3;
}

/* CONFIG SWITCHES */
.config-switches {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  margin-bottom: 18px;
}

.switch-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.switch-item input {
  display: none;
}

.switch-slider {
  width: 38px;
  height: 22px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 100px;
  position: relative;
  transition: all 0.25s;
  flex-shrink: 0;
}

.switch-slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.switch-item input:checked + .switch-slider {
  background: var(--primary-indigo);
}

.switch-item input:checked + .switch-slider::before {
  transform: translateX(16px);
}

.switch-text {
  font-size: 0.85rem;
  color: var(--text-sub);
}

/* DURATION ROW */
.duration-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.duration-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.duration-options {
  display: flex;
  gap: 6px;
}

.duration-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.duration-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.duration-btn.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.5);
  color: #ffffff;
}

/* WINNERS HISTORY PANE */
.history-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.history-count-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.history-btn-group {
  display: flex;
  gap: 6px;
}

.btn-mini {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-sub);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-mini:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.history-scroll-box {
  max-height: 440px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.empty-history-state {
  text-align: center;
  padding: 40px 10px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
  display: block;
}

.history-winner-item {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.winner-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.winner-item-rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--accent-gold);
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.winner-item-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.winner-item-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ==========================================================================
   MODALS: BRANDING & WINNER CELEBRATION
   ========================================================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(3, 5, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--surface-glass-heavy);
  border: 1px solid var(--border-glass-hover);
  border-radius: var(--radius-xl);
  max-width: 560px;
  width: 100%;
  padding: 32px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  transform: scale(0.92);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal-card {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.modal-badge {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  display: block;
  margin-bottom: 4px;
}

.modal-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.2s;
}

.btn-close-modal:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.modal-desc {
  font-size: 0.92rem;
  color: var(--text-sub);
  margin-bottom: 20px;
  line-height: 1.55;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  background: #050811;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #ffffff;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s;
}

.form-input:focus {
  border-color: var(--primary-indigo);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* LOGO UPLOADER BOX */
.logo-uploader-box {
  display: flex;
  gap: 16px;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
}

.logo-preview-container {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.logo-empty-txt {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
  padding: 4px;
}

.modal-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-uploader-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-upload {
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 40px;
}

.btn-upload:hover {
  background: var(--primary-indigo);
  color: #ffffff;
}

.btn-remove-logo {
  background: transparent;
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fb7185;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-remove-logo:hover {
  background: rgba(244, 63, 94, 0.15);
}

.upload-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* LIVE PREVIEW BOX */
.branding-live-preview {
  background: #040609;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-top: 10px;
}

.preview-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
}

.co-brand-preview-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
}

.preview-badge.cardcoach {
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #ffffff;
}

.preview-cross {
  color: var(--accent-gold);
  font-weight: 800;
}

.preview-badge.sponsor {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fcd34d;
}

.preview-badge-img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border-glass);
}

.btn-modal-cancel {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-sub);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
}

.btn-modal-save {
  background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
  border: none;
  color: #ffffff;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  min-height: 44px;
}

/* ==========================================================================
   WINNER CELEBRATION MODAL
   ========================================================================== */
.winner-card {
  background: linear-gradient(135deg, rgba(22, 28, 48, 0.95) 0%, rgba(10, 14, 25, 0.98) 100%);
  border: 2px solid var(--accent-gold);
  border-radius: var(--radius-xl);
  max-width: 600px;
  width: 100%;
  padding: 44px 36px;
  text-align: center;
  box-shadow: 
    0 0 50px rgba(245, 158, 11, 0.4),
    0 25px 70px rgba(0, 0, 0, 0.9);
  position: relative;
  overflow: hidden;
  transform: scale(0.85);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .winner-card {
  transform: scale(1);
}

.winner-card::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.winner-top-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.winner-trophy-icon {
  font-size: 1.2rem;
}

.winner-co-brand-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.winner-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
}

.winner-brand-pill.cardcoach {
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.45);
  color: #ffffff;
}

.winner-brand-pill.sponsor {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}

.winner-cross {
  color: var(--accent-gold);
  font-size: 1.1rem;
  font-weight: 800;
}

.winner-cc-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.winner-sponsor-img {
  max-height: 28px;
  max-width: 80px;
  object-fit: contain;
}

.winner-name-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.6);
}

.winner-name {
  font-family: 'Outfit', sans-serif;
  font-size: 2.3rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  text-shadow: 0 0 25px rgba(245, 158, 11, 0.6);
  word-break: break-word;
  line-height: 1.2;
}

.winner-timestamp {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.winner-actions-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-winner-primary {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: none;
  color: #000000;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 0.98rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
  min-height: 48px;
  transition: all 0.2s;
}

.btn-winner-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.65);
}

.btn-winner-secondary {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fecdd3;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 48px;
  transition: all 0.2s;
}

.btn-winner-secondary:hover {
  background: rgba(244, 63, 94, 0.25);
  color: #ffffff;
}

.btn-winner-copy {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: #ffffff;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 48px;
  transition: all 0.2s;
}

.btn-winner-copy:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* ==========================================================================
   CONFETTI CANVAS
   ========================================================================== */
#confettiCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1001;
}

/* TOAST */
#toastNotification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #10b981;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
}

#toastNotification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
