/* ========================================
   LIVE SOLAR SYSTEM - OVERLAY UI STYLES
   Modern overlay-based interface for WebGL viewer
   ======================================== */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #000;
  color: #fff;
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
}

/* ========================================
   WEBGL CANVAS
   ======================================== */

#gfx {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  z-index: 1;
}

/* ========================================
   LOADING SCREEN
   ======================================== */

#loading-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  color: #fff;
}

.loader {
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top: 4px solid #fff;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ========================================
   TIME CONTROLS OVERLAY (CENTER TOP)
   ======================================== */

#time-controls-overlay {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  pointer-events: none;
}

#time-controls-panel {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

#time-controls-overlay {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  pointer-events: none;
}

#time-controls-panel {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

.time-controls-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.time-display-row {
  text-align: center;
  width: 100%;
  min-width: 550px;
}

.time-buttons-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.time-speed-row {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
}

#reset-controls-overlay {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  pointer-events: none;
  display: flex;
  gap: 12px;
}

.reset-btn {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
  pointer-events: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.reset-btn:hover {
  background: rgba(0, 0, 0, 0.95);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}

.reset-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.time-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 5px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
  font-family: inherit;
  min-width: 32px;
}

.time-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.time-btn:active {
  background: rgba(255, 255, 255, 0.3);
}

.time-btn.active {
  background: rgba(79, 195, 247, 0.25);
  border-color: rgba(79, 195, 247, 0.6);
  box-shadow: 0 0 12px rgba(79, 195, 247, 0.4);
}

.time-btn-primary {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  font-size: 15px;
  min-width: 40px;
}

.time-btn-primary.active {
  background: rgba(79, 195, 247, 0.3);
  border-color: rgba(79, 195, 247, 0.8);
  box-shadow: 0 0 14px rgba(79, 195, 247, 0.5);
}

#timeStep {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  color: #fff;
  padding: 4px 6px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  max-width: 95px;
}

#timeStep:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
}

#timeStep option {
  background: #1a1a1a;
  color: #fff;
  padding: 6px;
}

/* ========================================
   DRAGGABLE PANEL (SOLAR SYSTEM OBJECTS)
   ======================================== */

.draggable-panel {
  position: absolute;
  top: 80px;
  right: 20px;
  width: 450px;
  max-width: 90vw;
  height: 800px;
  max-height: calc(100vh - 40px);
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 200;
  min-width: 420px;
  min-height: 500px;
}

.draggable-panel.minimized {
  height: fit-content !important;
  min-height: auto !important;
}

.draggable-panel.minimized .panel-content {
  display: none;
}

.draggable-panel.locked .resize-handle {
  display: none;
}

/* Panel Header */
.panel-header {
  background: rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: move;
  user-select: none;
}

.panel-header.no-drag {
  cursor: default;
}

.panel-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  flex: 1;
  display: flex;
  align-items: center;
  letter-spacing: 0.3px;
}

.panel-controls {
  display: flex;
  gap: 8px;
}

.panel-control-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s ease;
  padding: 0;
}

.panel-control-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
}

.panel-control-btn:active {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0.95);
}

/* Panel Content */
.panel-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.panel-section {
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.panel-section:last-of-type {
  border-bottom: none;
}

/* Stats Cards */
.panel-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0;
}

.stat-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
}

.stat-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.stat-item.active {
  background: rgba(79, 195, 247, 0.25);
  border-color: rgba(79, 195, 247, 0.6);
  box-shadow: 0 0 12px rgba(79, 195, 247, 0.4);
}

.stat-item.active:hover {
  background: rgba(79, 195, 247, 0.3);
}

.stat-item i {
  font-size: 20px;
  opacity: 0.9;
}

.stat-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.stat-label {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Filter Buttons */
.filter-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 0;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
  color: #fff;
  font-family: inherit;
  font-size: 9.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: rgba(79, 195, 247, 0.25);
  border-color: rgba(79, 195, 247, 0.6);
  box-shadow: 0 0 12px rgba(79, 195, 247, 0.4);
}

.filter-btn.active:hover {
  background: rgba(79, 195, 247, 0.3);
}

.filter-btn i {
  font-size: 18px;
  opacity: 0.9;
}

/* Individual filter button icon colors */
.filter-btn[data-filter="all"] i {
  color: #4fc3f7;
}

.filter-btn[data-filter="planet"] i {
  color: #81c784; 
}

