/* Red banner for questionnaire requirement */
.questionnaire-banner {
  background: #ff3b3b;
  color: #fff;
  font-weight: 600;
  padding: 1rem 1.5rem;
  border-radius: 0.6rem;
  text-align: center;
  font-size: 1.08rem;
  box-shadow: 0 2px 12px #0002;
  margin-bottom: 1rem;
}
/* Martial Fitness Dashboard Styles */
body {
  background: #181818;
  color: #fff;
  font-family: 'Noto Sans JP', Arial, sans-serif;
  margin: 0;
  padding: 0;
  overflow: hidden; /* Prevent default body scrolling */
  height: 100vh;
}

.dashboard-layout {
  display: flex;
  width: 100%;
  height: calc(100vh - 140px); /* Adjust based on header height */
  overflow: hidden; /* Prevent outer scrolling */
}

.dashboard-sidebar {
  width: 25%;
  background: #1e1e1e;
  height: 100%;
  padding: 2rem;
  border-right: 1px solid #333;
  position: relative;
  overflow-y: auto; /* Enable vertical scrolling */
}

.dashboard-sidebar h2 {
  color: #3a7;
  font-size: 1.5rem;
  margin: 0; /* underline now handled by container */
}

/* Unified underline under heading + pills */
.profile-header-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  text-align: center;
  border-bottom: 1px solid #444;
  padding-bottom: 0.55rem;
  margin-bottom: 1rem;
}
.profile-header-line h2 { margin: 0; }

.dashboard-sidebar-section {
  margin-bottom: 2rem;
}

.dashboard-sidebar-section h3 {
  color: #aaf;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.dashboard-main {
  flex: 1;
  padding: 2rem;
  height: 100%;
  overflow-y: auto; /* Enable vertical scrolling */
  overflow-x: hidden;
}

.dashboard-container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  background: #222;
  box-shadow: 0 8px 32px #0008;
  padding: 3rem 2.5rem 2.5rem 2.5rem;
  color: #fff;
  padding-top: 5rem;
}
.dashboard-container h1 {
  font-size: 2.5rem;
  color: #3a7;
  text-align: center;
  margin-bottom: 2.5rem;
}
/* Unified inner section container */
.dashboard-section {
  background: #262626;
  border: 1px solid #333;
  border-radius: 0.85rem;
  padding: 1.75rem 1.5rem 1.6rem 1.5rem;
  margin-bottom: 2.75rem;
  box-shadow: 0 4px 18px #0006;
  position: relative;
}
.dashboard-section h2 {
  margin: 0 0 0.85rem 0;
  font-size: 1.6rem;
  color: #3a7;
  letter-spacing: .5px;
}
.dashboard-section p.section-subtle {
  margin: 0 0 1.25rem 0;
  color: #bbb;
  font-size: .9rem;
  line-height: 1.35;
}
.dashboard-section:last-child { margin-bottom: 0; }

