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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
  margin: 0;
  background: #0a0a0f;
  min-height: 100vh;
  color: #e4e4e7;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 20%, rgba(88, 80, 236, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
  z-index: 1;
}

h1 {
  text-align: center;
  color: #fafafa;
  margin-bottom: 40px;
  font-size: 2.5em;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fafafa 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navigation menu */
.nav-menu {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  padding: 8px;
  background: rgba(30, 30, 40, 0.6);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.nav-item {
  padding: 12px 24px;
  border-radius: 8px;
  color: #d4d4d8;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-item:hover {
  background: rgba(99, 102, 241, 0.1);
  color: #a5b4fc;
}

.nav-item.active {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Panneau de contrôle du bot */
.control-panel {
  background: linear-gradient(135deg, rgba(30, 30, 40, 0.8) 0%, rgba(20, 20, 28, 0.8) 100%);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.control-panel h2 {
  color: #fafafa;
  margin-bottom: 20px;
  font-size: 1.4em;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.control-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  position: relative;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95em;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  outline: none;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

.btn-start {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-start:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-start:disabled {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
}

.btn-stop {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.btn-stop:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn-stop:disabled {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
}

.btn-stop.confirm {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  animation: pulse 0.5s ease-in-out;
}

.btn-restart {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.btn-restart:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn-restart:disabled {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.status-badge {
  padding: 10px 18px;
  background: rgba(30, 30, 40, 0.6);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 10px;
  color: #e4e4e7;
  font-weight: 600;
  font-size: 0.95em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-badge.online {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.status-badge.offline {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

h2 {
  color: #fafafa;
  font-size: 1.3em;
  margin-bottom: 16px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.drop-zones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.drop-zone {
  background: rgba(30, 30, 40, 0.6);
  backdrop-filter: blur(12px);
  border: 2px dashed rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  padding: 24px 20px;
  min-height: 200px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.drop-zone h2 {
  margin-bottom: 16px;
  font-size: 1.15em;
}

.drop-zone.highlight {
  background: rgba(99, 102, 241, 0.15);
  border-color: #6366f1;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.command-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.command-item {
  background: rgba(40, 40, 52, 0.8);
  margin: 8px 0;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: grab;
  font-weight: 500;
  color: #e4e4e7;
  transition: all 0.2s ease;
  border: 1px solid rgba(99, 102, 241, 0.2);
  font-size: 0.95em;
}

.command-item.dragging {
  cursor: grabbing;
}
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateX(4px);
}

.command-item[draggable="false"] {
  opacity: 0.4;
  cursor: not-allowed;
}

.table-section {
  background: rgba(30, 30, 40, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 12px;
  padding: 24px;
  margin-top: 32px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.table-section h2 {
  margin-bottom: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(20, 20, 28, 0.4);
  border-radius: 8px;
  overflow: hidden;
}

th, td {
  padding: 14px 16px;
  text-align: left;
}

th {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  font-weight: 600;
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(99, 102, 241, 0.3);
}

td {
  color: #d4d4d8;
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

tr:hover td {
  background: rgba(99, 102, 241, 0.08);
}

.console-section {
  background: rgba(20, 20, 28, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 12px;
  padding: 20px;
  margin-top: 32px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.console-header {
  color: #a5b4fc;
  font-weight: 600;
  margin-bottom: 12px;
  font-size: 0.95em;
  display: flex;
  align-items: center;
  gap: 8px;
}

#console {
  background: rgba(10, 10, 15, 0.9);
  color: #d4d4d8;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.85em;
  padding: 16px;
  height: 220px;
  overflow-y: auto;
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.15);
}

#console::-webkit-scrollbar {
  width: 8px;
}

#console::-webkit-scrollbar-track {
  background: rgba(20, 20, 28, 0.5);
  border-radius: 4px;
}

#console::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.3);
  border-radius: 4px;
}

#console::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.5);
}

/* Notification toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(30, 30, 40, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  transform: translateX(400px);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.1);
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.1);
}

.toast.info {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.1);
}

.toast-icon {
  font-size: 1.5em;
}

.toast-message {
  color: #e4e4e7;
  font-weight: 500;
  flex: 1;
}

@media (max-width: 900px) {
  .container {
    padding: 24px 16px;
  }
  
  h1 {
    font-size: 2em;
  }
  
  .drop-zones {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .control-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .toast {
    right: 16px;
    left: 16px;
    min-width: auto;
  }
  
  table, th, td {
    font-size: 0.85em;
  }
}

/* Styles pour la page de gestion des giveaways */
.giveaways-section {
  background: rgba(30, 30, 40, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.giveaways-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.giveaway-card {
  background: rgba(40, 40, 52, 0.8);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
}

.giveaway-card:hover {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}

.giveaway-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.giveaway-header h3 {
  color: #fafafa;
  margin: 0;
  font-size: 1.2em;
  font-weight: 600;
}

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

.btn-edit {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #22c55e;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1em;
  transition: all 0.3s ease;
}

.btn-edit:hover {
  background: rgba(34, 197, 94, 0.3);
  transform: scale(1.05);
}

.btn-delete {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2em;
  transition: all 0.3s ease;
}

.btn-delete:hover {
  background: rgba(239, 68, 68, 0.3);
  transform: scale(1.1);
}

.btn-delete.confirm {
  background: rgba(234, 179, 8, 0.25);
  border-color: rgba(234, 179, 8, 0.5);
  color: #fbbf24;
}

.giveaway-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-item .label {
  color: #a5b4fc;
  font-size: 0.85em;
  font-weight: 500;
}

.info-item .value {
  color: #e4e4e7;
  font-weight: 600;
  font-size: 1.05em;
}

.participants-details {
  margin-top: 16px;
  background: rgba(20, 20, 28, 0.6);
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.participants-details summary {
  padding: 12px;
  cursor: pointer;
  color: #a5b4fc;
  font-weight: 600;
  list-style: none;
  user-select: none;
}

.participants-details summary::-webkit-details-marker {
  display: none;
}

.participants-details summary:hover {
  background: rgba(99, 102, 241, 0.1);
}

.participants-list {
  padding: 12px;
  max-height: 400px;
  overflow-y: auto;
}

.participants-list::-webkit-scrollbar {
  width: 6px;
}

.participants-list::-webkit-scrollbar-track {
  background: rgba(20, 20, 28, 0.5);
  border-radius: 3px;
}

.participants-list::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.3);
  border-radius: 3px;
}

.participant-card {
  display: flex;
  gap: 12px;
  padding: 10px;
  background: rgba(30, 30, 40, 0.6);
  border-radius: 8px;
  margin-bottom: 8px;
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal {
  background: #0f172a;
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 12px;
  padding: 20px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.modal h3 {
  margin: 0 0 16px;
  color: #e4e4e7;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.modal-field span {
  color: #a5b4fc;
  font-weight: 600;
}

.modal-field input {
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 8px;
  padding: 10px;
  color: #e4e4e7;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.btn-secondary,
.btn-primary {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-secondary {
  background: rgba(148, 163, 184, 0.15);
  border-color: rgba(148, 163, 184, 0.4);
  color: #e4e4e7;
}

.btn-secondary:hover {
  background: rgba(148, 163, 184, 0.25);
}

.btn-primary {
  background: rgba(99, 102, 241, 0.8);
  border-color: rgba(99, 102, 241, 0.9);
  color: #0b1021;
}

.btn-primary:hover {
  background: rgba(99, 102, 241, 1);
}

.participant-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(99, 102, 241, 0.3);
}

.participant-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.participant-name {
  color: #fafafa;
  font-weight: 600;
  font-size: 0.95em;
}

.participant-tag {
  color: #a1a1aa;
  font-size: 0.85em;
}

.participant-meta {
  display: flex;
  gap: 12px;
  font-size: 0.8em;
  color: #71717a;
}

.participant-id {
  font-size: 0.75em;
  color: #52525b;
  font-family: monospace;
}

.empty-state, .loading, .error {
  text-align: center;
  padding: 40px;
  color: #a1a1aa;
  font-size: 1.1em;
}

.empty-participants {
  text-align: center;
  padding: 20px;
  color: #71717a;
  font-style: italic;
}

@media (max-width: 900px) {
  .giveaways-grid {
    grid-template-columns: 1fr;
  }
  
  .giveaway-info {
    grid-template-columns: 1fr;
  }
}
