body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 20px;
  background-color: #f0f4f8;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 1300px;
  margin: 0 auto;
}

header {
  margin-bottom: 30px;
}

h1 {
  color: #2c3e50;
  text-align: center;
  font-size: 2.5em;
  font-weight: 600;
}

h2 {
  color: #34495e;
  font-size: 1.8em;
  margin-top: 0;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

h3 {
  color: #34495e;
  font-size: 1.2em;
  margin-top: 0;
  margin-bottom: 10px;
}

.card {
  background-color: #fff;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.upload-section {
  display: none; /* Hide instead of deleting to avoid breaking other styles if referenced */
}

#file-upload {
  display: none;
}

.button {
  padding: 12px 25px;
  color: #fff;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  border: none;
  font-size: 1em;
  text-align: center;
}

.button:hover {
  transform: translateY(-2px);
}

.file-upload-label {
  display: inline-block;
  background-color: #3498db;
}
.file-upload-label:hover {
  background-color: #2980b9;
}
.file-upload-label:disabled,
.file-upload-label.disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}


.file-name-display {
  font-style: italic;
  color: #7f8c8d;
}

#gantt-container-wrapper {
  padding: 0; /* Gantt needs to manage its own padding */
}
#gantt-container {
  width: 100%;
  height: 550px; /* Increased height */
}

.settings-panel .setting-group {
  margin-bottom: 25px;
}
.settings-panel .setting-group > div {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.settings-panel label {
  font-weight: 500;
  min-width: 120px; /* Ensures labels align better */
}
.settings-panel input[type="range"] {
  flex-grow: 1;
}
.settings-panel input[type="date"],
.settings-panel select {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  flex-grow: 1; /* Allow these to take up space */
}

.color-palette-group {
  display: flex;
  margin-bottom: 10px;
  padding: 5px;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent; /* Placeholder for active state */
  transition: border-color 0.3s;
}

.color-palette-group:hover {
  border-color: #bdc3c7;
}

.color-palette-group.active-palette {
  border-color: #3498db;
  box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

.color-option {
  display: inline-block;
  width: 28px;
  height: 28px;
  margin-right: 8px;
  border-radius: 50%;
  transition: transform 0.2s;
  border: 1px solid rgba(0,0,0,0.1);
}
.color-option:hover {
  transform: scale(1.15);
}

#export-button {
  background-color: #2ecc71;
}
#export-button:hover {
  background-color: #27ae60;
}

#fit-all-tasks-button {
  background-color: #3498db;
}
#fit-all-tasks-button:hover {
  background-color: #2980b9;
}

#new-project-button {
  background-color: #e74c3c;
}
#new-project-button:hover {
  background-color: #c0392b;
}

.export-button {
  /* This class is no longer used for layout, but styles can be kept if needed */
  /* For this update, we will rely on #export-button and .button for styling */
}

/* Gantt specific styles */
.gantt_task_cell.weekend {
    background-color: #f7f9fa; /* Lighter grey for weekends */
}
.gantt-container-hide-weekends .gantt_task_cell.weekend {
    background-color: transparent !important;
}

/* Styling for dynamically applied task colors */
.gantt_task_line.gantt_task_custom .gantt_task_content {
  /* Handled by JS */
}
.gantt_task_line.gantt_milestone_custom .gantt_task_content {
  /* Handled by JS */
}

/* Ensure dhtmlxGantt tooltips are above other elements if needed */
.gantt_tooltip {
    z-index: 10000;
}

/* Fullscreen specific styles */
#gantt-container-wrapper.gantt-wrapper-fullscreen-active {
    /* This class is added when the wrapper is in fullscreen mode */
    /* The Fullscreen API handles the actual screen filling. */
    /* Styles here ensure consistent background and layout if needed. */
    background-color: #fff; /* Ensure a solid background */
    padding: 0 !important; /* Override card padding */
    margin: 0 !important;  /* Override card margin */
    /* position, top, left, width, height, z-index are handled by Fullscreen API */
}

#gantt-container-wrapper.gantt-wrapper-fullscreen-active #gantt-container {
    height: 100% !important; /* Make gantt chart fill the fullscreen wrapper */
    width: 100% !important;
}

/* Style for the fullscreen button if it needs to be different */
#toggle-fullscreen-button {
  /* Example: use a different color or make it full width in its group */
  /* background-color: #5dade2; */ /* Uncomment for a different color */
}
/* #toggle-fullscreen-button:hover {
  background-color: #4b8db8; 
} */

.settings-panel .setting-group h3 + .button {
    margin-top: 5px; /* Add some space if button is directly after h3 */
}

.settings-panel .setting-group .button + .button {
    margin-top: 10px; /* Add space between multiple buttons in same group */
}

/* Column Toggles Styling */
#column-toggles div {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

#column-toggles input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
  transform: scale(1.1); /* Slightly larger checkboxes */
}

#column-toggles label {
  cursor: pointer;
  user-select: none; /* Prevent text selection on label click */
  font-size: 0.95em;
}