/**
 * Global Styles and Optimizations
 * Oniichan.wtf - SDVX & Yuancon FAQ Guide
 * Version: 2.1.0
 */

/* ============================================
   Scroll Behaviour
   ============================================ */

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   Accessibility
   ============================================ */

*:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Skip to content link for screen readers */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: #3b82f6;
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-to-content:focus {
  top: 0;
}

/* ============================================
   FAQ Answer Toggle
   ============================================ */

.faq-answer {
  transition:
    max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease-in-out,
    transform 0.3s ease-in-out;
  overflow: hidden;
}

.faq-answer.collapsed {
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px);
}

.faq-answer.expanded {
  max-height: 2000px;
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Video Player
   ============================================ */

.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
}

.video-container video,
.video-container .video-js {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-js {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.video-js .vjs-big-play-button {
  border: none;
  background-color: rgba(59, 130, 246, 0.9);
  border-radius: 50%;
  width: 2em;
  height: 2em;
  line-height: 2em;
  transition: all 0.3s ease;
}

.video-js:hover .vjs-big-play-button {
  background-color: rgba(59, 130, 246, 1);
  transform: scale(1.1);
}

/* ============================================
   Print
   ============================================ */

@media print {
  nav,
  .no-print,
  video {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }

  a {
    text-decoration: underline;
  }

  a[href^="http"]:after {
    content: " (" attr(href) ")";
  }
}

/* ============================================
   Mobile Navigation
   ============================================ */

@media (max-width: 640px) {
  nav a {
    padding: 0.25rem 0.375rem;
    display: inline-flex;
    align-items: center;
  }
}

/* ============================================
   Table Responsiveness
   ============================================ */

@media (max-width: 768px) {
  .overflow-x-auto {
    -webkit-overflow-scrolling: touch;
  }

  table {
    font-size: 0.875rem;
  }

  table th,
  table td {
    padding: 0.5rem !important;
  }
}
