:root {
  --dark-bg: #1a1a1a;
  --dark-surface: #2d2d2d;
  --dark-border: #404040;
  --dark-text: #e0e0e0;
  --dark-text-secondary: #a0a0a0;
  --primary-color: #0d6efd;
  --primary-hover: #0b5ed7;
  --success-color: #198754;
  --info-color: #0dcaf0;
  --danger-color: #dc3545;
}

/* Ensure dark mode applies to all elements */
html, body {
  background-color: var(--dark-bg) !important;
  color: var(--dark-text) !important;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
}

/* Override Bootstrap's default background colors */
.bg-light {
  background-color: var(--dark-bg) !important;
}

.text-dark {
  color: var(--dark-text) !important;
}

/* Ensure all Bootstrap components use dark theme */
.card, .navbar, .modal-content, .dropdown-menu, .alert {
  background-color: var(--dark-surface) !important;
  border-color: var(--dark-border) !important;
  color: var(--dark-text) !important;
}

.navbar {
  background-color: var(--dark-surface) !important;
  border-bottom: 1px solid var(--dark-border);
}

.navbar-brand {
  color: var(--dark-text) !important;
  font-weight: 600;
}

.nav-link {
  color: var(--dark-text-secondary) !important;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--dark-text) !important;
}

main {
  flex: 1;
}

.card {
  background-color: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

textarea {
  background-color: var(--dark-surface);
  color: var(--dark-text);
  border: 1px solid var(--dark-border);
  font-size: 1.1rem;
  border-radius: 8px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Button Styles */
.btn {
  border-radius: 6px;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
  font-weight: 500;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-primary {
  background-color: var(--primary-color) !important;
  color: white !important;
}

.btn-primary:hover {
  background-color: var(--primary-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-success {
  background-color: var(--success-color) !important;
  color: white !important;
}

.btn-success:hover {
  background-color: #157347 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-info {
  background-color: var(--info-color) !important;
  color: #000 !important;
}

.btn-info:hover {
  background-color: #31d2f2 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-danger {
  background-color: var(--danger-color) !important;
  color: white !important;
}

.btn-danger:hover {
  background-color: #bb2d3b !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

footer {
  background-color: var(--dark-surface);
  border-top: 1px solid var(--dark-border);
  padding: 2rem 0;
  margin-top: auto;
}

.footer-link {
  color: var(--dark-text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--dark-text);
}

.text-muted {
  color: var(--dark-text-secondary) !important;
}

.stats {
  font-size: 0.9rem;
  color: var(--dark-text-secondary);
}

/* Animation for buttons */
.btn {
  transform: translateY(0);
  transition: transform 0.2s ease;
}

.btn:active {
  transform: translateY(1px);
}

/* Tooltip styles */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  background-color: var(--dark-surface);
  color: var(--dark-text);
  text-align: center;
  padding: 5px 10px;
  border-radius: 6px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}
