/* =====================================
   | Mini Fantasy Theater Comic Viewer |
   |~~~~~   (mft-cv for short) ~~~~~~~~|
   |~~~~~  Full Theme & Styling  ~~~~~~|
   ===================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  overflow-x: hidden;
  scroll-padding-top: 45px; /* For Anchor links: compensate the thickness of the fixed top nav-bar */
}

body {
  font-family: 'Ubuntu', 'Helvetica Neue', Arial, sans-serif;
  background-color: #000;
  color: #fff;
  overflow-x: hidden;
}

/* ========================================
   Header with global episode navigation
   ======================================== */

.mft-cv-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background-color: #000;
  padding: 0;
  z-index: 9001;
  overflow-x: hidden;
}

.mft-cv-header-content {
  width: 1280px;
  margin: 0 auto;
  padding: 0.3rem 1.25rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  overflow-x: hidden;
}

.mft-cv-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.3s ease;
  flex-shrink: 0;
}

.mft-cv-logo:hover {
  opacity: 0.8;
}

.mft-cv-logo img {
  height: 3rem;
  width: auto;
}

.mft-cv-episode-title {
  flex: 1;
  text-align: center;
  color: #fff;
  font-size: 1.125rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.mft-cv-header-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-shrink: 0;
}

.mft-cv-header-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  height: 2.5rem;
  color: #fff;
  text-decoration: none;
  border: 2px solid #c5c5c5;
  border-radius: 1rem;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  font-weight: 500;
  flex-shrink: 0;
}

.mft-cv-header-pill:hover {
  background-color: #fff;
  border: 2px solid #ffffff;
  color: #000;
}

.mft-cv-header-pill:hover img {
  filter: brightness(0);
}

.mft-cv-header-pill img {
  width: 1.25rem;
  height: 1.25rem;
}

.mft-cv-header-pill span {
  font-variant-numeric: tabular-nums;
}

/* ========================================
   Main container
   ======================================== */

.mft-cv-container {
  width: 100%;
  padding-top: 4rem;
  display: flex;
  flex-direction: column;
}

/* ========================================
   Duplicate of theme.css (to delete for a 
   later merge.
   ======================================== */

.notification {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem;
  background-color: #40658d;
  border-radius: 1.2rem;
  position: relative;
}

.small-info {
  font-size: 0.9rem;
  color: #DEDEDE;
}

.off {
  opacity: 0.2;
}

/* ========================================
   Comic panels and image
   ======================================== */

.mft-cv-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem;
  background-color: #000;
  position: relative;
}

.mft-cv-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  margin: 0 auto;
  max-width: 100%;
}

@media (min-width: 769px) {
  .mft-cv-image {
    max-width: 90vh;
    max-height: 90vh;
    aspect-ratio: auto;
  }
}

.mft-cv-panel-content {
  position: relative;
  padding-bottom: 2rem;
}

/* ========================================
   Anchor Actions Button
   ======================================== */

.mft-cv-anchor {
  position: absolute;
  bottom: -0.3rem;
  right: 0;
  width: 28px;
  height: 28px;
  padding: 4px;
  opacity: 0.35;
  transition: opacity 0.3s ease, filter 0.3s ease;
  text-decoration: none;
  cursor: pointer;
  z-index: 5;
}

.mft-cv-anchor:hover {
  opacity: 1;
  filter: brightness(0.8);
}

/* ========================================
   Transcript Actions Button (Details)
   ======================================== */

.mft-cv-transcript {
  position: relative;
  width: 100%;
  font-size: 0.875rem;
  line-height: 1.5;
  flex-shrink: 0;
  z-index: 10;
  margin-top: 0;
}

.mft-cv-transcript summary {
  position: absolute;
  top: 0.3rem;
  left: 0;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.35;
  border: 2px solid #c5c5c5;
  border-radius: 1rem;
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.3s ease;
  width: auto;
  z-index: 5;
}

.mft-cv-transcript summary:hover {
  opacity: 1;
}

.mft-cv-transcript summary::-webkit-details-marker {
  display: none;
}

.mft-cv-transcript summary::marker {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -110%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -100%);
  }
}

.mft-cv-transcript[open] pre {
  position: absolute;
  top: -1.25rem;
  left: 50%;
  transform: translate(-50%, -100%);
  width: 90vw;
  max-width: 37.5rem;
  max-height: 55vh;
  padding: 1.25rem;
  background-color: rgba(40, 40, 40, 0.95);
  white-space: pre-wrap;
  overflow-wrap: break-word;
  color: #fff;
  z-index: 100;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
  animation: fadeIn 0.3s ease-in-out;
  font-size: 0.875rem;
  line-height: 1.6;
}


/* ========================================
   Credits section
   ======================================== */

.mft-cv-credits {
  padding: 2rem 1.25rem;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
}

.mft-cv-credits-content {
  width: 100%;
  max-width: 37.5rem;
  text-align: center;
  margin: 0 auto;
}

.mft-cv-share-section {
  margin-bottom: 2.5rem;
}