/* Horizontal slider layout inside unified sections */
.dashboard-section .meal-plan-grid,
.dashboard-section .scroll-grid,
.dashboard-section .challenge-grid {
  margin-top: 1rem;
  display: flex;
  flex-wrap: nowrap; /* prevent wrapping */
  gap: 1.25rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.5rem; /* space for potential hidden scrollbar */
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

/* Cards/items in horizontal sliders */
.dashboard-section .meal-plan-card,
.dashboard-section .scroll-item,
.dashboard-section .challenge-card {
  flex: 0 0 260px; /* fixed card width for consistent snapping */
  scroll-snap-align: start;
}

/* Slightly narrower scroll-item if needed */
.dashboard-section .scroll-item { flex-basis: 240px; }

/* Optional slimmer scrollbar styling (WebKit) */
.dashboard-section .meal-plan-grid::-webkit-scrollbar,
.dashboard-section .scroll-grid::-webkit-scrollbar,
.dashboard-section .challenge-grid::-webkit-scrollbar { height: 8px; }
.dashboard-section .meal-plan-grid::-webkit-scrollbar-track,
.dashboard-section .scroll-grid::-webkit-scrollbar-track,
.dashboard-section .challenge-grid::-webkit-scrollbar-track { background: #1c1c1c; border-radius: 4px; }
.dashboard-section .meal-plan-grid::-webkit-scrollbar-thumb,
.dashboard-section .scroll-grid::-webkit-scrollbar-thumb,
.dashboard-section .challenge-grid::-webkit-scrollbar-thumb { background: #3a7; border-radius: 4px; }
.dashboard-section .meal-plan-grid::-webkit-scrollbar-thumb:hover,
.dashboard-section .scroll-grid::-webkit-scrollbar-thumb:hover,
.dashboard-section .challenge-grid::-webkit-scrollbar-thumb:hover { background: #4b8; }

/* Tighten cards inside unified sections */
.dashboard-section .meal-plan-card,
.dashboard-section .scroll-item,
.dashboard-section .challenge-card {
  background: #1f1f1f;
  border: 1px solid #303030;
}
.dashboard-welcome {
  text-align: center;
  margin-bottom: 2.5rem;
}
.dashboard-welcome h2 {
  font-size: 2rem;
  color: #3a7;
  margin-bottom: 0.5rem;
}
.dashboard-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: center;
}
.dashboard-card {
  background: #181818;
  border-radius: 0.75rem;
  box-shadow: 0 4px 16px #0006;
  padding: 2rem 2rem 1.5rem 2rem;
  min-width: 320px;
  max-width: 420px;
  flex: 1 1 320px;
  color: #fff;
}
.dashboard-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dashboard-sidebar li {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.archetype-display {
  background: #252525;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

.archetype-display h3 {
  color: #3a7;
  margin-bottom: 0.5rem;
}

.badge {
  display: inline-block;
  background: #3a7;
  color: #fff;
  padding: 0.3rem 0.8rem;
  border-radius: 0.5rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  font-weight: bold;
}

.badges-container {
  display: flex;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

/* Center the Your Badges section */
.badges-section { 
  text-align: center; 
  background:#262626; 
  border:1px solid #333; 
  border-radius:0.85rem; 
  padding:1.4rem 1rem 1.2rem; 
  box-shadow:0 4px 14px #0006; 
  margin-top:1.75rem; 
}
.badges-section h3 { 
  margin:0 0 0.85rem 0; 
  font-size:1.15rem; 
  color:#3a7; 
  letter-spacing:.5px;
}
.badges-section .badges-container { justify-content: center; }

.progress-metrics {
  margin-top: 1.5rem;
}

.progress-metrics h3 {
  color: #3a7;
  margin-bottom: 0.5rem;
}

.scroll-history {
  margin-top: 1.5rem;
}

.scroll-history h3 {
  color: #3a7;
  margin-bottom: 0.5rem;
}

.dashboard-card h3 {
  color: #3a7;
  font-size: 1.35rem;
  margin-bottom: 1.2rem;
}
.dashboard-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.dashboard-card li {
  font-size: 1.08rem;
  margin-bottom: 0.8rem;
  color: #fff;
}
.status {
  font-weight: bold;
  color: #fa7;
}
#dashboardArchetype {
  font-size: 1.25rem;
  color: #aaf;
  margin-top: 0.5rem;
  margin-bottom: 1.2rem;
}
@media (max-width: 900px) {
  body {
    overflow: auto; /* Re-enable scrolling on mobile */
    height: auto;
  }
  .dashboard-layout {
    flex-direction: column;
    height: auto;
    overflow: auto;
  }
  .dashboard-sidebar {
    width: 100%;
    height: auto;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid #333;
    overflow: visible;
  }
  .dashboard-main {
    height: auto;
    overflow: visible;
  }
  .dashboard-summary {
    flex-direction: column;
    gap: 2rem;
  }
  .dashboard-container {
    padding: 1.5rem 0.5rem 1.5rem 0.5rem;
  }
}

/* Section Locking for Questionnaire Completion */
.section-locked {
  overflow: hidden;
  position: relative;
}

.section-locked > *:not(.questionnaire-overlay) {
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
}

.questionnaire-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(2px);
}

.overlay-content {
  text-align: center;
  color: #fff;
  padding: 2rem;
  background: rgba(20, 20, 20, 0.9);
  border-radius: 1rem;
  border: 2px solid #ff6b6b;
  max-width: 400px;
}

.lock-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.overlay-content h3 {
  color: #ff6b6b;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.overlay-content p {
  margin-bottom: 1.5rem;
  color: #ccc;
}

.unlock-button {
  display: inline-block;
  background: #3a7;
  color: #fff;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: bold;
  transition: background 0.3s ease;
}

.unlock-button:hover {
  background: #4b8;
}

/* Completed Questionnaire Styling */
.questionnaire-completed {
  transition: all 0.3s ease;
}

.questionnaire-completed:hover {
  background: #888 !important;
  transform: none !important;
}

.questionnaire-completed h3,
.questionnaire-completed p {
  color: #ccc !important;
}