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

:root {
  /* Fresh Green Accent */
  --primary: #2ecc71;
  --primary-dark: #27ae60;
  --primary-light: #a8e6cf;

  /* Clean Backgrounds */
  --bg-dark: #f5f5f5;
  --bg-light: #ffffff;

  /* Text Colors */
  --text-dark: #2c3e50;
  --text-light: #34495e;
  --muted: #7f8c8d;

  /* Card Colors */
  --card-bg: #ffffff;
  --card-border: rgba(0, 0, 0, 0.1);

  /* Enhanced Gradient Background */
  --bg-gradient: linear-gradient(135deg, #f0f9f0, #e0f2e9);
}

[data-theme="dark"] {
  --primary: #4ade80;
  --primary-dark: #22c55e;
  --primary-light: #86efac;

  /* Dark Backgrounds */
  --bg-dark: #0f0f0f;
  --bg-light: #1a1a1a;

  /* Text Colors */
  --text-dark: #ffffff;
  --text-light: #e0e0e0;
  --muted: #a3a3a3;

  /* Card Colors */
  --card-bg: #0f0f0f;
  --card-border: rgba(255, 255, 255, 0.08);

  /* Dark Gradient Background */
  --bg-gradient: linear-gradient(135deg, #0f0f0f, #1a1a1a);

  /* Additional Dark Theme Overrides for header */
  .theme-toggle {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.1);
  }

  .theme-toggle:hover {
    background: var(--bg-light);
    color: var(--primary);
    border-color: var(--primary);
  }

  /* Improve text contrast in dark mode */
  nav a {
    color: var(--text-light);
  }
}

body {
  background: var(--bg-dark);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  font-family: "Outfit", sans-serif;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

/* Dashboard Hero */
.dashboard-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 2rem;
  background: var(--bg-dark);
  position: relative;
  min-height: 8vh;
  border-bottom: 1px solid var(--card-border);
}

.dashboard-hero h2 {
  font-size: 1.8rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  text-transform: none;
  letter-spacing: 0.5px;
  animation: fadeInUp 1s ease-out;
}

.dashboard-hero p {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 500px;
  margin: 0 auto;
  font-weight: 400;
  letter-spacing: 0.3px;
  opacity: 0.8;
  animation: fadeInUp 1s ease-out 0.2s backwards;
}

/* ===========================
   Header / Navigation
   =========================== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 3%;
  background: var(--bg-dark);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: none;
  border-bottom: 1px solid var(--card-border);
}

header h1 {
  font-size: 1.6rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

.hamburger {
  display: none;
  /* Hide by default on desktop */
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-dark);
  transition: color 0.3s ease;
  background-color: var(--bg-light);
}

.hamburger:hover {
  color: var(--primary);
}

/* Nav toggle (mobile) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-dark);
  transition: color 0.3s ease;
}

.nav-toggle:hover {
  color: var(--primary);
}

nav {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 1.5rem;
  margin-left: auto;
}

nav a {
  color: var(--text-dark);
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 400;
  position: relative;
  padding: 0.5rem 0;
  font-size: 0.9rem;
}

nav a:hover {
  color: var(--primary);
}

nav a.active {
  color: var(--primary);
  font-weight: 500;
}

nav a::after {
  display: none;
}

/* Mobile nav-specific classes */
/* Mobile styles moved to media queries for better organization */

/* ===========================
   Theme Toggle 
   =========================== */
.theme-toggle {
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text-dark);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
  background: transparent;
  border: 1px solid var(--card-border);
}

.theme-toggle:hover {
  background: var(--bg-light);
  color: var(--primary);
  transform: none;
  border-color: var(--primary);
}

/* Dashboard Layout */
.dashboard-container {
  max-width: 1200px;
  margin: 1rem auto;
  padding: 0 1.5rem;
  background-color: var(--bg-dark);
}

/* Chart Section */
.chart-section {
  margin-bottom: 3rem;
  background: var(--card-bg);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--card-border);
  transition: all 0.3s ease;
}

.chart-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.chart-container {
  position: relative;
  height: 400px;
  width: 100%;
  margin: 0 auto;
  background: var(--bg-dark);
  border-radius: 10px;
  padding: 1rem;
  border: 1px solid var(--card-border);
}

@media (max-width: 768px) {
  .chart-container {
    height: 300px;
  }
}

@media (max-width: 480px) {
  .chart-container {
    height: 250px;
  }

  .chart-section {
    padding: 1rem;
  }
}

/* Model Comparison Section */
.model-comparison-section {
  margin-bottom: 2rem;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: none;
  border: 1px solid var(--card-border);
}

.section-header {
  margin-bottom: 2rem;
  text-align: center;
}

