/* === Base Styles === */
:root {
  --primary: #4F46E5;
  --primary-hover: #6366F1;
  --secondary: #10B981;
  --secondary-hover: #34D399;
  --accent: #F59E0B;
  --accent-hover: #FBBF24;
  --danger: #EF4444;
  --success: #10B981;
  --text: #E5E7EB;
  --text-dim: #9CA3AF;
  --bg: #111827;
  --card-bg: #1F2937;
  --border: #374151;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-sm: 0.25rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
}

/* === General Styles === */
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Segoe UI', sans-serif;
}

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

/* === Navbar Theme === */
.navbar {
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 1rem;
  margin-bottom: 0;
}

.navbar-brand {
  color: var(--text) !important;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.navbar-default .navbar-nav > li > a {
  color: var(--text-dim);
}

.navbar-default .navbar-nav > li > a:hover {
  color: var(--text);
  background-color: rgba(255, 255, 255, 0.05);
}

.navbar-default .navbar-nav > .active > a, 
.navbar-default .navbar-nav > .active > a:hover, 
.navbar-default .navbar-nav > .active > a:focus {
  color: var(--primary);
  background-color: rgba(79, 70, 229, 0.15);
}

/* === Dashboard Container === */
.dash-container {
  padding: 0.6rem; 
  display: flex;
  flex-direction: column;
  gap: 0.6rem; 
}

/* Control panel styling */
.control-panel {
  padding: 8px;
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 3px;
}

/* Center content in controls row */
.controls {
  text-align: center;
  justify-content: center;
  margin-bottom: 0 !important;
}

/* Controls spacing */
.controls .col-sm-4,
.controls [class*='col-'] {
  padding-left: 10px !important;
  padding-right: 10px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Headings in the control panel */
.filter-header {
  margin-bottom: 10px;
  font-weight: 600;
  text-align: center;
}

/* Spacing for filter-group and last-updated sections */
.filter-group, .last-updated {
  margin-bottom: 5px; 
  width: 95%; 
  margin: 0 auto;
}

/* Center content in tiles row */
.tiles {
  text-align: center;
  justify-content: center;
  margin:0 auto;
}

/* You can add responsive adjustments if needed */
@media (max-width: 767px) {
  .filter-group {
    margin-bottom: 10px; 
  }
  .last-updated {
    margin-bottom: 10px; 
  }
}

/* === Stats Cards === */
/* === Center the tiles container === */
.tiles {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
}

/* Make columns use minimum width needed */
.tiles > [class*='col-'] {
  display: flex;
  justify-content: center;
  padding: 0 5px;
}

/* === Stats Cards === */
/* === Center the tiles container === */
.tiles {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap; /* Allow wrapping for responsive behavior */
  margin-bottom: 15px;
}

/* Make columns use minimum width needed and be responsive */
.tiles > [class*='col-'] {
  display: flex;
  justify-content: center;
  padding: 0 5px;
  min-width: 230px; /* Set minimum width for responsive behavior */
  flex: 1 1 auto; /* Allow growing and shrinking */
}

/* === Stats Cards === */
.stat-card {
  background-color: transparent;
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
  width: 100%; /* Fill the parent container */
  margin: 0 auto;
}

.stat-card:hover {
  transform: translateY(-3px);
}

/* Add horizontal spacing for stat cards */
.col-sm-3 .stat-card,
.col-md-3 .stat-card {
  margin: 5px !important;
}

/* === Icon styling === */
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  flex-shrink: 0; /* Prevent icon from shrinking */
}

.stat-icon i {
  font-size: 1.25rem;
  color: white;
}

/* === Icon background colors === */
.sessions {
  background: linear-gradient(135deg, #4F46E5, #818cf8);
}

.visits {
  background: linear-gradient(135deg, #10B981, #34d399);
}

.uploads {
  background: linear-gradient(135deg, #F59E0B, #fbbf24);
}

.analyses {
  background: linear-gradient(135deg, #ec4899, #f472b6);
}

/* === Content styling === */
.stat-details {
  flex: 1;
}

/* Fix for h3 and p elements to make them appear inline */
.stat-details h3.stat-value {
  display: inline;
  margin: 0;
  padding: 0;
}

.stat-details p.stat-label {
  display: inline;
  margin: 0;
  padding: 0;
}

/* === Value and label on same line === */
.stat-value {
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--text);
  margin-right: 8px;
  white-space: nowrap;
}

.stat-label {
  color: var(--text-dim);
  font-size: 1.7rem !important;
  white-space: nowrap;
}

/* === Trend on next line === */
.stat-trend {
  font-size: 1.2rem !important;
  width: 100%;
  display: block;
  margin-top: 5px;
  text-align: left;
  white-space: normal; /* Allow wrapping if needed */
}

/* Media queries for better responsiveness */
@media (max-width: 992px) {
  .tiles > [class*='col-'] {
    flex-basis: 50%; /* Two cards per row on medium screens */
  }
}

@media (max-width: 768px) {
  .tiles > [class*='col-'] {
    flex-basis: 100%; /* One card per row on small screens */
  }
  
  .stat-value, .stat-label {
    font-size: 1.5rem !important; /* Slightly smaller font on small screens */
  }
}









/* === Charts === */
/* Add hover effect to box components that replaced chart cards */
.box {
  transition: transform 0.2s ease;
  margin-top: 1px !important;
  margin-bottom: 1px !important;
  margin-left: 5px !important;
  margin-right: 5px !important;
}

/* Further reduce row spacing */
.row {
  margin-bottom: 1px !important;
  margin-top: 0 !important;
}

/* Reduce padding in columns to bring charts closer together vertically
   but increase horizontal spacing */
.col-sm-3, .col-sm-4, .col-md-3, .col-md-4 {
  padding-top: 3px !important;
  padding-bottom: 3px !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
}

.box:hover {
  transform: translateY(-3px);
}

/* Adjust box body padding to reduce space inside chart containers */
.box-body {
  padding: 0.2rem !important; 
}

/* Make box titles smaller */
.box-header h3, .box-title {
  font-size: 1.7rem !important; 
  font-weight: 500;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  text-align: center; /* Center align titles */
}

/* Reduce box header padding to compensate for smaller titles */
.box-header {
  padding: 0.3rem 0.5rem !important;
  min-height: auto !important;
}

/* Make sure the highcharts have minimal margins */
.highcharts-container {
  margin: 0 !important;
}

/* Media query for charts on middle-sized screens - show 2 columns instead of 3 */
@media (min-width: 768px) and (max-width: 991px) {
  /* Target the column width to make it 50% instead of 33.33% */
  .dash-container > .row:not(.tiles):not(.controls) > .col-sm-4,
  .dash-container > .row:not(.tiles):not(.controls) > .col-md-4 {
    width: 50% !important;
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
  
  /* Center the 2-column layout */
  .dash-container > .row:not(.tiles):not(.controls) {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  /* Adjust the chart heights for the wider containers */
  .dash-container > .row:not(.tiles):not(.controls) .highchartOutput {
    height: 270px !important; /* Slightly taller charts when they're wider */
  }
  
  /* Make the last chart in odd-numbered sets be centered and wider */
  .dash-container > .row:not(.tiles):not(.controls):last-child > .col-sm-4:last-child,
  .dash-container > .row:not(.tiles):not(.controls):last-child > .col-md-4:last-child {
    margin-left: auto;
    margin-right: auto;
  }
}

/* For small screens, stack charts in a single column */
@media (max-width: 767px) {
  .dash-container > .row:not(.tiles):not(.controls) > .col-sm-4,
  .dash-container > .row:not(.tiles):not(.controls) > .col-md-4 {
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
  
  /* Slightly smaller titles on mobile */
  .box-header h3, .box-title {
    font-size: 1.5rem !important;
  }
}


/* === Action Buttons === */
/* Action Buttons styling for About page */
.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 30px;
  width: 100%;
  max-width: 400px;
}

.action-btn {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-radius: 12px;
  text-decoration: none;
  color: white;
  font-weight: 500;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  border: none;
}

.action-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  color: white;
  text-decoration: none;
}

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

.action-btn i {
  font-size: 1.7rem;
  margin-right: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}

/* Button-specific styling */
.app-btn {
  background: linear-gradient(135deg, var(--primary), #818cf8);
}

.app-btn:hover {
  background: linear-gradient(135deg, #4338ca, var(--primary));
}

.github-btn {
  background: linear-gradient(135deg, #333, #555);
}

.github-btn:hover {
  background: linear-gradient(135deg, #222, #444);
}

.linkedin-btn {
  background: linear-gradient(135deg, #0077b5, #00a0dc);
}

.linkedin-btn:hover {
  background: linear-gradient(135deg, #005f90, #0077b5);
}

.code-btn {
    background: linear-gradient(135deg, #333, #555);
}

.code-btn:hover {
  background: linear-gradient(135deg, #222, #444);
}

/* Add a subtle pulse animation to buttons */
@keyframes subtle-pulse {
  0% { box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1); }
  50% { box-shadow: 0 3px 20px rgba(0, 0, 0, 0.2); }
  100% { box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1); }
}

.action-btn:after {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  bottom: -50%;
  left: -50%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
  transform: rotateZ(60deg) translate(-5em, 7.5em);
  opacity: 0;
  transition: opacity 0.5s;
}

.action-btn:hover:after {
  animation: shine 1s forwards;
  opacity: 1;
}

@keyframes shine {
  100% {
    transform: rotateZ(60deg) translate(1em, -9em);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .action-buttons {
    max-width: 75%;
    margin: 20px auto;
  }
  
  .action-btn {
    padding: 12px 16px;
    font-size: 1.3rem;
  }
}

.about-container {
 /* center the contents */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 20px;
 
}
