/* ============================================
   FOD SHORT - 余韻画面プロトタイプ
   共通スタイル
   ============================================ */

/* CSS Variables - Design Tokens */
:root {
  /* Colors */
  --bg-overlay: rgba(19, 21, 28, 0.85);
  --bg-dark: #000000;
  --text-primary: #FFFFFF;
  --text-secondary: #D1D2D3;
  --btn-primary-gradient: linear-gradient(180deg, #C81E00 0%, #A0261A 100%);
  --btn-close-bg: #373C4A;
  --close-icon-color: rgba(255, 255, 255, 0.7);

  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-lg: 64px;

  /* Typography */
  --font-family: 'Hiragino Sans', 'Yu Gothic', 'Meiryo', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-size-sm: 12px;
  --font-size-base: 14px;
  --font-size-lg: 16px;
  --font-size-xl: 20px;
  --line-height: 160%;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: var(--font-family);
  background: var(--bg-dark);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  touch-action: manipulation;
}

/* Screen Container */
.screen {
  position: relative;
  width: 375px;
  height: 812px;
  margin: 0 auto;
  background: var(--bg-dark);
  overflow: hidden;
}

/* Background Overlay */
.overlay {
  position: absolute;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 1;
}

/* ============================================
   Close Button (右上)
   ============================================ */
.close-btn {
  position: absolute;
  top: 16px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: var(--btn-close-bg);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.close-btn svg {
  width: 18px;
  height: 18px;
  stroke: var(--close-icon-color);
  stroke-width: 2;
}

.close-btn:active {
  opacity: 0.8;
  transform: scale(0.95);
}

/* Close Button - 遅延表示 */
.close-btn-delayed {
  opacity: 0;
  pointer-events: none;
  animation: closeButtonFadeIn 0.5s ease forwards;
  animation-delay: 3s;
}

@keyframes closeButtonFadeIn {
  to {
    opacity: 1;
    pointer-events: auto;
  }
}

/* ============================================
   余韻画面 (Afterglow Screen)
   ============================================ */

/* Blurred Background */
.afterglow-screen {
  position: relative;
  overflow: hidden;
}

.afterglow-bg {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(30px) brightness(0.4);
  transform: scale(1.2);
  z-index: 1;
  animation: bgZoomIn 1.5s ease-out forwards;
}

@keyframes bgZoomIn {
  0% {
    transform: scale(1.5);
    filter: blur(50px) brightness(0.15);
  }
  100% {
    transform: scale(1.1);
    filter: blur(30px) brightness(0.45);
  }
}

.afterglow-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(0, 0, 0, 0.7) 100%
  );
  z-index: 2;
}

.afterglow-content {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: var(--spacing-lg);
  padding-top: 50px;
}

/* Emotional Messages */
.message-container {
  text-align: center;
  margin-bottom: var(--spacing-md);
}

.episode-count {
  font-size: 16px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 3px;
  margin-bottom: 12px;
  opacity: 0;
  transform: translateY(40px);
  animation: textSlideUp 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.5s;
}

.main-message {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  letter-spacing: 2px;
  opacity: 0;
  transform: translateY(50px);
  animation: textSlideUp 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.8s;
}

@keyframes textSlideUp {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* KV Carousel */
.kv-carousel-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--spacing-sm);
  opacity: 0;
  transform: translateY(60px) scale(0.9);
  animation: carouselEntrance 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 1.2s;
}

