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;
}

/* Hero Section - Enhanced landing page header */
.hero-section {
  background: linear-gradient(135deg, rgba(92, 184, 92, 0.1) 0%, rgba(26, 26, 26, 0.95) 50%, rgba(0, 123, 255, 0.1) 100%);
  border: 1px solid rgba(92, 184, 92, 0.3);
  border-radius: 12px;
  padding: 50px 30px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 0%, rgba(92, 184, 92, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  text-align: center;
  z-index: 1;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 15px;
  text-shadow: 0 2px 10px rgba(92, 184, 92, 0.3);
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: #5cb85c;
  font-weight: 500;
  margin-bottom: 25px;
  letter-spacing: 0.5px;
}

.hero-divider {
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #5cb85c, transparent);
  margin: 25px auto;
  border-radius: 2px;
}

.hero-description {
  font-size: 1.1rem;
  color: #ccc;
  margin-top: 25px;
  line-height: 1.6;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-icon-small {
  font-size: 1.2rem;
  margin-right: 8px;
  vertical-align: middle;
}

@media (max-width: 768px) {
  .hero-section {
    padding: 30px 20px;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
}

.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: 15px;
    margin-bottom: 0;
    padding: 15px 20px;
    background-color: #222;
    border-radius: 8px;
    flex-wrap: wrap;
}

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

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

.breadcrumb-item.inactive {
    color: #666;
}

.breadcrumb-label {
    font-weight: 500;
    color: #888;
}

.breadcrumb-value {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #5cb85c;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.breadcrumb-item.clickable .breadcrumb-value:hover {
    background-color: rgba(92, 184, 92, 0.15);
    color: #6ed46e;
    transform: translateY(-1px);
    text-decoration: underline;
}

.breadcrumb-value.disabled {
    color: #666;
    cursor: not-allowed;
    pointer-events: none;
}

.breadcrumb-placeholder {
    color: #888;
    font-style: italic;
}

.breadcrumb-icon {
    font-size: 12px;
    opacity: 0.7;
}

.breadcrumb-edit-icon {
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
    margin-left: 4px;
}

.breadcrumb-item.clickable:hover .breadcrumb-edit-icon {
    opacity: 0.8;
}

.breadcrumb-separator {
    color: #444;
    font-weight: 300;
}

.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;
}

/* Button styles for landing page */
.btn-outline-primary {
  color: #5cb85c;
  border-color: #5cb85c;
}

.btn-outline-primary:hover {
  background-color: #5cb85c;
  border-color: #5cb85c;
  color: #fff;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 18px;
}

/* Currency card styling */
.game-currency-section {
    border-bottom: 1px solid #333;
    padding-bottom: 20px;
}

.game-currency-section:last-child {
    border-bottom: none;
}

.currency-card {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s ease;
}

.currency-card:hover {
    transform: translateY(-5px);
    text-decoration: none;
}

.currency-card .card {
    transition: all 0.2s ease;
    cursor: pointer;
}

.currency-card:hover .card {
    border-color: #5cb85c;
    box-shadow: 0 4px 8px rgba(92, 184, 92, 0.3);
}

.currency-card .card-title {
    color: #fff;
    font-weight: 600;
    margin-bottom: 10px;
}

.currency-card .card-text {
    color: #aaa;
    font-size: 14px;
}

/* Enhanced chart container for landing page */
.chart-container {
    position: relative;
    background-color: #1a1a1a;
    padding: 10px;
    border-radius: 5px;
}

/* Chart legend improvements */
.chart-card .card-header p {
    margin-bottom: 0;
}

/* Price change indicators */
.price-change-positive {
    color: #dc3545;
    font-weight: 600;
}

.price-change-negative {
    color: #28a745;
    font-weight: 600;
}

.price-change-neutral {
    color: #aaa;
    font-weight: 600;
}

/* Stats box for landing page */
.stats-box {
    padding: 20px;
    background-color: #1a1a1a;
    border-radius: 8px;
    border: 1px solid #333;
}

.stats-box h4 {
    margin-bottom: 10px;
}

/* Chart controls */
.chart-controls {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.duration-btn {
    padding: 5px 15px;
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.duration-btn:hover {
    background-color: #444;
    border-color: #666;
}

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

/* League and Platform chart cards */
.league-chart-card,
.platform-chart-card {
    background-color: #1e1e1e;
    border: 1px solid #333;
    transition: transform 0.2s, box-shadow 0.2s;
}

.league-chart-card:hover,
.platform-chart-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.league-chart-card .card-header,
.platform-chart-card .card-header {
    background-color: #252525;
    border-bottom: 1px solid #333;
    padding: 8px 12px;  /* Ultra-compact padding */
}

.league-chart-card .card-header h5,
.platform-chart-card .card-header h5 {
    font-size: 0.95rem;  /* Compact heading size */
    margin: 0;  /* No extra margin needed with flex layout */
}

.league-chart-card .card-header .bubble-container,
.platform-chart-card .card-header .bubble-container {
    margin: 0;  /* No extra margin, controlled by parent */
}

.league-chart-card .chart-controls,
.platform-chart-card .chart-controls {
    margin: 0;  /* No margin, controlled by flex layout */
    gap: 3px;  /* Very tight button spacing */
}

.league-chart-card .duration-btn,
.platform-chart-card .duration-btn {
    padding: 4px 8px;  /* More compact buttons */
    font-size: 10px;  /* Smaller text */
}

.league-chart-card .card-body,
.platform-chart-card .card-body {
    padding: 8px 12px;  /* Minimal vertical padding */
}

.league-chart-card .chart-container,
.platform-chart-card .chart-container {
    margin: 0;  /* Remove margins */
    padding: 0;  /* Remove padding */
}

.league-chart-card .card-footer,
.platform-chart-card .card-footer {
    background-color: #252525;
    border-top: 1px solid #333;
    padding: 8px 15px;  /* Minimal footer padding */
}