/* Pandemia Digital - Sorteos Style System */

:root {
  --bg-primary: #0b0c10;
  --bg-secondary: #141722;
  --bg-tertiary: #1b1e2e;
  --bg-card: rgba(26, 29, 46, 0.65);
  
  --border-glow: rgba(168, 85, 247, 0.25);
  --border-light: rgba(255, 255, 255, 0.08);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Platform Colors */
  --color-yt: #ef4444;
  --color-tw: #a855f7;
  --color-pat: #ff6854;
  
  /* Accent Colors */
  --accent: #d946ef;
  --accent-glow: rgba(217, 70, 239, 0.4);
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.3);
  
  --shadow-lg: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 20px rgba(168, 85, 247, 0.15);
  
  --font-title: 'Space Grotesk', 'Outfit', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Canvas for Confetti */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* App Container Layout */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 1600px;
  margin: 0 auto;
  padding: 16px;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  box-shadow: var(--shadow-lg);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.app-logo-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  box-shadow: 0 0 15px rgba(217, 70, 239, 0.4);
}

.logo-text h1 {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, #fff, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text span {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Main Layout */
.main-layout {
  display: flex;
  gap: 16px;
  flex: 1;
  min-height: 0; /* Important for scrollable containers */
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-lg);
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.15) 0%, rgba(217, 70, 239, 0.05) 100%);
  color: var(--accent);
  border-left: 3px solid var(--accent);
  box-shadow: var(--shadow-glow);
}

.nav-item i {
  width: 20px;
  height: 20px;
}

.sidebar-footer {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}

.sidebar-footer p {
  margin-bottom: 4px;
}

.sidebar-footer .version {
  color: var(--accent-cyan);
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Content Area */
.content-area {
  flex: 1;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  position: relative;
}

/* Tabs Toggle */
.tab-content {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

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

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

/* Section Header */
.section-header {
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 16px;
}

.section-header h2 {
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 15px;
}

.icon-accent {
  color: var(--accent);
}

.flex-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-tw), var(--accent));
  color: #fff;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.6);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--text-muted);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-yt);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: var(--color-yt);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  outline: none;
  transition: var(--transition-fast);
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.15);
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .col {
  flex: 1;
}

.form-text {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Custom Checkboxes */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  padding: 16px;
  border-radius: var(--radius-md);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

.checkbox-label input {
  display: none;
}

.custom-checkbox {
  width: 20px;
  height: 20px;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  background: var(--bg-primary);
  position: relative;
  transition: var(--transition-fast);
}

.checkbox-label input:checked + .custom-checkbox {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox-label input:checked + .custom-checkbox::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 7px;
  width: 4px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.text-yt { color: var(--color-yt); }
.text-tw { color: var(--color-tw); }
.patreon-bullet {
  background: var(--color-pat);
  color: #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
}

/* Slider Controls */
.range-container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.range-slider {
  flex: 1;
  -webkit-appearance: none;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  outline: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent-glow);
  transition: transform 0.1s;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.range-value {
  font-weight: 600;
  color: var(--accent);
  min-width: 60px;
}

/* Data Import Section Grid */
.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.data-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  transition: var(--transition-normal);
}

.data-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.data-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.data-card.youtube::before { background: var(--color-yt); }
.data-card.twitch::before { background: var(--color-tw); }
.data-card.patreon::before { background: var(--color-pat); }

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.card-header h3 {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
}

.platform-icon {
  width: 24px;
  height: 24px;
}

.youtube .platform-icon { color: var(--color-yt); }
.twitch .platform-icon { color: var(--color-tw); }
.platform-icon-patreon {
  background: var(--color-pat);
  color: #fff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 800;
}

.stats-mini {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  padding-bottom: 6px;
}

.stats-blank {
  height: 28px;
}

.stats-mini .label {
  color: var(--text-secondary);
}

.stats-mini .value {
  font-weight: 700;
  color: var(--text-primary);
}

/* Upload Zone */
.upload-zone {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  margin-top: 16px;
  margin-bottom: 16px;
  transition: var(--transition-fast);
  background: rgba(0,0,0,0.15);
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--accent);
  background: rgba(168, 85, 247, 0.05);
}

.upload-zone i {
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  margin-bottom: 8px;
  transition: var(--transition-fast);
}

.upload-zone:hover i {
  color: var(--accent);
}