.mft-cv-share-section label {
  display: block;
  font-size: 1.25rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.0625rem;
  color: #fff;
  margin-bottom: 0.75rem;
  text-align: center;
}

.mft-cv-share-input-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.mft-cv-share-input {
  flex: 1;
  padding: 0.75rem 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.25rem;
  color: #fff;
  font-size: 0.875rem;
  font-family: 'Courier New', monospace;
  transition: all 0.3s ease;
  min-width: 0;
}

.mft-cv-share-input:focus {
  outline: none;
  border-color: #fff;
  background-color: rgba(255, 255, 255, 0.15);
}

.mft-cv-copy-btn {
  padding: 0.75rem 1.5rem;
  background-color: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.25rem;
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.mft-cv-copy-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

.mft-cv-copy-btn:active {
  background-color: rgba(255, 255, 255, 0.4);
}

.mft-cv-feedback {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  min-height: 1.125rem;
}

.mft-cv-credits-section {
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}

.mft-cv-credits-section strong {
  color: #fff;
  display: block;
  margin-bottom: 0.5rem;
}

.mft-cv-credits-section a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
  transition: color 0.3s ease;
}

.mft-cv-credits-section a:hover {
  color: #fff;
}

/* ========================================
   Bonus video section
   ======================================== */

.mft-cv-bonus-video {
  padding: 0 0 5rem 0;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.mft-cv-bonus-video h2 {
  font-size: 2rem;
  margin-bottom: 1.25rem;
  text-align: center;
  font-weight: 700;
}

.mft-cv-bonus-video p {
  text-align: center;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin: 1.25rem auto;
  padding: 0 2.5rem;
  max-width: 800px;
}

.mft-cv-video {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  background-color: #000;
  display: block;
}

@media (min-width: 769px) {
  .mft-cv-video {
    max-width: 100%;
    max-height: 80vh;
  }
}

.mft-cv-anchor-video {
  display: inline-block;
  float:right;
  width: 28px;
  height: 28px;
  padding: 4px;
  opacity: 0.5;
  transition: opacity 0.3s ease, filter 0.3s ease;
  text-decoration: none;
  cursor: pointer;
  z-index: 5;
}

.mft-cv-anchor-video:hover {
  opacity: 1;
  filter: brightness(0.8);
}

/* ========================================
   Responsive: Tablet
   ======================================== */

@media (max-width: 1280px) {
  .mft-cv-header-content {
    width: 100%;
  }

@media (max-width: 768px) {
  .mft-cv-header-content {
    padding: 0.375rem 0.375rem;
    gap: 0.1875rem;
  }

  .mft-cv-episode-title {
    display: none;
  }

  .mft-cv-header-pill {
    padding: 0.375rem 0.625rem;
    height: 1.625rem;
    font-size: 0.75rem;
    gap: 0.1875rem;
  }

  .mft-cv-header-pill img {
    width: 1.125rem;
    height: 1.125rem;
  }

  .mft-cv-anchor {
    width: 26px;
    height: 26px;
    bottom: 2px;
  }

  .mft-cv-logo img {
    max-width: 10rem;
  }

  .mft-cv-panel {
    padding: 1rem 0;
  }

  .mft-cv-share-section {
    margin-bottom: 1.5rem;
  }

  .mft-cv-share-section label {
    margin-top: 0.625rem;
    font-size: 1rem;
  }

  .mft-cv-share-input-group {
    flex-direction: column;
  }

  .mft-cv-share-input {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }

  .mft-cv-copy-btn {
    width: 100%;
    padding: 0.5rem;
    font-size: 0.75rem;
  }

  .mft-cv-credits-section {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    font-size: 0.875rem;
  }

  .mft-cv-bonus-video h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .mft-cv-bonus-video p {
    font-size: 0.875rem;
  }
}

/* ========================================
   Responsive: Mobile
   ======================================== */

@media (max-width: 480px) {
  .mft-cv-header-content {
    padding: 0.1rem 0;
    gap: 0;
  }

  .mft-cv-header-nav {
    gap: 0.3rem;
  }

  .mft-cv-panel {
    padding: 0.25rem;
  }

  .mft-cv-anchor {
    width: 21px;
    height: 21px;
    bottom: 5px;
  }

  .mft-cv-transcript {
    font-size: 0.75rem;
  }

  .mft-cv-transcript summary {
    font-size: 0.7rem;
    padding: 4px 10px;
  }

  .mft-cv-share-section {
    margin-bottom: 1rem;
  }

  .mft-cv-share-section label {
    margin-top: 0.625rem;
    font-size: 0.875rem;
  }

  .mft-cv-share-input {
    padding: 0.375rem 0.625rem;
    font-size: 0.6875rem;
  }

  .mft-cv-copy-btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.6875rem;
  }

  .mft-cv-credits-section {
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    font-size: 0.75rem;
  }

  .mft-cv-credits-section strong {
    margin-bottom: 0.25rem;
  }

  .mft-cv-bonus-video h2 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
  }

  .mft-cv-bonus-video p {
    font-size: 0.75rem;
    margin-top: 0.75rem;
  }
}
