.comparison-container {
  max-width: 100%;
  padding: 0;
}

.comparison-header {
  margin-bottom: 24px;
}

.comparison-title {
  font-size: 28px;
  font-weight: 600;
  color: #1F2937;
  margin: 0;
}

/* Controls Section */
.comparison-controls {
  display: grid;
  grid-template-columns: 3fr 1.5fr 1.5fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 1024px) {
  .comparison-controls {
      grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .comparison-controls {
      grid-template-columns: 1fr;
  }
}

/* Search Container */
.search-container {
  position: relative;
}

.search-container label,
.filter-container label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #4B5563;
  margin-bottom: 6px;
}

.stock-search-input {
  width: 100%;
  height: 42px;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  outline: none;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}

.stock-search-input:focus {
  border-color: #EDB809;
  box-shadow: 0 0 0 3px rgba(237, 184, 9, 0.1);
}

.stock-search-input::placeholder {
  color: #9CA3AF;
}

/* Search Results */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
}

.search-result-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #F3F4F6;
  transition: background 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.search-result-item:hover {
  background: #F9FAFB;
}

.search-result-info {
  flex: 1;
}

.search-result-ticker {
  font-weight: 600;
  color: #1F2937;
}

.search-result-name {
  font-size: 13px;
  color: #6B7280;
  margin-top: 2px;
}

.search-result-button {
  padding: 6px 16px;
  background: #EDB809;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}

.search-result-button:hover {
  background: #D4A408;
}

/* Custom Select */
.filter-container {
  position: relative;
}

.custom-select {
  position: relative;
  user-select: none;
}

.select-trigger {
  height: 42px;
  padding: 8px 12px;
  background: white;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s;
}

.select-trigger:hover {
  border-color: #9CA3AF;
}

.custom-select.active .select-trigger {
  border-color: #EDB809;
  box-shadow: 0 0 0 3px rgba(237, 184, 9, 0.1);
}

.select-trigger span {
  font-size: 14px;
  color: #1F2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.select-arrow {
  width: 16px;
  height: 16px;
  color: #6B7280;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.custom-select.active .select-arrow {
  transform: rotate(180deg);
}

.select-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
}

.select-option {
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 14px;
  color: #1F2937;
}

.select-option:hover {
  background: #F9FAFB;
}

.select-option.selected {
  background: #FEF3C7;
  color: #92400E;
  font-weight: 600;
}

/* Selected Stocks */
.selected-stocks-container {
  margin-bottom: 24px;
}

.selected-stocks-container h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 12px;
}

.selected-stocks {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stock-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: white;
  border: 1.5px solid #D1D5DB;
  border-radius: 8px;
  font-weight: 600;
  color: #1F2937;
  transition: all 0.2s;
}

.stock-chip:hover {
  border-color: #EDB809;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stock-chip-remove {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F3F4F6;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 14px;
  color: #6B7280;
}

.stock-chip-remove:hover {
  background: #EF4444;
  color: white;
}

/* Chart Container */
.chart-container {
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

#comparison-chart {
  width: 100%;
  min-height: 500px;
}

/* Loading State */
.chart-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  gap: 16px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #F3F4F6;
  border-top-color: #EDB809;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
      transform: rotate(360deg);
  }
}

.chart-loading p {
  color: #6B7280;
  font-size: 14px;
}

/* Hidden */
.hidden {
  display: none !important;
}

/* Zoom Controls - Match screenshot */
.highcharts-range-selector-buttons {
  display: flex;
  gap: 4px;
}

.highcharts-button {
  cursor: pointer;
}

/* Scrollbar */
.select-options::-webkit-scrollbar,
.search-results::-webkit-scrollbar {
  width: 8px;
}

.select-options::-webkit-scrollbar-track,
.search-results::-webkit-scrollbar-track {
  background: #F3F4F6;
  border-radius: 4px;
}

.select-options::-webkit-scrollbar-thumb,
.search-results::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 4px;
}

.select-options::-webkit-scrollbar-thumb:hover,
.search-results::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #6B7280;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 8px;
}

.empty-state-text {
  font-size: 14px;
  color: #6B7280;
}
