html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

/* SteamCharts-like dark theme for entire page */
body {
  margin-bottom: 60px;
  background-color: #1a1a1a;
  color: #fff;
}

/* Dark navbar */
.navbar-dark {
  background-color: #1a1a1a !important;
  border-bottom: 1px solid #333 !important;
}

.navbar-dark .navbar-brand,
.navbar-dark .nav-link {
  color: #fff !important;
}

.navbar-dark .nav-link:hover {
  color: #ccc !important;
}

/* Dark footer */
.footer {
  background-color: #1a1a1a;
  border-top: 1px solid #333 !important;
  color: #aaa !important;
}

/* Page header */
.page-header {
  color: #fff;
}

.page-header .display-4 {
  color: #fff;
}

.page-header .lead {
  color: #aaa;
}

.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  white-space: nowrap;
  line-height: 60px;
}

/* Dark theme for all cards */
.card {
  margin-bottom: 20px;
  background-color: #1a1a1a;
  border: 1px solid #333;
  color: #fff;
}

.card-header {
  background-color: #1a1a1a;
  border-bottom: 1px solid #333;
  color: #fff;
}

.card-header h3,
.card-header h5 {
  color: #fff;
  margin: 0;
}

.card-body {
  color: #fff;
}

/* Text colors in dark theme */
.text-muted {
  color: #aaa !important;
}

.text-primary {
  color: #5cb85c !important;
}

.text-secondary {
  color: #aaa !important;
}

.text-info {
  color: #17a2b8 !important;
}

.text-warning {
  color: #ffc107 !important;
}

.text-success {
  color: #5cb85c !important;
}

.text-danger {
  color: #d9534f !important;
}

/* Form elements in dark theme */
.form-select,
.form-control {
  background-color: #2a2a2a;
  border: 1px solid #444;
  color: #fff;
}

.form-select:focus,
.form-control:focus {
  background-color: #2a2a2a;
  border-color: #5cb85c;
  color: #fff;
}

.form-select option {
  background-color: #2a2a2a;
  color: #fff;
}

/* Buttons in dark theme */
.btn-primary {
  background-color: #007bff;
  border-color: #007bff;
}

.btn-primary:hover {
  background-color: #0056b3;
  border-color: #0056b3;
}

.btn-secondary {
  background-color: #6c757d;
  border-color: #6c757d;
}

.btn-secondary:hover {
  background-color: #545b62;
  border-color: #545b62;
}

.btn-danger {
  background-color: #d9534f;
  border-color: #d9534f;
}

.btn-danger:hover {
  background-color: #c9302c;
  border-color: #c9302c;
}

.btn-outline-secondary {
  color: #ccc;
  border-color: #444;
}

.btn-outline-secondary:hover {
  background-color: #333;
  border-color: #555;
  color: #fff;
}

/* Badges in dark theme */
.badge.bg-secondary {
  background-color: #444 !important;
  color: #fff;
}

/* Checkbox in dark theme */
.form-check-input {
  background-color: #2a2a2a;
  border: 1px solid #444;
}

.form-check-input:checked {
  background-color: #007bff;
  border-color: #007bff;
}

/* Links */
a {
  color: #5cb85c;
}

a:hover {
  color: #449d44;
}

/* Logs container styling */
#logsContainer {
  background-color: #1a1a1a;
  color: #fff;
}

#logsContainer .border-bottom {
  border-color: #333 !important;
}

#logsContainer .text-muted {
  color: #aaa !important;
}

#priceChart {
  max-height: 400px;
}

/* SteamCharts-like dark theme for charts */
.chart-card {
    background-color: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
}

.chart-card .card-header {
    background-color: #1a1a1a;
    border-bottom: 1px solid #333;
    color: #fff;
}

.chart-card .card-header h3 {
    color: #fff;
    margin: 0;
}

.chart-controls {
    background-color: #1a1a1a;
    padding: 10px;
}

.duration-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.duration-btn {
    background-color: #2a2a2a;
    border: 1px solid #444;
    color: #ccc;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 13px;
    transition: all 0.2s;
}

.duration-btn:hover {
    background-color: #333;
    color: #fff;
}

.duration-btn.active {
    background-color: #fff;
    color: #000;
    border-color: #fff;
}

.date-range-display {
    color: #aaa;
    font-size: 13px;
    margin-top: 8px;
}

.chart-container {
    position: relative;
    height: 200px;
    margin-bottom: 20px;
}

.chart-container canvas {
    max-height: 100%;
}

.monthly-stats-table {
    margin-top: 20px;
}

.monthly-stats-table table {
    width: 100%;
    font-size: 13px;
}

.monthly-stats-table th {
    background-color: #2a2a2a;
    color: #fff;
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid #444;
}

.monthly-stats-table td {
    padding: 10px;
    border-bottom: 1px solid #333;
}

.monthly-stats-table .text-positive {
    color: #5cb85c;
}

.monthly-stats-table .text-negative {
    color: #d9534f;
}

/* Override Bootstrap dark table for better contrast */
.table-dark {
    --bs-table-bg: #1a1a1a;
    --bs-table-border-color: #333;
}

.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: #222;
}

/* Multi-step selection UI */
.selection-container {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
}

.selection-step {
    margin-bottom: 20px;
}

.selection-step:last-child {
    margin-bottom: 0;
}

.selection-step h4 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.bubble-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bubble-btn {
    background-color: #2a2a2a;
    border: 2px solid #444;
    color: #ccc;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.bubble-btn:hover:not(:disabled) {
    background-color: #333;
    border-color: #5cb85c;
    color: #fff;
    transform: translateY(-2px);
}

.bubble-btn.active {
    background-color: #5cb85c;
    border-color: #5cb85c;
    color: #fff;
    font-weight: 600;
}

.bubble-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.selection-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #222;
    border-radius: 5px;
    flex-wrap: wrap;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #aaa;
    font-size: 13px;
}

.breadcrumb-item.active {
    color: #5cb85c;
    font-weight: 600;
}

.breadcrumb-separator {
    color: #555;
}

.breadcrumb-clear {
    margin-left: auto;
    padding: 5px 10px;
    background-color: #444;
    border: 1px solid #555;
    color: #ccc;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.breadcrumb-clear:hover {
    background-color: #555;
    color: #fff;
}

.selection-step.hidden {
    display: none;
}