/* ==========================================================================
   RYUTA THEATER (YouTube Page) Styles - Movie Theater Theme UI
   ========================================================================== */

/* --- Container & Layout --- */
.theater-container {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 62px 16px 95px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 100%;
  box-sizing: border-box;
  background: url('../assets/theater_stage_bg.png') center center / cover no-repeat;
  position: relative;
  animation: pageFadeIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes pageFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.985);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* --- Attraction Header Section --- */
.theater-header-section {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  z-index: 5;
  width: 100%;
  max-width: 660px;
  position: relative;
}

/* Ribbon Banner (Matching History & SNS Page) */
.theater-ribbon-banner {
  position: relative;
  width: 100%;
  max-width: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.theater-ribbon-img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.35));
}

.theater-ribbon-title-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.theater-title-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}



/* --- Cinema Stage Section & Props --- */

/* --- Cinema Stage Section & Props --- */
.theater-stage-section {
  width: 100%;
  max-width: 820px;
  position: relative;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 4;
}

/* Theater Side Curtains */
.theater-curtains-left,
.theater-curtains-right {
  position: absolute;
  top: -15px;
  width: 120px;
  height: calc(100% + 30px);
  background: linear-gradient(90deg, #1e3a8a 0%, #172554 100%);
  border-radius: 0 0 24px 24px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6), 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 6;
  pointer-events: none;
}

.theater-curtains-left {
  left: -20px;
  border-right: 3px solid #fbbf24;
}

.theater-curtains-right {
  right: -20px;
  border-left: 3px solid #fbbf24;
}

.theater-curtain-drape {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: repeating-linear-gradient(90deg, transparent, transparent 15px, rgba(0, 0, 0, 0.25) 15px, rgba(0, 0, 0, 0.25) 30px);
}

/* Festoon Lights String along Top Screen */
.theater-festoon-lights {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  display: flex;
  justify-content: space-between;
  z-index: 10;
  pointer-events: none;
}

.light-bulb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fef08a;
  box-shadow: 0 0 10px #fef08a, 0 0 20px #f59e0b;
  animation: bulbGlow 1.8s ease-in-out infinite alternate;
}

.light-bulb:nth-child(even) {
  animation-delay: 0.9s;
}

@keyframes bulbGlow {
  0% {
    opacity: 0.6;
    transform: scale(0.9);
  }

  100% {
    opacity: 1;
    transform: scale(1.15);
    box-shadow: 0 0 14px #fef08a, 0 0 26px #fbbf24;
  }
}

/* Ornate Cinema Screen Frame */
.theater-screen-frame {
  position: relative;
  width: 100%;
  background: linear-gradient(145deg, #334155 0%, #1e293b 100%);
  border: 8px solid #d4af37;
  border-radius: 20px;
  padding: 24px;
  box-sizing: border-box;
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.6),
    inset 0 0 20px rgba(0, 0, 0, 0.8),
    0 0 0 4px #78350f;
  z-index: 5;
}

/* Screen Inner Bezel */
.screen-inner-bezel {
  background: #090d16;
  border-radius: 12px;
  padding: 20px;
  border: 2px solid #475569;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.9);
  position: relative;
}

/* 2x2 Video Display Grid */
.theater-video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  width: 100%;
}

/* Individual Video Display Card */
.video-card {
  position: relative;
  background: #1e293b;
  border-radius: 12px;
  overflow: hidden;
  border: 2.5px solid #475569;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

a.video-card,
a.video-card:hover,
a.video-card:focus,
a.video-card:visited,
a.video-card *,
a.video-card:hover *,
a.video-card:focus *,
a.video-card:visited * {
  text-decoration: none;
}

.video-card:hover {
  transform: translateY(-5px) scale(1.03);
  border-color: #ef4444;
  box-shadow: 0 14px 32px rgba(239, 68, 68, 0.4);
  z-index: 8;
}

.video-thumbnail-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  /* 16:9 Aspect Ratio */
  background: #0f172a;
  overflow: hidden;
}

.placeholder-wrapper {
  background: radial-gradient(circle at 50% 40%, #1e293b 0%, #0f172a 100%);
}

.placeholder-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px dashed rgba(245, 158, 11, 0.35);
  box-sizing: border-box;
}

.placeholder-label {
  font-family: var(--font-eng);
  font-size: 11px;
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: 2px;
  opacity: 0.85;
}