.upload-zone p {
  font-size: 12px;
  color: var(--text-secondary);
}

.card-actions {
  display: flex;
  justify-content: flex-end;
}

/* Instructions Panel */
.instructions-panel {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
}

.instructions-panel h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.instructions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.inst-col h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.inst-col p {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Sorteo Layouts (Grid Panels) */
.control-panel-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
}

.control-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  height: fit-content;
}

.control-card h3 {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 10px;
}

.pool-preview-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  min-height: 480px;
  max-height: 600px;
}

.pool-preview-card h3 {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin-bottom: 16px;
}

.search-bar i {
  color: var(--text-muted);
  width: 18px;
  height: 18px;
}

.search-bar input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  width: 100%;
}

.pool-list-wrapper {
  flex: 1;
  overflow-y: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
}

.pool-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.pool-table th {
  background: rgba(255,255,255,0.02);
  padding: 12px 16px;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 10;
}

.pool-table td {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.02);
  color: var(--text-primary);
}

.pool-table tr:hover td {
  background: rgba(255,255,255,0.01);
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mb-2 { margin-bottom: 8px; }
.p-5 { padding: 40px; }
.hidden { display: none !important; }

/* Modals Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 5, 8, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

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

.modal-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
  border-radius: var(--radius-lg);
  width: 500px;
  max-width: 90vw;
  padding: 24px;
  transform: translateY(20px);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-box {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
}

.modal-header h3 {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
}

.btn-close-modal:hover {
  color: var(--text-primary);
}

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

/* Arena Drawing Modal (Premium Layout) */
.drawing-arena {
  background: radial-gradient(circle at center, #1b0e2f 0%, var(--bg-primary) 100%);
}

.arena-content {
  width: 700px;
  max-width: 95vw;
  text-align: center;
}

.arena-header {
  margin-bottom: 40px;
  position: relative;
}

.pulse-ring {
  width: 80px;
  height: 80px;
  border: 3px solid var(--accent);
  border-radius: 50%;
  position: absolute;
  top: -100px;
  left: calc(50% - 40px);
  animation: pulse 2s infinite;
  display: none; /* Can trigger via JS */
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.5; }
}

.arena-header h2 {
  font-family: var(--font-title);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 0 20px rgba(168,85,247,0.5);
  margin-bottom: 8px;
}

.arena-header p {
  color: var(--text-secondary);
  font-size: 16px;
}

/* Spinner Slot Machine Layout */
.spinner-container {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

.spinner-window {
  width: 500px;
  height: 80px;
  background: rgba(0,0,0,0.6);
  border: 2px solid var(--border-glow);
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.15), inset 0 0 15px rgba(0,0,0,0.9);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

.spinner-pointer {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  z-index: 10;
}

.spinner-pointer::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -8px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid var(--accent);
}

.spinner-pointer::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: -8px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid var(--accent);
}

.spinner-track {
  display: flex;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  /* Controlled via javascript transform: translateX(...) */
  will-change: transform;
}

.spinner-item {
  width: 250px; /* Two items visible perfectly in the window */
  flex-shrink: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 20px;
  color: var(--text-secondary);
  border-right: 1px solid rgba(255,255,255,0.05);
  background: linear-gradient(180deg, rgba(20,23,34,0) 0%, rgba(20,23,34,0.4) 100%);
}