.filter-btn[data-filter="dwarf planet"] i {
  color: #a1887f;
}

.filter-btn[data-filter="moon"] i {
  color: #e0e0e0; 
}

.filter-btn[data-filter="asteroid"] i {
  color: #ff7043; 
}
#ff7043
.filter-btn[data-filter="comet"] i {
  color: #64b5f6; 
}

.filter-btn[data-filter="spacecraft"] i {
  color: #ba68c8; 
}

.filter-btn[data-filter="miscellaneous"] i {
  color: #ffb74d; 
}

.panel-description {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}

/* Table Controls Section */
#table-controls-section {
  padding: 12px 16px 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table-controls-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.table-search-control,
.table-length-control {
  display: flex;
  align-items: center;
}

.table-search-control label,
.table-length-control label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  margin: 0;
}

.table-search-control input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: #fff;
  padding: 6px 10px;
  font-size: 13px;
  font-family: inherit;
  min-width: 180px;
  transition: all 0.2s ease;
}

.table-search-control input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(79, 195, 247, 0.5);
  box-shadow: 0 0 8px rgba(79, 195, 247, 0.3);
}

.table-search-control input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.table-length-control select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: #fff;
  padding: 6px 10px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 0 4px;
}

.table-length-control select:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(79, 195, 247, 0.5);
  box-shadow: 0 0 8px rgba(79, 195, 247, 0.3);
}

.table-length-control select option {
  background: rgba(0, 0, 0, 0.95);
  color: #fff;
  padding: 4px 8px;
}

.panel-table-container {
  flex: 1;
  overflow: auto;
  padding: 0 6px;
}

.panel-footer {
  background: rgba(0, 0, 0, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  line-height: 1.5;
}

/* Resize Handle */
.resize-handle {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 20px;
  height: 20px;
  cursor: nesw-resize;
  background: linear-gradient(225deg, transparent 0%, transparent 50%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0.3) 100%);
  border-bottom-left-radius: 12px;
  transition: opacity 0.2s ease;
}

.resize-handle:hover {
  opacity: 0.8;
}

.draggable-panel.locked .resize-handle {
  display: none;
}

/* ========================================
   DATATABLE STYLING
   ======================================== */

#objectsTable {
  width: 100% !important;
  font-size: 13px;
  color: #fff;
  table-layout: auto;
}

.dataTables_wrapper .dataTables_scroll {
  width: 100%;
}

.dataTables_wrapper .dataTables_scrollBody {
  width: 100% !important;
}

#objectsTable thead th {
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  padding: 12px 12px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
}

#objectsTable tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.95);
}

#objectsTable tbody tr {
  transition: all 0.2s ease;
  background: transparent !important;
}

#objectsTable tbody tr:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  transform: scale(1.005);
}

/* Override DataTables default striping */
table.dataTable.stripe tbody tr.odd,
table.dataTable.display tbody tr.odd,
table.dataTable.stripe tbody tr.even,
table.dataTable.display tbody tr.even {
  background-color: transparent !important;
}

/* Remove blue tint from individual cells */
#objectsTable tbody tr.odd td,
#objectsTable tbody tr.even td,
table.dataTable.stripe tbody tr.odd td,
table.dataTable.stripe tbody tr.even td,
table.dataTable.display tbody tr.odd td,
table.dataTable.display tbody tr.even td {
  background-color: transparent !important;
}

