/**
 * SETTINGS MODAL & MANAGEMENT STYLES — THE LUCKY VOYAGE
 */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(7, 2, 26, 0.85);
  backdrop-filter: blur(14px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.settings-window {
  width: 880px;
  max-width: 95vw;
  height: 640px;
  max-height: 92vh;
  background: linear-gradient(145deg, #180938 0%, #0d0422 100%);
  border: 2px solid #F59E0B;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(245, 158, 11, 0.3);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.show .settings-window {
  transform: scale(1);
}

/* Modal Header */
.settings-header {
  padding: 20px 28px;
  background: rgba(30, 11, 74, 0.7);
  border-bottom: 1px solid rgba(245, 158, 11, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.settings-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.settings-title-group i {
  font-size: 24px;
  color: #F59E0B;
}

.settings-main-title {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  font-weight: 800;
  color: #FEF08A;
  letter-spacing: 1px;
}

.btn-close-modal {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #CBD5E1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.btn-close-modal:hover {
  background: #DC2626;
  color: #FFFFFF;
}

/* Tab Navigation */
.settings-nav-tabs {
  display: flex;
  background: rgba(20, 7, 50, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 20px;
}

.settings-tab-btn {
  background: none;
  border: none;
  color: #94A3B8;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.settings-tab-btn:hover {
  color: #FDE047;
}
.settings-tab-btn.active {
  color: #FEF08A;
}
.settings-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #F59E0B, #FDE047);
  box-shadow: 0 0 10px #F59E0B;
}

/* Tab Body */
.settings-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
}

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

/* Stats Pill Bar */
.stats-summary-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.stat-box {
  flex: 1;
  background: rgba(46, 16, 101, 0.5);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
}
.stat-box-num {
  font-size: 26px;
  font-weight: 900;
  color: #FEF08A;
  margin-top: 4px;
}
.stat-box-label {
  font-size: 12px;
  font-weight: 700;
  color: #CBD5E1;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Participants Editor */
.editor-instruction {
  font-size: 14px;
  color: #CBD5E1;
  margin-bottom: 12px;
  line-height: 1.5;
}

.participants-textarea {
  width: 100%;
  height: 240px;
  background: rgba(10, 3, 26, 0.85);
  border: 1.5px solid rgba(168, 85, 247, 0.4);
  border-radius: 12px;
  color: #F8FAFC;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  padding: 16px;
  resize: vertical;
  outline: none;
  line-height: 1.6;
}
.participants-textarea:focus {
  border-color: #F59E0B;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.4);
}

.editor-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #E2E8F0;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
}

.btn-primary {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  border: none;
  color: #1E0B4A;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.4);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(253, 224, 71, 0.7);
}

.btn-danger {
  background: #DC2626;
  border: none;
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-danger:hover {
  background: #B91C1C;
}

/* Winners Table */
.table-wrapper {
  max-height: 380px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

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

.data-table th {
  background: rgba(30, 11, 74, 0.9);
  color: #FEF08A;
  font-weight: 800;
  padding: 12px 16px;
  border-bottom: 2px solid rgba(245, 158, 11, 0.4);
  position: sticky;
  top: 0;
  z-index: 2;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #E2E8F0;
}

.data-table tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.prize-pill {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #FEF08A;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
}

.btn-action-delete {
  background: none;
  border: none;
  color: #EF4444;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 4px;
}
.btn-action-delete:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* Audio Settings Row */
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.setting-label-group {
  display: flex;
  flex-direction: column;
}
.setting-title {
  font-size: 16px;
  font-weight: 700;
  color: #F8FAFC;
}
.setting-desc {
  font-size: 13px;
  color: #94A3B8;
  margin-top: 2px;
}

.setting-control-slider {
  width: 220px;
  accent-color: #F59E0B;
}

.setting-control-number {
  background: rgba(10, 3, 26, 0.8);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #FEF08A;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  width: 80px;
  text-align: center;
}