.section-header h2 {
  font-size: 1.8rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.section-header h2 i {
  color: var(--primary);
}

.section-description {
  color: var(--text-light);
  font-size: 1rem;
  max-width: 800px;
  margin: 0 auto 1.5rem;
}

/* Model Cards */
.model-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.model-card {
  width: 320px;
  min-height: 380px;
  position: relative;
  transition: all 0.3s ease;
  border-radius: 8px;
  box-shadow: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg-dark);
  border: 1px solid var(--card-border);
}

.model-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.model-card.highlighted {
  border: 1px solid var(--primary);
  transform: none;
}

.model-card.highlighted:hover {
  transform: translateY(-2px);
}

.model-card-header {
  background: var(--bg-dark);
  padding: 1.2rem;
  text-align: center;
  position: relative;
  border-bottom: 1px solid var(--card-border);
}

.model-icon {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 0.8rem;
  display: block;
  transition: transform 0.3s ease;
}

.model-card-header h3 {
  font-size: 1.1rem;
  color: var(--text-dark);
  margin: 0;
  font-weight: 500;
}

.model-rating {
  margin-top: 0.5rem;
  color: #ffc107;
  font-size: 1rem;
}


@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(46, 204, 113, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
  }
}

.model-card-body {
  padding: 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.metric {
  margin-bottom: 1.2rem;
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.metric-label {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 400;
}

.metric-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  transition: all 0.8s ease;
}

.progress-bar {
  height: 6px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  width: 0;
  transition: width 1.5s cubic-bezier(0.19, 1, 0.22, 1);
  border-radius: 3px;
}

.progress-bar.rmse .progress-fill {
  background: #ff6b6b;
}

.progress-bar.stations .progress-fill {
  background: var(--primary);
}

.model-card-footer {
  text-align: center;
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.view-map-btn {
  background: var(--primary);
  color: white;
  padding: 0.7rem 1.3rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 400;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  font-size: 0.80rem;
}

.view-map-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* Detail items on back */
.detail-item {
  display: flex;
  justify-content: space-between;
  padding: 0.8rem 0;
  border-bottom: 1px dashed var(--card-border);
  color: var(--text-light);
  font-size: 0.95rem;
}

.detail-item span {
  font-weight: 600;
  color: var(--text-dark);
}

.detail-item:last-of-type {
  border-bottom: none;
  margin-bottom: 1rem;
}

/* Model Selector */
.model-selector {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.model-selector-btn {
  background: var(--bg-dark);
  border: 1px solid var(--card-border);
  border-radius: 30px;
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.3s ease;
}

.model-selector-btn:hover {
  background: var(--bg-dark);
  transform: translateY(-2px);
}

.model-selector-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.model-selector-btn.recommended {
  border: 1px solid var(--primary);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.model-card {
  animation: fadeInUp 0.6s ease-out;
}

.insight-content.active {
  animation: scaleIn 0.4s ease-out;
}

.key-point {
  animation: fadeInRight 0.5s ease-out;
  animation-fill-mode: both;
}

.key-point:nth-child(1) {
  animation-delay: 0.1s;
}

.key-point:nth-child(2) {
  animation-delay: 0.3s;
}

.key-point:nth-child(3) {
  animation-delay: 0.5s;
}

.highlight-badge {
  animation: pulse 2s infinite;
}

/* Additional Info/Analysis Section */
.additional-info-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--card-border);
  box-shadow: none;
}

/* Insight Tabs System */
.insight-tabs {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.insight-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 1rem;
}

.insight-tab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  background: transparent;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  font-weight: 400;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.insight-tab i {
  font-size: 0.9rem;
  color: var(--text-light);
  transition: all 0.2s ease;
}

.insight-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.insight-tab:hover i {
  color: var(--primary);
}

.insight-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.insight-tab.active i {
  color: white;
}

/* Insight Content */
.insight-content-wrapper {
  position: relative;
  min-height: 350px;
}

.insight-content {
  display: none;
  opacity: 0;
  position: absolute;
  width: 100%;
  top: 0;
  left: 0;
  transition: opacity 0.3s ease;
  background: var(--bg-dark);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--card-border);
}

.insight-content.active {
  display: flex;
  opacity: 1;
  z-index: 2;
  flex-direction: row;
  flex-wrap: wrap;
}

.insight-visual {
  flex: 1 1 280px;
  min-height: 250px;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  border-right: 1px solid var(--card-border);
}

.visual-placeholder {
  width: 100%;
  height: 100%;
  background: rgba(46, 204, 113, 0.03);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.visual-placeholder i {
  font-size: 3rem;
  margin-bottom: 0.8rem;
  opacity: 0.6;
}

.visual-label {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
}

.insight-text {
  flex: 1 1 350px;
  padding: 1.5rem;
}

.insight-text h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-weight: 500;
}

.highlight-badge {
  background: var(--primary);
  color: white;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.insight-text p {
  color: var(--text-light);
  line-height: 1.6;
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

.key-points {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.key-point {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.key-icon {
  background: rgba(46, 204, 113, 0.1);
  color: var(--primary);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.conclusion-section {
  background: var(--bg-light);
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 1.5rem;
  border: 1px solid var(--card-border);
  position: relative;
}

.conclusion-section h3 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  color: var(--text-dark);
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
  font-weight: 500;
}

.conclusion-section p {
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
}

.conclusion-section p:last-of-type {
  margin-bottom: 1.5rem;
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

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

.secondary-btn {
  background: var(--bg-dark);
  color: var(--text-dark);
  border: 1px solid var(--card-border);
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
}

.secondary-btn:hover {
  color: var(--primary);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .dashboard-container {
    padding: 0 1.5rem;
  }

  .model-comparison-section,
  .additional-info-section {
    padding: 1.5rem;
  }

  .analysis-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .dashboard-container {
    padding: 0 1rem;
  }

  .section-header h2 {
    font-size: 1.3rem;
  }

  .model-comparison-table {
    font-size: 0.85rem;
  }

  .model-comparison-table th,
  .model-comparison-table td {
    padding: 0.75rem;
  }

  .header {
    padding: 1rem;
  }

  .nav-menu {
    gap: 1rem;
  }

  .nav-menu a {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }
}

@media (max-width: 768px) {
  .dashboard-container {
    padding: 0 1rem;
  }

  .model-comparison-section,
  .additional-info-section {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }

  .model-cards {
    gap: 1rem;
  }

  .model-card {
    width: 100%;
    max-width: 320px;
  }

  .insight-nav {
    padding-bottom: 0.8rem;
    gap: 0.4rem;
  }

  .insight-tab {
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
  }

  .insight-content.active {
    flex-direction: column;
  }

  .insight-visual {
    min-height: 180px;
    border-right: none;
    border-bottom: 1px solid var(--card-border);
  }

  .insight-text {
    padding: 1.2rem;
  }

  .insight-text h3 {
    font-size: 1.2rem;
  }

  .conclusion-section {
    padding: 1.2rem;
  }

  .action-buttons {
    flex-direction: column;
  }

  .primary-btn,
  .secondary-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Mobile and Tablet Navigation Styles */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  nav.nav-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-dark);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    z-index: 999;
    border-right: 1px solid var(--card-border);
  }

  nav.nav-menu.active {
    display: flex;
  }

  nav.nav-menu a {
    font-size: 1.1rem;
    padding: 0.8rem 1.5rem;
    width: 180px;
    text-align: center;
    border-radius: 6px;
    border: 1px solid var(--card-border);
    background: var(--bg-light);
  }

  nav.nav-menu a:hover {
    color: var(--primary);
    border-color: var(--primary);
  }

  nav.nav-menu a::after {
    display: none;
  }

  header {
    padding: 0.8rem 1.5rem;
  }

  header h1 {
    font-size: 1.4rem;
  }

  .dashboard-hero {
    padding: 1.5rem 1rem;
  }

  .dashboard-hero h2 {
    font-size: 1.5rem;
  }

  .dashboard-hero p {
    font-size: 0.85rem;
  }
}


@media (max-width: 480px) {
  .dashboard-container {
    padding: 0 0.5rem;
    margin: 1rem auto;
  }

  .dashboard-hero h2 {
    font-size: 1.5rem;
    font-weight: 400;
  }

  .dashboard-hero p {
    font-size: 0.9rem;
  }

  .model-comparison-section,
  .additional-info-section {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 15px;
  }

  .section-header h2 {
    font-size: 1.1rem;
  }

  /* Insight tabs for smallest screens */
  .insight-tab {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }

  .insight-tab i {
    margin-right: 3px;
  }

  .insight-text {
    padding: 1rem;
  }

  .insight-text h3 {
    font-size: 1.1rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .key-point {
    font-size: 0.85rem;
  }

  .visual-placeholder i {
    font-size: 3rem;
  }

  .model-comparison-table {
    font-size: 0.75rem;
  }

  .model-comparison-table th,
  .model-comparison-table td {
    padding: 0.5rem;
  }

  .analysis-card {
    padding: 1rem;
  }

  .analysis-card h3 {
    font-size: 1.1rem;
  }

  .conclusion-section {
    padding: 1rem;
  }

  .header {
    padding: 0.75rem;
  }

  .header h1 {
    font-size: 1.2rem;
  }

  .nav-menu {
    gap: 0.5rem;
  }

  .nav-menu a {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
  }
}

/* Dark Mode Specific Adjustments */
[data-theme="dark"] .model-comparison-table thead {
  background-color: var(--primary-dark);
}

[data-theme="dark"] .model-comparison-table tbody tr:hover {
  background-color: rgba(46, 204, 113, 0.15);
}

[data-theme="dark"] .responsive-table-wrapper {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .analysis-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}