:root {
  --primary-color: #3a86ff;
  --success-color: #4caf50;
  --warning-color: #ff9800;
  --danger-color: #f44336;
  --info-color: #2196F3;
  --dark-bg: #121212;
  --card-bg: #1e1e1e;
  --darker-card: #252525;
  --text-primary: #e0e0e0;
  --text-secondary: #aaaaaa;
  --border-color: #333;
  --hover-color: #2a2a2a;
  --input-text: #000000;
  --input-bg: rgba(255, 255, 255, 0.9);
  --dropdown-text: #e0e0e0;
  --dropdown-bg: #1e1e1e;
  --dropdown-hover: #2a2a2a;
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--dark-bg);
  background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
                url('/assets/img/fancy_background.jpg');
  background-size: cover;
  background-attachment: fixed;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* Full viewport height */
}
.row.align-items-center {
  display: flex;
  align-items: stretch;
}
.col-lg-6 {
  display: flex;
  flex-direction: column;
}
.col-lg-6 .content-container {
  height: 100%;
  display: flex;
  flex-direction: column;
}
/* Typography */
h1, h2, h3, h4, h5, h6, p, span, div, a {
  color: var(--text-primary);
}
/* Adjust heading and subtext styles */
h1.display-4 {
    font-size: 2.4rem; 
    color: var (--text-primary); 
}

.features p {
  font-size: 0.9rem; 
  color: var(--text-secondary); 
  font-weight: 400; 
  line-height: 1.4; 
}
.text-muted {
  color: var(--text-secondary) !important;
}
.card-body 
{
color: var(--text-secondary) !important;
}
.features .d-flex {
align-items: flex-start; 
}

.features i {
margin-top: 0.2rem; 
}

:root {
    --text-secondary: #cccccc; 
}
p.lead {
  font-size: 1.00rem;
  color: var(--text-secondary); 
}

/* Subtext for features */
.features p {
    font-size: 0.9rem; /* Slightly smaller font size */
    color: var (--text-primary); /* Use a more visible color */
}

