* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f5f7fa;
  color: #333;
  line-height: 1.6;
}

header {
  background: linear-gradient(135deg, #1a1a6c, #4834d4);
  color: white;
  padding: 1.5rem 2rem;
  text-align: center;
}
header h1 { font-size: 1.8rem; }
.subtitle { opacity: 0.85; font-size: 0.95rem; margin-top: 0.25rem; }

main { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }

/* Controls */
.controls {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
  background: white; padding: 1rem 1.5rem; border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 1.5rem;
}
.control-group { display: flex; align-items: center; gap: 0.75rem; }
.control-group label { font-weight: 600; white-space: nowrap; }
.control-group select { padding: 0.5rem; border-radius: 4px; border: 1px solid #ccc; min-width: 200px; }

/* Buttons */
.btn {
  padding: 0.5rem 1rem; border: none; border-radius: 4px;
  cursor: pointer; font-size: 0.9rem; font-weight: 500; transition: opacity 0.2s;
}
.btn:hover { opacity: 0.85; }
.btn-primary { background: #4834d4; color: white; }
.btn-secondary { background: #e0e0e0; color: #333; }
.btn-danger { background: #e74c3c; color: white; font-size: 0.8rem; padding: 0.3rem 0.6rem; }
.btn-small { font-size: 0.8rem; padding: 0.3rem 0.6rem; background: #eee; border: 1px solid #ccc; }
.time-windows { gap: 0.25rem; }
.time-window-btn.active { background: #4834d4; color: white; border-color: #4834d4; }

/* Chart */
.chart-section {
  background: white; padding: 1.5rem; border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 1.5rem;
  min-height: 1050px; position: relative;
}
#price-chart { width: 100% !important; height: 1000px !important; }

/* Filters */
.filter-section {
  background: white; padding: 1.5rem; border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 1.5rem;
}
.filter-section h3 { margin-bottom: 0.75rem; }
.filter-actions { margin-bottom: 0.75rem; display: flex; gap: 0.5rem; }
.resort-filters {
  display: flex; flex-direction: column; gap: 0.25rem;
}
.filter-category { margin-bottom: 1rem; }
.filter-category-title {
  font-size: 0.85rem; font-weight: 600; color: #555;
  margin-bottom: 0.4rem; padding-bottom: 0.25rem; border-bottom: 1px solid #eee;
}
.default-badge {
  font-size: 0.7rem; background: #4834d4; color: white;
  padding: 0.1rem 0.4rem; border-radius: 3px; font-weight: 400;
}
.filter-category label {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.2rem 0.5rem; border-radius: 4px; cursor: pointer; font-size: 0.85rem;
}
.resort-filters label:hover { background: #f0f0f0; }
.resort-filters input[type="checkbox"] { accent-color: #4834d4; }

/* Config panel */
.config-panel {
  background: white; padding: 1.5rem; border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 1.5rem;
}
.config-panel h2 { margin-bottom: 1rem; }
.config-group { margin-bottom: 1.5rem; }
.config-group h3 { margin-bottom: 0.75rem; border-bottom: 1px solid #eee; padding-bottom: 0.5rem; }
.config-list { margin-bottom: 1rem; }
.config-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.5rem 0.75rem; border: 1px solid #eee; border-radius: 4px; margin-bottom: 0.5rem;
}
.config-item-info { flex: 1; }
.config-item-info strong { display: block; }
.config-item-info small { color: #666; }
.config-form {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
}
.config-form input, .config-form select {
  padding: 0.5rem; border: 1px solid #ccc; border-radius: 4px; font-size: 0.9rem;
}
.config-form input[type="text"], .config-form input[type="email"] { min-width: 180px; }
.config-form input[type="number"] { width: 100px; }

/* Empty state */
.empty-msg { color: #999; font-style: italic; text-align: center; padding: 2rem; }

/* Footer */
footer {
  text-align: center; padding: 1.5rem; color: #999; font-size: 0.85rem;
}
footer a { color: #4834d4; }

/* Responsive */
@media (max-width: 768px) {
  .controls { flex-direction: column; align-items: stretch; }
  .resort-filters { grid-template-columns: 1fr; }
  .config-form { flex-direction: column; }
  .config-form input, .config-form select { width: 100%; }
}
