@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

/* ========================================
   Root Variables
======================================== */
:root {
  --fitness-dark: #1a4741;
  --fitness-light: #e8f4f2;
  --fitness-accent: #2c8577;
}

/* ========================================
   Typography & General Elements
======================================== */
body {
  background-color: #f8f9fa;
}

h1 {
  color: var(--fitness-dark);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
}

.text-muted {
  color: var(--fitness-dark);
  opacity: 0.7;
}

/* ========================================
   Hero Section
======================================== */
.hero {
  background: linear-gradient(135deg, var(--fitness-dark), var(--fitness-accent));
  padding: 6rem 0;
  color: white;
  margin-bottom: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero .container {
  max-width: 1200px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 2rem;
}

.hero-title {
  white-space: nowrap;
  font-size: 3.2rem;
  letter-spacing: -0.5px;
  margin-bottom: 1.5rem;
  color: white;
  -webkit-text-fill-color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
  text-align: center;
  width: 100%;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 2rem;
  text-align: center;
}

/* CTA Button */
.btn-cta {
  background-color: white;
  color: var(--fitness-dark);
  padding: 1rem 2rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.btn-cta:hover {
  background-color: var(--fitness-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Feature cards */
.feature-card {
  background: var(--fitness-light);
  border: none;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-icon {
  margin-bottom: 1.5rem;
  color: var(--fitness-accent);
}

/* Footer */
.site-footer {
  background-color: var(--fitness-dark);
  color: white;
  padding: 2rem 0;
  margin-top: 0;
}

/* ========================================
   Muscle Map Container & Interactions
======================================== */
.muscle-map-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.muscle-groups-list {
  flex: 0 0 250px;
  background-color: var(--fitness-light);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.muscle-groups-list h3 {
  color: var(--fitness-dark);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  text-align: center;
}

.muscle-groups-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.muscle-groups-list li {
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background-color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.muscle-groups-list li.visited {
  background-color: var(--fitness-accent);
  color: white;
}

.muscle-groups-list li:hover {
  transform: translateX(5px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.muscle-groups-list .check-mark {
  color: var(--fitness-accent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.muscle-groups-list li.visited .check-mark {
  opacity: 1;
}

.svg-map-container {
  flex: 1;
  max-width: 600px;
  margin: 0;
}

.svg-map-container svg {
  width: 100%;
  height: auto;
  display: block;
  max-height: 80vh;
}

.svg-map-container svg path,
.svg-map-container svg polygon {
  fill: rgba(255, 0, 0, 0.3);
  stroke: rgba(255, 0, 0, 0.8);
  stroke-width: 1;
  transition: all 0.3s ease;
  cursor: pointer;
}

.svg-map-container svg path:hover,
.svg-map-container svg polygon:hover {
  fill: var(--fitness-accent);
  opacity: 0.5;
  stroke: var(--fitness-dark);
  stroke-width: 2;
  filter: drop-shadow(0 0 5px rgba(44, 133, 119, 0.5));
}

.svg-map-container svg path:active,
.svg-map-container svg polygon:active,
.svg-map-container svg path.active {
  fill: var(--fitness-accent);
  opacity: 0.7;
  stroke: var(--fitness-dark);
  stroke-width: 2;
}

.svg-map-container a:hover {
  text-decoration: none;
}

/* Development mode (optional) */
.svg-map-container.dev-mode svg path,
.svg-map-container.dev-mode svg polygon {
  fill: rgba(255, 0, 0, 0.1);
  stroke: #ff0000;
  stroke-width: 1;
}

.svg-map-container.dev-mode svg path:hover,
.svg-map-container.dev-mode svg polygon:hover {
  fill: rgba(255, 0, 0, 0.3);
  stroke-width: 2;
}

/* ========================================
   Buttons & Utility Elements
======================================== */
#designModeToggle {
  background-color: var(--fitness-dark);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

#designModeToggle:hover {
  background-color: var(--fitness-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.main-content {
  padding: 0;
  margin: 0;
  width: 100%;
}

/* ========================================
   Responsive Adjustments
======================================== */
@media (max-width: 768px) {
  .hero {
    padding: 4rem 0;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1.1rem;
    padding: 0 1rem;
  }

  .feature-card {
    margin-bottom: 1rem;
  }

  .svg-map-container {
    padding: 1rem;
    margin: 1rem;
    max-width: 95%;
  }

  h1 {
    font-size: 1.75rem;
  }

  .cta-section {
    padding: 2rem 0;
  }
}


/* ========================================
   Google Fonts
======================================== */

/* ========================================
   Quiz Page Additions
======================================== */
body {
  font-family: 'Montserrat', sans-serif;
}

.quiz-container {
  background-color: var(--fitness-light);
  border-radius: 10px;
  padding: 2rem;
}

.quiz-svg-container {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  user-select: none;
}

.quiz-svg-container svg {
  display: block;
  width: 100%;
  height: auto;
}

.clickable-muscle {
  fill: transparent;
  stroke: transparent;
  cursor: pointer;
  transition: fill 0.3s;
}

.clickable-muscle:hover {
  fill: rgba(52, 152, 219, 0.3);
}

.clickable-muscle.selected {
  fill: rgba(46, 204, 113, 0.4);
}

.muscle-image {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border: 2px solid var(--fitness-dark);
  border-radius: 8px;
  transition: transform 0.2s;
}

.muscle-image:hover {
  transform: scale(1.1);
}

.fun-fact-btn {
  font-size: 0.9rem;
  color: var(--fitness-accent);
  cursor: pointer;
}

.progress {
  height: 25px;
  background-color: var(--fitness-light);
  border: 1px solid var(--fitness-dark);
}

.progress-bar {
  background-color: var(--fitness-accent);
}

.navigation-buttons {
  margin-top: 2rem;
}

#submit-button {
  display: none;
}

.clickable-muscle {
  fill: transparent;
  stroke: transparent;
  cursor: pointer;
  transition: fill 0.3s;
}

.clickable-muscle:hover {
  fill: rgba(52, 152, 219, 0.3);
}

.clickable-muscle.selected {
  fill: rgba(46, 204, 113, 0.4);
}

.clickable-muscle.incorrect {
  fill: rgba(231, 76, 60, 0.4);
}

.quiz-svg-container {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  user-select: none;
}

.quiz-svg-container svg {
  display: block;
  width: 100%;
  height: auto;
}

.quiz-svg-container .clickable-muscle {
  pointer-events: auto;
}

/* Hide unwanted SVG controls */
#svgDrawingTools,
#pathControls,
.drawing-controls,
.path-editor,
.svg-controls,
.coordinate-display {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 8px solid #28a745;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 2rem;
  font-weight: bold;
}

.feedback-item {
  border-left: 4px solid;
  margin-bottom: 1rem;
  padding: 0.5rem 1rem;
}

.feedback-item.correct {
  border-left-color: #28a745;
  background-color: #f8fff8;
}

.feedback-item.incorrect {
  border-left-color: #dc3545;
  background-color: #fff8f8;
}

.results-container {
  max-width: 800px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .muscle-image {
    width: 80px;
    height: 80px;
  }
}

@media print {
  .btn {
    display: none;
  }

  .card {
    border: none;
  }

  .feedback-item {
    break-inside: avoid;
  }
}


/* ========================================
   Quiz Game Page Additions
======================================== */
.game-container {
  background-color: var(--fitness-light);
  border-radius: 12px;
  padding: 2rem;
  max-width: 800px;
  margin: 2rem auto;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  position: relative;
}

.timer-display {
  font-size: 2rem;
  font-weight: bold;
  color: var(--fitness-dark);
  text-align: center;
  margin-bottom: 1rem;
}

.timer-bar {
  width: 100%;
  height: 8px;
  background: #ddd;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.timer-bar-fill {
  width: 100%;
  height: 100%;
  background: var(--fitness-accent);
  transition: width 1s linear;
}

.score-display, .streak-display {
  text-align: center;
  margin-bottom: 1rem;
}

.score-display {
  font-size: 1.5rem;
  color: var(--fitness-accent);
}

.question-container {
  display: block;
  margin-bottom: 2rem;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.quiz-select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--fitness-dark);
  border-radius: 4px;
  margin-top: 0.5rem;
}

.answer-option {
  display: block;
  margin: 0.5rem;
  padding: 1rem 2rem;
  background-color: var(--fitness-light);
  color: var(--fitness-dark);
  font-size: 1rem;
  font-weight: bold;
  border-radius: 50px;
  border: 2px solid var(--fitness-dark);
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  text-align: center;
}

.answer-option:hover {
  background-color: var(--fitness-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.answer-option:disabled {
  background-color: #ddd;
  color: #aaa;
  cursor: not-allowed;
}

.answer-option.correct-flash {
  background-color: #28a745;
  color: white;
}

.answer-option.shake {
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}


.answer-feedback {
  margin-top: 1rem;
  padding: 0.5rem;
  border-radius: 4px;
}

.answer-feedback.correct {
  background-color: #d4edda;
  color: #155724;
}

.answer-feedback.incorrect {
  background-color: #f8d7da;
  color: #721c24;
}

.clickable-muscle {
  fill: transparent;
  stroke: transparent;
  cursor: pointer;
  transition: fill 0.3s;
}

.clickable-muscle:hover {
  fill: rgba(52, 152, 219, 0.3);
}

.clickable-muscle.selected {
  fill: rgba(46, 204, 113, 0.4);
}

.quiz-svg-container {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  user-select: none;
}

.quiz-svg-container svg {
  display: block;
  width: 100%;
  height: auto;
}

.muscle-image {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border: 2px solid var(--fitness-dark);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.fun-fact-btn {
  color: var(--fitness-accent);
  text-decoration: none;
  cursor: pointer;
}

.fun-fact-btn:hover {
  text-decoration: underline;
}

.combo-bar {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--fitness-accent);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 1.2rem;
  display: none;
  z-index: 10;
}

.game-controls {
  text-align: center;
  margin-top: 2rem;
}

.btn-game {
  background-color: var(--fitness-dark);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  border: none;
  transition: all 0.3s ease;
}

.btn-game:hover {
  background-color: var(--fitness-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.results-container {
  display: none;
  background: white;
  padding: 2rem;
  border-radius: 8px;
  margin-top: 2rem;
}

.leaderboard {
  margin-top: 2rem;
}

.leaderboard-item {
  padding: 0.5rem;
  border-bottom: 1px solid var(--fitness-light);
}

.category-filter {
  margin-bottom: 2rem;
  text-align: center;
}

/* ========================================
   Progress Bar Styles
======================================== */
.progress-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 1rem;
}

.progress {
  height: 20px;
  background-color: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #8BC34A);
  transition: width 0.3s ease-in-out;
  border-radius: 10px;
}

#progressText {
  display: none;
}

/* ========================== */
/*        card carousel       */
/* ========================== */
.card {
  max-width: 600px;
  margin: 0 auto;
}
.carousel-item img {
  max-height: 300px;
}

/* Override carousel button colors */
.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-color: var(--fitness-accent);
  border-radius: 50%;
  padding: 1rem;
}

/* Optional: change arrows to white for contrast */
.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-image: none;
  position: relative;
}

.carousel-control-prev-icon::after,
.carousel-control-next-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 0.6rem;
  height: 0.6rem;
  border: solid white;
  border-width: 0 3px 3px 0;
}

.carousel-control-prev-icon::after {
  transform: translate(-50%, -50%) rotate(135deg); /* left arrow */
}

.carousel-control-next-icon::after {
  transform: translate(-50%, -50%) rotate(-45deg); /* right arrow */
}

/* Card customization */
.card {
  background-color: var(--fitness-light);
  color: var(--fitness-dark);
  border: 2px solid var(--fitness-accent);
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.card-title {
  color: var(--fitness-accent);
}

.carousel-item img {
  border-bottom: 2px solid var(--fitness-accent);
  padding-bottom: 0.5rem;
}

.card-img-top {
  transition: transform 0.3s ease;
}

.card-img-top:hover {
  transform: scale(1.05);
}

/* ====================================== */
/*              muscle_page_1             */
/* ====================================== */
.muscle-info {
  background-color: var(--fitness-light);
  border: 2px solid var(--fitness-accent);
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border-radius: 12px;
  color: var(--fitness-dark);
}

.muscle-info img {
  max-height: 300px;
  width: auto;
  display: block;
  margin: 0 auto 1rem auto;
  object-fit: contain;
}

.text-accent {
  color: var(--fitness-accent);
}

.fun-fact-box {
  background-color: white;
  border-left: 4px solid var(--fitness-accent);
}

.btn-accent {
  background-color: var(--fitness-accent);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 50px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.btn-accent:hover {
  background-color: var(--fitness-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  color: white;  /* Force white text */
}

/* prev and next buttons */
.btn-outline-accent {
  border: 2px solid var(--fitness-accent);
  color: var(--fitness-accent);
  background: transparent;
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.btn-outline-accent:hover {
  background-color: var(--fitness-accent);
  color: white;
}

.carousel-instruction {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--fitness-dark);
  opacity: 0.7;
  transition: opacity 0.3s ease;
  padding: 12px;
}
.carousel-instruction.unlocked {
  opacity: 0;
  transition: opacity 0.4s ease-out;
}

.carousel-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--fitness-accent);
}

/* ====================================== */
/*              muscle_page_1             */
/* ====================================== */
.carousel-indicators {
  justify-content: center;
  position: static;
  margin-top: 1rem;
}

.carousel-indicators [data-bs-target] {
  background-color: var(--fitness-accent);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 6px;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.carousel-indicators .active {
  opacity: 1;
}

/* Quiz Button Styling */
#quiz-button {
    background-color: var(--fitness-dark);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 1rem 2rem;
    border-radius: 50px;
    margin: 2rem auto;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    border: 2px solid var(--fitness-accent);
}

#quiz-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    background-color: var(--fitness-accent);
    color: white;
    text-decoration: none;
}

#quiz-button:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* ========================================
   Progress Tracker Styles
======================================== */
.progress-tracker {
  flex: 0 0 250px;
  background-color: var(--fitness-light);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  height: fit-content;
  position: absolute;
  left: 2rem;
}

.progress-tracker ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.progress-tracker li {
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background-color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.progress-tracker li.completed {
  background-color: var(--fitness-accent);
  color: white;
}

.progress-tracker li.current {
  background-color: var(--fitness-dark);
  color: white;
}

.progress-tracker li.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.progress-tracker .check-mark {
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.progress-tracker li.completed .check-mark {
  opacity: 1;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .muscle-page .content-wrapper {
    flex-direction: column;
    padding: 1rem;
  }

  .muscle-page .main-content {
    margin-left: 0;
  }

  .progress-tracker {
    position: relative;
    left: 0;
    width: 100%;
    margin-bottom: 1rem;
  }
}

.quiz-card {
  max-width: 800px;
  margin: 0 auto;
  background-color: var(--fitness-light);
  border: 2px solid var(--fitness-accent);
}

.form-check-input {
  width: 1.5em;
  height: 1.5em;
  margin-top: 0.25em;
}

.form-check-label {
  padding-left: 0.5em;
}

.alert {
  font-size: 1.25rem;
  padding: 1rem 1.5rem;
}

/* New features section styles */
.features-section {
  padding: 4rem 0;
  background-color: white;
}

/* New CTA section styles */
.cta-section {
  padding: 3rem 0;
  background-color: var(--fitness-light);
  margin-top: 0;
}

.cta-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
    white-space: normal;
  }
}

/* Navbar Styles */
.navbar {
  background-color: #0F2F28;
  padding: 1rem 0;
}

.navbar-brand {
  color: #fff !important;
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: -0.5px;
  margin-right: 3rem;
}

.navbar-nav {
  gap: 2rem;
}

.navbar-nav:first-child {
  margin-right: auto;
}

.navbar-nav.ms-auto {
  margin-left: 2rem !important;
}

.nav-link {
  color: #fff !important;
  font-weight: 500;
  font-size: 1.2rem;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--fitness-accent) !important;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .navbar {
    padding: 1rem;
  }
  
  .navbar-brand {
    margin-right: 1.5rem;
  }
  
  .navbar-nav {
    gap: 1rem;
  }
  
  .navbar-collapse {
    background-color: #0F2F28;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 8px;
  }
  
  .navbar-nav.ms-auto {
    margin-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
  }
}
