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

body {
  margin: 0;
  min-width: 320px;
}

#root {
  width: 100%;
}

* {
  box-sizing: border-box;
}

.app {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
  color: #f0f0f0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.header {
  padding: 24px 32px;
  background: rgba(22, 33, 62, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header h1 {
  margin: 0 0 20px 0;
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #e94560 0%, #ff6b8a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.controls {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.slider-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 280px;
}

.slider-container label {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.3px;
}

.slider-container label strong {
  color: #fff;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.slider-container input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, #e94560 0%, #ff6b8a 100%);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(233, 69, 96, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.slider-container input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(233, 69, 96, 0.5);
}

.slider-container input[type="range"]:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.toggle-container {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease;
}

.toggle-container:hover {
  background: rgba(255, 255, 255, 0.08);
}

.toggle-container input[type="checkbox"] {
  position: relative;
  width: 44px;
  height: 24px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.toggle-container input[type="checkbox"]::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.toggle-container input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #4ecca3 0%, #45b393 100%);
}

.toggle-container input[type="checkbox"]:checked::before {
  transform: translateX(20px);
}

.toggle-container input[type="checkbox"]:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.toggle-label {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
}

.button-group {
  display: flex;
  gap: 12px;
}

button {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}

button:hover:not(:disabled) {
  transform: translateY(-2px);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.generate-btn {
  background: linear-gradient(135deg, #4ecca3 0%, #45b393 100%);
  color: #0a1628;
  box-shadow: 0 2px 8px rgba(78, 204, 163, 0.3);
}

.generate-btn:hover:not(:disabled) {
  box-shadow: 0 6px 20px rgba(78, 204, 163, 0.4);
}

.load-btn {
  background: linear-gradient(135deg, #e94560 0%, #ff6b8a 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(233, 69, 96, 0.3);
}

.load-btn:hover:not(:disabled) {
  box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4);
}

.close-btn {
  background: transparent;
  color: #e94560;
  border: 2px solid #e94560;
}

.close-btn:hover:not(:disabled) {
  background: #e94560;
  color: white;
}

.cancel-btn {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.cancel-btn:hover:not(:disabled) {
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.progress-container {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  max-width: 500px;
}

.progress-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, #4ecca3 0%, #45b393 100%);
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(78, 204, 163, 0.5);
}

.progress-text {
  font-size: 14px;
  font-weight: 600;
  color: #4ecca3;
  min-width: 55px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.stats {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(78, 204, 163, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(78, 204, 163, 0.2);
  font-size: 13px;
  font-weight: 500;
  color: #4ecca3;
  display: inline-block;
}

.table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 20px;
  padding: 24px 32px;
}

.table-container {
  background: rgba(22, 33, 62, 0.8);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.table-header {
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.3);
  font-weight: 600;
  font-size: 13px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table-columns {
  display: flex;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.15);
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table-columns span {
  padding: 0 4px;
}

.plain-table-body {
  height: 260px;
  overflow-y: auto;
}

.table-row {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  font-variant-numeric: tabular-nums;
}

.table-row:hover {
  background: rgba(233, 69, 96, 0.08);
}

.table-row span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plain-table-body::-webkit-scrollbar {
  width: 8px;
}

.plain-table-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.plain-table-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.plain-table-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.warning {
  color: #ff6b6b;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  background: rgba(255, 107, 107, 0.15);
  border-radius: 4px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: calc(100vh - 200px);
  text-align: center;
  padding: 40px;
}

.empty-state p {
  margin: 8px 0;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

.empty-state .hint {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 400;
}

.empty-state .ready {
  font-size: 16px;
  color: #4ecca3;
  margin-top: 24px;
  padding: 12px 24px;
  background: rgba(78, 204, 163, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(78, 204, 163, 0.2);
}