.zoom-btn {
  background: linear-gradient(135deg, rgba(79, 195, 247, 0.2), rgba(129, 199, 132, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
  font-family: inherit;
  min-width: 42px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.zoom-btn i {
  font-size: 14px;
}

.zoom-btn:hover {
  background: linear-gradient(135deg, rgba(79, 195, 247, 0.35), rgba(129, 199, 132, 0.35));
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 195, 247, 0.3);
}

.zoom-btn:active {
  transform: translateY(0px);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* DataTables wrapper styling */
.dataTables_wrapper {
  color: #fff;
  font-size: 12px;
  padding: 0px 0;
}

.dataTables_wrapper .dataTables_length {
  float: right;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.8);
  max-width: 48%;
}

.dataTables_wrapper .dataTables_filter {
  float: left;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.8);
  max-width: 48%;
}

.dataTables_wrapper::after {
  content: "";
  display: table;
  clear: both;
}

.dataTables_wrapper .dataTables_filter label {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.dataTables_wrapper .dataTables_filter label::before {
  content: "\f002";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  color: rgba(255, 255, 255, 0.7);
  margin-top: 12px;
  margin-left: 12px;
  margin-right: 12px;
  font-size: 11px;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  margin: 0 4px;
  font-family: inherit;
  font-size: 12px;
  transition: all 0.2s ease;
}

.dataTables_wrapper .dataTables_length select option {
  background: rgba(0, 0, 0, 0.95);
  color: #fff;
  padding: 4px 8px;
}

.dataTables_wrapper .dataTables_filter input {
  min-width: 180px;
  max-width: 200px;
}

.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(79, 195, 247, 0.5);
  box-shadow: 0 0 8px rgba(79, 195, 247, 0.3);
}

.dataTables_wrapper .dataTables_paginate {
  float: right;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff !important;
  padding: 6px 12px;
  border-radius: 4px;
  margin: 0 3px;
  transition: all 0.2s ease;
  cursor: pointer;
  font-size: 12px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: linear-gradient(135deg, rgba(79, 195, 247, 0.3), rgba(129, 199, 132, 0.3)) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(79, 195, 247, 0.2);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  transform: none;
}

/* ========================================
   AXIS LABELS
   ======================================== */

.axis-label {
  position: absolute;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.7);
  padding: 4px 8px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 50;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

/* ========================================
   OBJECT LABELS
   ======================================== */

.object-label {
  position: absolute;
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.6);
  padding: 3px 7px;
  border-radius: 3px;
  pointer-events: none;
  z-index: 60;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ========================================
   GRID LABELS
   ======================================== */

.grid-label {
  position: absolute;
  color: rgba(79, 195, 247, 0.7);
  font-size: 10px;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.5);
  padding: 2px 6px;
  border-radius: 3px;
  pointer-events: none;
  z-index: 55;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  border: 1px solid rgba(79, 195, 247, 0.3);
}

/* ========================================
   SCROLLBAR STYLING
   ======================================== */

.panel-content::-webkit-scrollbar,
.panel-table-container::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.panel-content::-webkit-scrollbar-track,
.panel-table-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.panel-content::-webkit-scrollbar-thumb,
.panel-table-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.panel-content::-webkit-scrollbar-thumb:hover,
.panel-table-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ========================================
   SETTINGS MODAL
   ======================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: rgba(20, 20, 20, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
  width: 500px;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

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

.modal-header {
  background: rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header h2 i {
  color: #4fc3f7;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  color: #fff;
  transform: rotate(90deg);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.settings-section {
  margin-bottom: 24px;
}

.settings-section:last-child {
  margin-bottom: 0;
}

.settings-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: #4fc3f7;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(79, 195, 247, 0.3);
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.setting-item:last-child {
  border-bottom: none;
}

.setting-item label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

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

.setting-control input[type="range"] {
  width: 150px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
  -webkit-appearance: none;
}

.setting-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #4fc3f7;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.setting-control input[type="range"]::-webkit-slider-thumb:hover {
  background: #81d4fa;
  transform: scale(1.2);
}

.setting-control input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #4fc3f7;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.setting-control input[type="range"]::-moz-range-thumb:hover {
  background: #81d4fa;
  transform: scale(1.2);
}

.setting-control input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #4fc3f7;
}

.setting-control span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  min-width: 45px;
  text-align: right;
  font-weight: 500;
}

.modal-footer {
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.modal-btn {
  padding: 10px 20px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.modal-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.modal-btn-primary {
  background: rgba(79, 195, 247, 0.3);
  border-color: rgba(79, 195, 247, 0.6);
}

.modal-btn-primary:hover {
  background: rgba(79, 195, 247, 0.4);
  border-color: rgba(79, 195, 247, 0.8);
}

.modal-btn-secondary {
  background: rgba(255, 152, 0, 0.2);
  border-color: rgba(255, 152, 0, 0.4);
}

.modal-btn-secondary:hover {
  background: rgba(255, 152, 0, 0.3);
  border-color: rgba(255, 152, 0, 0.6);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  #time-controls-overlay {
    top: 10px;
    white-space: pre;
  }
  
  #scenario-time-display {
    font-size: 18px;
    padding: 8px 16px;
  }
  
  #time-controls-panel {
    padding: 8px 12px;
  }
  
  .draggable-panel {
    width: 90vw;
    right: 5vw;
    top: 10px;
  }
  
  .time-btn {
    padding: 6px 8px;
    font-size: 14px;
    min-width: 32px;
  }
}