.spinner-item.active {
  color: #fff;
  font-size: 24px;
  text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.draw-counter-info {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* Draw Results Card */
.draw-results-card {
  background: rgba(26, 29, 46, 0.85);
  border: 1px solid var(--accent);
  box-shadow: 0 0 40px rgba(168, 85, 247, 0.25);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: 20px;
  animation: slideUp 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.results-header {
  margin-bottom: 24px;
}

.trophy-icon {
  width: 48px;
  height: 48px;
  color: #ffd700;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.4));
  margin-bottom: 12px;
}

.results-header h3 {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 800;
  color: #ffd700;
}

.winners-layout {
  display: flex;
  gap: 32px;
  margin-bottom: 32px;
  text-align: left;
}

.winners-column, .substitutes-column {
  flex: 1;
}

.winners-layout h4 {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 6px;
}

.winner-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  animation: pulseCard 2s infinite;
}

.winner-item-card.is-sub {
  animation: none;
  background: rgba(0,0,0,0.2);
}

@keyframes pulseCard {
  0% { border-color: rgba(255, 215, 0, 0.2); box-shadow: 0 0 0 rgba(255, 215, 0, 0); }
  50% { border-color: rgba(255, 215, 0, 0.6); box-shadow: 0 0 12px rgba(255, 215, 0, 0.1); }
  100% { border-color: rgba(255, 215, 0, 0.2); box-shadow: 0 0 0 rgba(255, 215, 0, 0); }
}

.winner-info {
  display: flex;
  flex-direction: column;
}

.winner-name {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 16px;
}

.winner-platform-info {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.winner-platform-info i {
  width: 12px;
  height: 12px;
}

.winner-badge {
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 215, 0, 0.15);
  color: #ffd700;
  padding: 4px 8px;
  border-radius: 20px;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.winner-item-card.is-sub .winner-badge {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border-color: var(--border-light);
}

.results-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* History List Layout */
.history-container {
  min-height: 300px;
}

.large-icon {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.history-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-fast);
}

.history-item:hover {
  border-color: var(--accent);
}

.history-item-details h4 {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.history-item-details p {
  font-size: 12px;
  color: var(--text-secondary);
}

.history-winners-summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.history-winner-tag {
  font-size: 12px;
  font-weight: 600;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  color: var(--accent);
  padding: 4px 8px;
  border-radius: 4px;
}

.history-actions {
  display: flex;
  gap: 8px;
}

/* API Configuration & Status Badges */
.status-indicator {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 20px;
  margin-left: auto;
  text-transform: uppercase;
}

.badge-connected {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-disconnected {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.card-actions-row {
  display: flex;
  gap: 8px;
}

.card-actions-row .col {
  flex: 1;
}

.btn-xs {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: var(--radius-sm);
}

/* Info Alert Box */
.info-alert-box {
  display: flex;
  gap: 16px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 16px;
  border-radius: var(--radius-md);
  align-items: flex-start;
  margin-top: 24px;
}

.info-alert-box strong {
  color: #f59e0b;
  font-size: 14px;
  display: block;
  margin-bottom: 4px;
}

.info-alert-box p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.info-alert-box .alert-icon {
  color: #f59e0b;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

/* Config Grid & Boxes */
.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.config-card-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.card-box-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
}

.card-box-header h3 {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
}

.card-box-header i {
  width: 24px;
  height: 24px;
}

.conn-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  background: rgba(0,0,0,0.15);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.conn-status-row .status-text {
  font-weight: 600;
  font-size: 13px;
}

.conn-status-row .status-text.connected {
  color: #10b981;
}

.conn-status-row .status-text.disconnected {
  color: #ef4444;
}

.accordion-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  padding: 12px 16px;
  border-radius: var(--radius-md);
}

.accordion-item strong {
  font-size: 13px;
  color: var(--text-primary);
  display: block;
  margin-bottom: 4px;
}

.accordion-item p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.accordion-item a {
  color: var(--accent);
  text-decoration: none;
}

.accordion-item a:hover {
  text-decoration: underline;
}

.import-section-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 14px;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  padding-bottom: 2px;
}

/* Wheel of Fortune Styling */
.wheel-box {
  position: relative;
  width: 540px;
  height: 540px;
  margin: 0 auto;
  border-radius: 50%;
  border: 8px solid #1f2335;
  box-shadow: 0 0 40px rgba(168, 85, 247, 0.4), inset 0 0 20px rgba(0,0,0,0.8);
  background: #0b0c10;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
}

#wheel-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.wheel-pointer {
  position: absolute;
  top: -24px;
  left: calc(50% - 15px);
  width: 30px;
  height: 45px;
  background: linear-gradient(180deg, #ffd700, #d4af37, #aa7c11);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.6));
  z-index: 50;
  transform-origin: 50% 0%;
  will-change: transform;
}

.wheel-pointer.tick {
  animation: pointer-click 0.12s cubic-bezier(0.1, 0.8, 0.3, 1);
}

@keyframes pointer-click {
  0% { transform: rotate(0deg); }
  35% { transform: rotate(-24deg); }
  100% { transform: rotate(0deg); }
}

/* Responsive Grid Adjustments */
@media (max-width: 900px) {
  .control-panel-grid {
    grid-template-columns: 1fr;
  }
  .main-layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
  }
  .nav-menu {
    flex-direction: row;
    overflow-x: auto;
  }
}