@keyframes carouselEntrance {
  0% {
    opacity: 0;
    transform: translateY(60px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.kv-carousel {
  width: 260px;
  height: 390px;
  overflow: visible; /* Allow fan effect to show */
  border-radius: 12px;
  position: relative;
}

.kv-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform-origin: center bottom;
}

.kv-slide.active {
  opacity: 1;
  transform: scale(1) rotate(0deg) translateX(0);
  z-index: 10;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* ===== Fan Entrance Animation ===== */
.kv-carousel.fan-entrance .kv-slide {
  transition: none;
  /* Override active state during entrance */
  opacity: 0;
  transform: none;
}

.kv-carousel.fan-entrance .kv-slide.active {
  opacity: 0;
  transform: none;
}

/* Show first 5 cards fanned out during entrance */
.kv-carousel.fan-entrance .kv-slide:nth-child(1) {
  opacity: 1;
  z-index: 10;
  animation: fanCard1 2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.kv-carousel.fan-entrance .kv-slide:nth-child(2) {
  opacity: 1;
  z-index: 9;
  animation: fanCard2 2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.kv-carousel.fan-entrance .kv-slide:nth-child(3) {
  opacity: 1;
  z-index: 8;
  animation: fanCard3 2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.kv-carousel.fan-entrance .kv-slide:nth-child(4) {
  opacity: 0.9;
  z-index: 7;
  animation: fanCard4 2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.kv-carousel.fan-entrance .kv-slide:nth-child(5) {
  opacity: 0.8;
  z-index: 6;
  animation: fanCard5 2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Fan out and STAY fanned (user swipe triggers collapse) */
@keyframes fanCard1 {
  0% {
    transform: scale(0.6) rotate(0deg) translateY(60px);
    opacity: 0;
  }
  100% {
    transform: scale(0.95) rotate(-1deg) translateX(-4px);
    opacity: 1;
  }
}

@keyframes fanCard2 {
  0% {
    transform: scale(0.6) rotate(0deg) translateY(60px);
    opacity: 0;
  }
  100% {
    transform: scale(0.88) rotate(5deg) translateX(35px);
    opacity: 1;
  }
}

@keyframes fanCard3 {
  0% {
    transform: scale(0.6) rotate(0deg) translateY(60px);
    opacity: 0;
  }
  100% {
    transform: scale(0.88) rotate(-5deg) translateX(-35px);
    opacity: 1;
  }
}

@keyframes fanCard4 {
  0% {
    transform: scale(0.6) rotate(0deg) translateY(60px);
    opacity: 0;
  }
  100% {
    transform: scale(0.82) rotate(9deg) translateX(65px);
    opacity: 0.85;
  }
}

@keyframes fanCard5 {
  0% {
    transform: scale(0.6) rotate(0deg) translateY(60px);
    opacity: 0;
  }
  100% {
    transform: scale(0.82) rotate(-9deg) translateX(-65px);
    opacity: 0.8;
  }
}

/* Smooth collapse transition when fan-entrance is removed */
.kv-carousel.fan-collapsing .kv-slide {
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.kv-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

/* KV Dots */
.kv-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.kv-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
}

.kv-dot.active {
  background: #fff;
  transform: scale(1.3);
}

/* Swipe Hint */
.swipe-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  opacity: 0;
  animation: hintFadeIn 0.8s ease forwards;
  animation-delay: 2.2s;
}

@keyframes hintFadeIn {
  to {
    opacity: 1;
  }
}

.swipe-arrow {
  font-size: 16px;
  animation: swipeArrowPulse 2s ease-in-out infinite;
}

.swipe-arrow:first-child {
  animation-delay: 0s;
}

.swipe-arrow:last-child {
  animation-delay: 1s;
}

@keyframes swipeArrowPulse {
  0%, 100% {
    opacity: 0.3;
    transform: translateX(0);
  }
  50% {
    opacity: 1;
    transform: translateX(-3px);
  }
}

.swipe-arrow:last-child {
  animation-name: swipeArrowPulseRight;
}

@keyframes swipeArrowPulseRight {
  0%, 100% {
    opacity: 0.3;
    transform: translateX(0);
  }
  50% {
    opacity: 1;
    transform: translateX(3px);
  }
}

/* Drama Title */
.drama-title {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  line-height: var(--line-height);
  margin-bottom: var(--spacing-md);
  padding: 0 var(--spacing-md);
  max-width: 311px;
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 2s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Save Button in Afterglow */
.afterglow-content .btn {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 2.3s;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  width: 311px;
  height: 48px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: var(--font-size-lg);
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s, transform 0.1s;
}

.btn:active {
  opacity: 0.8;
  transform: scale(0.98);
}

.btn-primary {
  background: var(--btn-primary-gradient);
  color: var(--text-primary);
}

.btn-icon {
  width: 24px;
  height: 24px;
  fill: var(--text-primary);
  stroke: var(--text-primary);
}

/* ============================================
   レコメンド画面 (Recommend Screen)
   ============================================ */
.recommend-content {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl);
}

.recommend-header {
  text-align: center;
  margin-bottom: var(--spacing-md);
}

.recommend-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--text-secondary);
  line-height: var(--line-height);
  margin-bottom: var(--spacing-sm);
}

/* Countdown Badge */
.countdown-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 56px;
  background: var(--bg-overlay);
  border-radius: var(--radius-sm);
}

.countdown-text {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--text-secondary);
}

/* Recommend KV */
.recommend-kv {
  width: 182px;
  height: 273px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: var(--spacing-md);
}

.recommend-kv img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #1a1c22;
}

/* Recommend Drama Title */
.recommend-drama-title {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  line-height: var(--line-height);
  margin-bottom: var(--spacing-lg);
  max-width: 311px;
}

/* Play Button */
.btn-play {
  margin-bottom: var(--spacing-xl);
}

/* Bottom Close Button */
.close-btn-bottom {
  position: relative;
  top: auto;
  right: auto;
  margin-top: var(--spacing-md);
}

/* ============================================
   Toast Notification
   ============================================ */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(55, 60, 74, 0.95);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-base);
  font-weight: 500;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 200;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   動画プレイヤー画面 (Player Screen)
   ============================================ */
.player-screen {
  background: var(--bg-dark);
}

.video-container {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-frame {
  width: 100%;
  height: 667px;
  object-fit: cover;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.gradient-upper {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(180deg, #000000 0%, rgba(0, 0, 0, 0) 100%);
  z-index: 5;
}

.gradient-lower {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 127px;
  background: linear-gradient(0deg, #000000 52.5%, rgba(0, 0, 0, 0) 100%);
  z-index: 5;
}

.player-controls {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 0 34px;
}

.player-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
}

.player-back-btn {
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.player-back-btn svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-primary);
}

.episode-info {
  flex: 1;
  text-align: center;
}

.episode-number {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--text-primary);
  text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.85);
}

.player-top-spacer {
  width: 44px;
}

.player-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.play-pause-btn {
  width: 80px;
  height: 80px;
  background: rgba(26, 28, 34, 0.7);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s, opacity 0.2s;
}

.play-pause-btn:active {
  transform: scale(0.95);
  opacity: 0.8;
}

.play-pause-btn svg {
  width: 32px;
  height: 32px;
  fill: var(--text-primary);
}

.play-pause-btn .icon-play {
  margin-left: 4px;
}

.player-bottom-bar {
  padding: 0 16px 20px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.current-time,
.duration {
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.85);
}

.seek-bar-container {
  padding: 8px 0;
}

.seek-bar {
  position: relative;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.seek-progress {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: #C81E00;
  border-radius: 2px;
  transition: width 0.1s linear;
}

.seek-handle {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 16px;
  height: 16px;
  background: var(--text-primary);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: left 0.1s linear;
}

.player-drama-title {
  position: absolute;
  bottom: 140px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  padding: 0 32px;
  z-index: 10;
}

/* End Roll Styles */
.endroll-container {
  background: #000000;
}

.endroll-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.endroll-scroll {
  text-align: center;
  animation: endrollScroll 7s ease-in-out forwards;
  animation-play-state: paused;
  padding-top: 300px;
  padding-bottom: 400px;
}

@keyframes endrollScroll {
  0% {
    transform: translateY(20%);
  }
  100% {
    transform: translateY(-15%);
  }
}

.endroll-section {
  margin-bottom: 48px;
}

.endroll-role {
  font-size: 12px;
  color: #888888;
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.endroll-name {
  font-size: 16px;
  color: #FFFFFF;
  margin-bottom: 4px;
  font-weight: 500;
}

.endroll-final {
  margin-top: 80px;
}

.endroll-title {
  font-size: 20px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.6;
  margin-bottom: 16px;
}

.endroll-episode {
  font-size: 14px;
  color: #AAAAAA;
  margin-bottom: 32px;
}

.endroll-fin-section {
  margin-top: 60px;
}

.endroll-fin {
  font-size: 18px;
  color: #FFFFFF;
  font-style: italic;
  letter-spacing: 4px;
}

/* ============================================
   ホーム画面 (Home Screen)
   ============================================ */
.home-screen {
  background: #1A1C22;
  display: flex;
  flex-direction: column;
}

.home-status-bar {
  height: 44px;
  flex-shrink: 0;
}

.home-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  flex-shrink: 0;
}

.home-logo {
  height: 24px;
  width: auto;
}

.home-logo-text {
  font-size: 18px;
  font-weight: 700;
  color: #C81E00;
  letter-spacing: 1px;
}

.home-content {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 16px;
  -webkit-overflow-scrolling: touch;
}

.home-section {
  margin-bottom: 24px;
}

.section-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.drama-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.drama-grid::-webkit-scrollbar {
  display: none;
}

.drama-card {
  flex: 0 0 auto;
  width: 110px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.drama-card:active {
  opacity: 0.8;
}

.drama-thumbnail {
  position: relative;
  width: 110px;
  height: 165px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 8px;
  background: #1a1c22;
}

.drama-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.completion-badge,
.episode-badge,
.new-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 2px;
}

.completion-badge {
  background: #C81E00;
  color: var(--text-primary);
}

.episode-badge {
  background: rgba(0, 0, 0, 0.7);
  color: var(--text-primary);
}

.new-badge {
  background: #FFD700;
  color: #000000;
}

.drama-card-title {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Home Navigation */
.home-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 0 24px;
  background: #13151C;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: 4px 12px;
}

.nav-item svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #666666;
}

.nav-item span {
  font-size: 10px;
  color: #666666;
}

.nav-item.active svg {
  stroke: var(--text-primary);
  fill: var(--text-primary);
}

.nav-item.active span {
  color: var(--text-primary);
}

/* ============================================
   ホーム画面 V2 (Figma Design)
   ============================================ */

/* Header V2 */
.home-header-v2 {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  flex-shrink: 0;
}

.search-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-icon {
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

.search-placeholder {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gift-btn {
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.gift-btn svg {
  width: 24px;
  height: 24px;
  stroke: rgba(255, 255, 255, 0.8);
}

/* Content V2 */
.home-content-v2 {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}

/* Hero Carousel Section */
.hero-carousel-section {
  padding: 16px 0 24px;
  overflow: hidden;
}

.hero-carousel {
  position: relative;
  height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  margin: 0 -40px;
}

.hero-slide {
  position: absolute;
  width: 280px;
  height: 420px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: scale(0.85) translateX(100%);
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1) translateX(0);
  z-index: 10;
  pointer-events: auto;
}

.hero-slide.prev {
  opacity: 0.6;
  transform: scale(0.85) translateX(-85%);
  z-index: 5;
}

.hero-slide.next {
  opacity: 0.6;
  transform: scale(0.85) translateX(85%);
  z-index: 5;
}

.hero-card {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-watch-btn {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: #C81E00;
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s, opacity 0.2s;
}

.hero-watch-btn:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.hero-watch-btn svg {
  width: 16px;
  height: 16px;
}

/* Hero Dots */
.hero-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.hero-dot {
  width: 24px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
}

.hero-dot.active {
  background: white;
  width: 32px;
}

/* Section V2 */
.home-section-v2 {
  padding: 0 16px;
  margin-bottom: 28px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-title-v2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

.section-arrow {
  width: 20px;
  height: 20px;
  stroke: rgba(255, 255, 255, 0.5);
}

/* Drama Grid V2 */
.drama-grid-v2 {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.drama-grid-v2::-webkit-scrollbar {
  display: none;
}

.drama-card-v2 {
  flex: 0 0 auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.drama-card-v2:active {
  opacity: 0.85;
  transform: scale(0.98);
}

.drama-thumbnail-v2 {
  position: relative;
  width: 120px;
  height: 170px;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1c22;
}

.drama-thumbnail-v2 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Badge Group */
.badge-group {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.badge-original {
  background: #0066CC;
  color: white;
}

.badge-top10 {
  background: #C81E00;
  color: white;
}

.badge-exclusive {
  background: #00A0E9;
  color: white;
}

.badge-new {
  background: #FFD700;
  color: #000000;
}

/* Navigation V2 */
.home-nav-v2 {
  position: relative;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding: 10px 0 30px;
  background: #13151C;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.nav-item-v2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: 4px 16px;
  position: relative;
}

.nav-item-v2 svg {
  width: 24px;
  height: 24px;
  stroke: #666666;
  fill: none;
}

.nav-item-v2 span {
  font-size: 10px;
  color: #666666;
}

.nav-item-v2.active svg {
  stroke: var(--text-primary);
  fill: var(--text-primary);
}

.nav-item-v2.active span {
  color: var(--text-primary);
}

/* Notification dot */
.has-notification {
  position: relative;
}

.has-notification::after {
  content: '';
  position: absolute;
  top: -8px;
  right: -6px;
  width: 8px;
  height: 8px;
  background: #C81E00;
  border-radius: 50%;
}

/* Home Indicator */
.home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

/* ============================================
   Responsive (Center on larger screens)
   ============================================ */
@media (min-width: 376px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #1a1c22;
  }

  .screen {
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    border-radius: 40px;
  }
}
