/* Custom styling that works with Bootstrap */

.die-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin: 30px auto;
  max-width: 600px;
}

.result {
  position: relative;
  width: 200px;
  height: 200px;
  border-radius: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  text-align: center;
  border: 5px solid rgba(255, 255, 255, 0.2);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.exercise-die {
  background-color: #1e661c; /* Bootstrap info color */
}

/* Exercise die animation - clockwise */
.exercise-die.rolling {
  animation: spinClockwise 0.8s ease-in-out;
  transform-origin: center center;
}

@keyframes spinClockwise {
  0% {
    transform: rotateZ(0deg);
  }
  25% {
    transform: rotateZ(90deg);
  }
  50% {
    transform: rotateZ(180deg);
  }
  75% {
    transform: rotateZ(270deg);
  }
  100% {
    transform: rotateZ(360deg);
  }
}

.reps-die {
  background-color: #b20700; /* Bootstrap info color */
}

/* Reps die animation - counter-clockwise and faster */
.reps-die.rolling {
  animation: spinCounterClockwise 1.2s ease-in-out;
  transform-origin: center center;
}

@keyframes spinCounterClockwise {
  0% {
    transform: rotateZ(0deg);
  }
  20% {
    transform: rotateZ(-72deg);
  }
  40% {
    transform: rotateZ(-144deg);
  }
  60% {
    transform: rotateZ(-216deg);
  }
  80% {
    transform: rotateZ(-288deg);
  }
  100% {
    transform: rotateZ(-360deg);
  }
}

.result h2 {
  margin-top: 0;
  margin-bottom: 12px;
  color: #fff;
  font-size: 30px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  line-height: 1.1;
}

.result p {
  font-size: 24px;
  font-weight: bold;
  margin: 0;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  word-break: break-word;
  line-height: 1.2;
}

/* Countdown button styling */
.countdown-button {
  margin: 30px auto;
  padding: 30px 20px;
  background-color: #1e661c; /* Bootstrap info color */
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 60px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
  min-width: 200px;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border: 5px solid rgba(255, 255, 255, 0.2);
  line-height: 1;
  text-align: center;
  box-sizing: border-box;
  display: none;
}

.countdown-button:hover {
  background-color: #1e661c;
}

.countdown-button.warning {
  background-color: #b20700; /* Bootstrap danger color */
}

/* Flashing animation for warning state */
@keyframes flash {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

.countdown-button.flashing {
  animation: flash 0.5s infinite;
}

/* Video container */
.video-container {
  max-width: 600px;
  margin: 20px auto;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 ratio */
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-title {
  text-align: center;
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: bold;
}

/* Media player container */
.media-player-container {
  width: 100%;
  margin-top: 15px;
  border-radius: 10px;
  overflow: hidden;
  background-color: #f8f9fa;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
}

.media-player-container iframe {
  width: 100%;
  border: none;
}

/* History styling */
.history-item {
  display: flex;
  justify-content: space-between;
}

.history-exercise {
  font-weight: bold;
  color: #b20700; /* Bootstrap danger color */
}

.history-reps {
  color: #0dcaf0; /* Bootstrap info color */
  font-weight: bold;
}

/* Inspiration section */
.inspiration-content {
  font-size: 18px;
  line-height: 1.5;
  font-style: italic;
  color: #495057;
}

.inspiration-source {
  font-size: 14px;
  font-weight: bold;
}

/* Responsive adjustments */
@media (max-width: 500px) {
  .die-container {
    flex-direction: column;
    align-items: center;
  }

  .result {
    width: 180px;
    height: 180px;
  }

  .countdown-button {
    font-size: 40px;
    padding: 20px 15px;
  }
}

/* Disclaimer Modal Styling */
.disclaimer-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
}

.disclaimer-content {
  background: white;
  border-radius: 10px;
  padding: 30px;
  max-width: 500px;
  margin: 20px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.disclaimer-content h4 {
  color: #b20700;
  margin-bottom: 20px;
}

.disclaimer-content p {
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Floating help button */
.floating-help-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background-color: #0d6efd;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  z-index: 1000;
}

.floating-help-btn:hover {
  background-color: #0b5ed7;
  color: white;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.floating-help-btn:focus {
  color: white;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
  .floating-help-btn {
    width: 30px;
    height: 30px;
    font-size: 22px;
    bottom: 15px;
    right: 15px;
  }
}

/* Styles for help.html */
.feature-card {
  transition: transform 0.2s;
  height: 100%;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.feature-icon {
  font-size: 2.5rem;
  color: #1e661c; /* Bootstrap info color */
  margin-bottom: 1rem;
}

.section-header {
  border-left: 4px solid #1e661c;
  padding-left: 1rem;
  margin-bottom: 2rem;
}

.step-number {
  background-color: #1e661c;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 1rem;
}

.category-badge {
  background-color: #1e661c;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  margin: 0.25rem;
  display: inline-block;
}

.tip-box {
  background: #f8f9fa;
  border-left: 4px solid #28a745;
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0 0.375rem 0.375rem 0;
}

.warning-box {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0 0.375rem 0.375rem 0;
}

.back-to-app {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
}

.toc {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
}

.toc a {
  color: #667eea;
  text-decoration: none;
  padding: 0.25rem 0;
  display: block;
}

.toc a:hover {
  color: #764ba2;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .back-to-app {
    bottom: 1rem;
    right: 1rem;
  }
}