.video-thumbnail-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.video-card:hover .video-thumbnail-img {
  transform: scale(1.08);
  filter: brightness(1.1);
}

/* Glowing Play Button Overlay (YouTube Style) */
.play-btn-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 38px;
  background: rgba(239, 68, 68, 0.9);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease, box-shadow 0.3s ease;
}

.play-btn-icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 8px 14px;
  border-color: transparent transparent transparent #ffffff;
  margin-left: 2px;
}

.video-card:hover .play-btn-overlay {
  transform: translate(-50%, -50%) scale(1.15);
  background: #dc2626;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6);
}

/* Video Card Title Info Bar */
.video-card-info {
  padding: 10px 12px;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-decoration: none;
}

.video-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.5px;
  text-decoration: none;
}

.video-card-badge {
  font-size: 10.5px;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid #f59e0b;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
  text-decoration: none;
}

/* --- Theater Props & Decorations --- */
.theater-props-row {
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 16px;
  position: relative;
  z-index: 10;
  pointer-events: none;
}

/* Popcorn & Drink Bucket Prop (Bottom Left) */
.popcorn-prop-group {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  pointer-events: auto;
}

.popcorn-bucket-card {
  width: 90px;
  position: relative;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.3));
}

.popcorn-box {
  width: 100%;
  height: 85px;
  background: repeating-linear-gradient(90deg, #ef4444, #ef4444 14px, #ffffff 14px, #ffffff 28px);
  border: 2.5px solid #b91c1c;
  border-radius: 8px 8px 16px 16px;
  position: relative;
}

.popcorn-top-kernels {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 96%;
  height: 22px;
  background: radial-gradient(circle at 30% 30%, #fef08a 0%, #f59e0b 80%);
  border-radius: 14px 14px 4px 4px;
  border: 2px solid #d97706;
}

.drink-cup-card {
  width: 50px;
  height: 70px;
  background: repeating-linear-gradient(135deg, #3b82f6, #3b82f6 10px, #ffffff 10px, #ffffff 20px);
  border: 2px solid #1d4ed8;
  border-radius: 6px 6px 12px 12px;
  position: relative;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25));
}

.drink-straw {
  position: absolute;
  top: -16px;
  right: 12px;
  width: 5px;
  height: 22px;
  background: #ef4444;
  transform: rotate(15deg);
  border-radius: 2px;
}

/* Ticket Easel Sign & Balloons (Bottom Right) */
.easel-prop-group {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  pointer-events: auto;
}

.theater-easel-board {
  background: #78350f;
  border: 3px solid #b45309;
  border-radius: 12px;
  padding: 10px 14px;
  color: #fef3c7;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.easel-text-title {
  font-size: 11px;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.5px;
}

.easel-text-sub {
  font-size: 10px;
  color: #fde68a;
  margin-top: 3px;
}

/* --- Video Card Thumbnails & Platform Badges --- */
.video-thumb-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.video-card:hover .video-thumb-img {
  transform: scale(1.08);
  filter: brightness(1.1);
}

/* Platform Badge (YouTube & TikTok Tags) */
.platform-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 5;
}

.badge-yt {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.badge-tiktok {
  background: linear-gradient(135deg, #000000 0%, #1e1e1e 100%);
  border: 1.5px solid #00f2fe;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
}

/* TikTok Card Distinct Styling */
.tiktok-thumb-bg {
  background: radial-gradient(circle at 30% 30%, #1e293b 0%, #090d16 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tiktok-card-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
}

.tiktok-logo-img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
  animation: tiktokPulse 2s ease-in-out infinite alternate;
}

@keyframes tiktokPulse {
  0% {
    transform: scale(0.95);
  }

  100% {
    transform: scale(1.1);
  }
}

.tiktok-card-label {
  font-family: var(--font-jap);
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.video-card.card-tiktok:hover {
  border-color: #00f2fe;
  box-shadow: 0 14px 32px rgba(0, 242, 254, 0.35);
}

.badge-link {
  background: rgba(0, 242, 254, 0.2);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
}

/* --- Video Cinema Player Modal Overlay --- */
.video-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.video-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.video-modal-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(9, 13, 22, 0.88);
  backdrop-filter: blur(8px);
}

.video-modal-card {
  position: relative;
  width: 90%;
  max-width: 860px;
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border: 4px solid #fbbf24;
  border-radius: 20px;
  padding: 20px 24px 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(251, 191, 36, 0.3);
  z-index: 10;
  transform: scale(0.9);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.video-modal.is-open .video-modal-card {
  transform: scale(1);
}

.video-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  background: #ef4444;
  border: 2.5px solid #ffffff;
  border-radius: 50%;
  color: #ffffff;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s ease, background-color 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.video-modal-close:hover {
  transform: scale(1.12) rotate(90deg);
  background: #dc2626;
}

.video-modal-header {
  margin-bottom: 16px;
  padding-right: 44px;
  text-align: center;
}

.video-modal-title {
  font-family: var(--font-circus), 'Rye', cursive;
  font-size: 22px;
  color: #fbbf24;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.video-modal-body {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  /* 16:9 Aspect Ratio */
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #334155;
  background: #000000;
}

.video-modal-body iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Floating Balloons */
.theater-balloons {
  display: flex;
  gap: 6px;
  animation: floatBalloons 3s ease-in-out infinite alternate;
}

@keyframes floatBalloons {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-6px);
  }
}