/* Make form labels more visible */
label.form-label {
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-check-label {
  color: var(--text-primary);
}

/* Form Controls */
.form-control, .form-select {
  background-color: var(--input-bg);
  color: var (--input-text);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
}

.form-control:focus, .form-select:focus {
  box-shadow: 0 0 0 0.25rem rgba(58, 134, 255, 0.25);
  border-color: var(--primary-color);
}

/* Dropdown styling */
.dropdown-menu {
  background-color: var(--dropdown-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-item {
  color: var(--dropdown-text);
}

.dropdown-item:hover, .dropdown-item:focus {
  background-color: var(--dropdown-hover);
  color: var(--text-primary);
}

/* Buttons */
.btn {
  border-radius: 6px;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #3a86ff, #0066cc);
  border: none;
}

.btn-secondary {
  background: linear-gradient(135deg, #444, #333);
  border: none;
  color: white;
}

.btn-success {
  background: linear-gradient(135deg, #4caf50, #2e7d32);
  border: none;
}

.btn-danger {
  background: linear-gradient(135deg, #f44336, #c62828);
  border: none;
}

.btn-info {
  background: linear-gradient(135deg, #2196F3, #0d47a1);
  border: none;
  color: white;
}

.btn-warning {
  background: linear-gradient(135deg, #ff9800, #ef6c00);
  border: none;
}

/* Cards */
.card {
  background: linear-gradient(145deg, var(--card-bg), var(--darker-card));
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.card-header {
  background: linear-gradient(to right, #1a1a1a, #262626);
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-body {
  padding: 1.25rem;
}

/* Tables */
.table {
  color: var(--text-primary);
}

.table-dark {
  --bs-table-bg: rgba(0, 0, 0, 0.2);
  --bs-table-striped-bg: rgba(255, 255, 255, 0.05);
  --bs-table-hover-bg: rgba(255, 255, 255, 0.075);
  --bs-table-border-color: var(--border-color);
}

/* Alerts */
.alert {
  border-radius: 8px;
  padding: 1rem;
  border: none;
  margin-bottom: 1.5rem;
}

.alert-success {
  background-color: rgba(76, 175, 80, 0.2);
  color: #c8e6c9;
  border-left: 4px solid var(--success-color);
}

.alert-danger {
  background-color: rgba(244, 67, 54, 0.2);
  color: #ffcdd2;
  border-left: 4px solid var(--danger-color);
}

.alert-warning {
  background-color: rgba(255, 152, 0, 0.2);
  color: #ffe0b2;
  border-left: 4px solid var(--warning-color);
}

.alert-info {
  background-color: rgba(33, 150, 243, 0.2);
  color: #b3e5fc;
  border-left: 4px solid var(--info-color);
}

/* Navbar */
.navbar {
  background: linear-gradient(135deg, #1a1a1a, #262626);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  background: linear-gradient(45deg, var(--primary-color), #00c6ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.navbar .nav-link {
  color: var(--text-primary);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.navbar .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.navbar .nav-link.active {
  background-color: rgba(58, 134, 255, 0.2);
  color: var(--primary-color);
}

.navbar-toggler {
  border: none;
  color: var(--text-primary);
}

/* Content Container */
.content-container {
  background: linear-gradient(145deg, rgba(30, 30, 30, 0.9), rgba(37, 37, 37, 0.9));
  padding: 1.5rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Stats */
.stat-card {
  background: linear-gradient(145deg, var(--card-bg), var(--darker-card));
  padding: 1.25rem;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
  height: 100%;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary-color), transparent);
}

.stat-card h3 {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-card .stat-value {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.positive {
  color: var(--success-color);
}

.negative {
  color: var(--danger-color);
}

.neutral {
  color: var(--text-primary);
}

/* Modal */
.modal-content {
  background: linear-gradient(145deg, var(--card-bg), var(--darker-card));
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  color: var(--text-primary);
}

.modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1rem 1.25rem;
}

.modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1rem 1.25rem;
}

.btn-close-white {
  filter: brightness(0) invert(1);
}

/* Chart Containers */
.chart-container {
  position: relative;
  height: 300px;
  margin-bottom: 1.5rem;
}

/* Fix for select dropdown text color */
select option {
  background-color: var(--dropdown-bg);
  color: var(--dropdown-text);
}

/* Fix for modal dialog text */
.modal-title, .modal-body, .modal-footer {
  color: var(--text-primary);
}

/* Fix for form text */
.form-text {
  color: var(--text-secondary) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .navbar {
    padding: 0.5rem;
  }
  
  .content-container {
    padding: 1rem;
  }
}

/* Container width adjustment - restrict width for better readability */
main.container-fluid {
  max-width: 1700px; /* Limit the max width */
  margin-left: auto;
  margin-right: auto;
  min-height: calc(100vh - 160px); /* Ensures main content fills available space */
}

/* Fix for the icons in the navigation menu */
.navbar .nav-link i,
.dropdown-item i {
  margin-right: 0.5rem;
  width: 1rem;
  text-align: center;
  display: inline-block;
}

/* Footer styles to stick at the bottom */
footer {
  margin-top: auto; /* Push footer to bottom */
  background: linear-gradient(135deg, #1a1a1a, #262626);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1rem 0;
  width: 100%;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.2);
}

footer .container-fluid {
  max-width: 1700px; /* Match main container */
  margin: 0 auto;
}

/* Avatar sizes */
.avatar-sm {
  width: 32px;
  height: 32px;
  object-fit: cover;
}

.avatar-md {
  width: 48px;
  height: 48px;
  object-fit: cover;
}

.avatar-lg {
  width: 64px;
  height: 64px;
  object-fit: cover;
}

/* Hide code block language selection */
pre[class*=language-]::-moz-selection, pre[class*=language-] ::-moz-selection,
code[class*=language-]::-moz-selection, code[class*=language-] ::-moz-selection {
  background: transparent;
}

pre[class*=language-]::selection, pre[class*=language-] ::selection,
code[class*=language-]::selection, code[class*=language-] ::selection {
  background: transparent;
}

.token.attr-name, .token.builtin, .token.char, .token.inserted, .token.selector, .token.string {
  color: var(--success-color);
}

/* Hide language badge on code blocks */
div.code-toolbar > .toolbar {
  display: none !important;
}

.prism-previewer,
.prism-toolbar {
  display: none !important;
}
