/* Video Modal Styles */
.video-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

.video-modal-content {
  background: #faf8ef;
  padding: 30px;
  border-radius: 10px;
  max-width: 90%;
  max-height: 90%;
  text-align: center;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.video-modal-content h3 {
  color: #776e65;
  font-size: 24px;
  margin-bottom: 20px;
}

.video-player-wrapper {
  position: relative;
  width: 100%;
  max-width: 640px;
  display: flex;
  justify-content: center;
}

.hammer-video {
  width: 100%;
  max-width: 640px;
  max-height: 400px;
  border-radius: 8px;
  background: #000;
}

.video-completed-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 8px;
  pointer-events: none;
  animation: fadeIn 0.5s ease-in;
  z-index: 10;
}

.completed-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #6aaa64;
  color: white;
  font-size: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  animation: scaleIn 0.5s ease-out;
}

.completed-text {
  color: white;
  font-size: 24px;
  margin-top: 15px;
  font-weight: bold;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.video-timer {
  margin: 15px 0;
  color: #776e65;
  font-size: 16px;
}

#video-countdown {
  font-weight: bold;
  color: #f59563;
}

.video-close-btn {
  background: #8f7a66;
  color: #f9f6f2;
  border: none;
  padding: 15px 30px;
  font-size: 18px;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.2s;
}

.video-close-btn:hover:not(:disabled) {
  background: #9f8a76;
}

.video-close-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

.video-close-btn:not(:disabled) {
  background: #f59563;
}

.video-close-btn.video-completed {
  background: #6aaa64;
  animation: pulse 1.5s ease-in-out infinite;
}

.video-close-btn.video-completed:hover {
  background: #5d9e57;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Loading indicator */
.video-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 40px;
}

.video-loading p {
  margin-top: 20px;
  color: #776e65;
  font-size: 18px;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #eee4da;
  border-top: 5px solid #f59563;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media screen and (max-width: 520px) {
  .video-modal-content {
    padding: 20px;
    width: 95%;
  }

  .video-modal-content h3 {
    font-size: 20px;
  }

  .hammer-video {
    max-height: 300px;
  }

  .video-close-btn {
    padding: 12px 24px;
    font-size: 16px;
  }

  .completed-icon {
    width: 60px;
    height: 60px;
    font-size: 36px;
  }

  .completed-text {
    font-size: 18px;
  }
}