.balloon {
  width: 28px;
  height: 36px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  box-shadow: inset -3px -3px 8px rgba(0, 0, 0, 0.2), 0 4px 10px rgba(0, 0, 0, 0.2);
}

.balloon-gold {
  background: linear-gradient(135deg, #fef08a 0%, #f59e0b 100%);
}

.balloon-blue {
  background: linear-gradient(135deg, #93c5fd 0%, #2563eb 100%);
}

/* Theater Popcorn Chibi Character (Truly Fixed at Bottom-Right of Screen) */
.theater-chibi-popcorn {
  position: fixed;
  bottom: 5%;
  right: 10%;
  z-index: 120;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.theater-chibi-img {
  width: 240px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
  animation: gentlePopcornBounce 2s ease-in-out infinite alternate;
}

@keyframes gentlePopcornBounce {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  100% {
    transform: translateY(-5px) rotate(1.5deg);
  }
}



.video-iframe-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  /* 16:9 Aspect Ratio */
  background: #000000;
}

.video-iframe-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ==========================================================================
   Media Queries (Grouped at Bottom per AGENTS.md rules)
   ========================================================================== */

/* --- 1. Mobile SP Breakpoint (max-width: 480px) --- */
@media (max-width: 480px) {
  .theater-container {
    padding: 48px 10% 90px;
    background: url('../assets/theater_stage_sp_bg.png') center center / cover no-repeat;
  }

  .theater-ribbon-banner {
    max-width: 320px;
  }

  .theater-title-curved {
    font-size: 34px;
  }

  .theater-stage-section {
    margin-top: 14px;
  }

  .theater-curtains-left,
  .theater-curtains-right {
    display: none;
  }

  .theater-screen-frame {
    border-width: 4px;
    padding: 12px;
    border-radius: 14px;
  }

  .screen-inner-bezel {
    padding: 10px;
    border-radius: 10px;
  }

  /* Single Column or 2-Col Compact Grid on SP */
  .theater-video-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .video-card-title {
    font-size: 12px;
  }

  .video-card-badge {
    font-size: 9.5px;
    padding: 2px 6px;
  }

  .theater-props-row {
    margin-top: 12px;
  }

  .popcorn-box {
    height: 65px;
  }

  .popcorn-bucket-card {
    width: 70px;
  }

  .drink-cup-card {
    width: 40px;
    height: 55px;
  }

  .theater-easel-board {
    padding: 6px 10px;
  }

  .easel-text-title {
    font-size: 9.5px;
  }

  .easel-text-sub {
    font-size: 8.5px;
  }

  .balloon {
    width: 22px;
    height: 28px;
  }

  .theater-chibi-popcorn {
    right: -8px;
  }

  .theater-chibi-img {
    width: 140px;
  }

  .video-modal-card {
    padding: 16px 16px 18px;
    width: 94%;
  }

  .video-modal-close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .video-modal-title {
    font-size: 16px;
  }
}

/* --- 2. Tablet Breakpoint (481px to 768px) --- */
@media (min-width: 481px) and (max-width: 768px) {
  .theater-stage-section {
    max-width: 600px;
  }

  .theater-curtains-left,
  .theater-curtains-right {
    width: 60px;
  }
}