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

:root {
  --bg-primary: #003d15;
  --bg-secondary: #00591F;
  --bg-hover: #007a2b;
  --bg-chip: rgba(255, 180, 50, 0.12);
  --text-primary: #fff8f0;
  --text-secondary: #c9a882;
  --border-color: #0a7a35;
  --accent: #ff3b00;
  --gold: #ffd700;
  --gold-dark: #b8860b;
  --fire-orange: #ff6b00;
  --header-height: 56px;
  --footer-height: 72px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-pill: 20px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Kanit', 'Roboto', Arial, sans-serif;
  background: #001a0a;
  background-image:
    radial-gradient(ellipse at 50% -10%, rgba(20, 60, 40, 0.45) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 0%, rgba(0, 80, 30, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(0, 40, 15, 0.5) 0%, transparent 55%);
  background-attachment: fixed;
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  isolation: isolate;
}

/* Twinkling stars background */
.stars-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.star {
  position: absolute;
  border-radius: 50%;
  background: #fff8e7;
  box-shadow: 0 0 6px rgba(255, 215, 100, 0.85);
  animation-name: star-twinkle;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  will-change: opacity, transform;
}

.star.gold {
  background: #ffd700;
  box-shadow: 0 0 8px rgba(255, 200, 50, 0.9);
}

.star.warm {
  background: #ffe4b5;
  box-shadow: 0 0 7px rgba(255, 180, 80, 0.8);
}

@keyframes star-twinkle {
  0%,
  100% {
    opacity: 0.15;
    transform: scale(0.7);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

@media (prefers-reduced-motion: reduce) {
  .stars-bg {
    display: none;
  }
}

::selection {
  background: rgba(255, 107, 0, 0.35);
  color: #fff;
}

img {
  max-width: 100%;
  display: block;
}

button,
input {
  font-family: inherit;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(0, 61, 21, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
  gap: 12px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 169px;
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 32px;
  width: auto;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.15s;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--bg-hover);
}

.search-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 640px;
  min-width: 0;
}

.search-form {
  display: flex;
  flex: 1;
  height: 40px;
  min-width: 0;
}

.search-input {
  flex: 1;
  min-width: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-right: none;
  border-radius: 40px 0 0 40px;
  padding: 0 16px;
  color: var(--text-primary);
  font-size: 16px;
  outline: none;
  transition: border-color 0.15s;
}

.search-input:focus {
  border-color: var(--gold);
}

.search-input::placeholder {
  color: var(--text-secondary);
}

.search-btn {
  width: 64px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0 40px 40px 0;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.search-btn:hover {
  background: var(--bg-hover);
}

.search-form:focus-within .search-input,
.search-form:focus-within .search-btn {
  border-color: var(--gold);
}

.mic-btn {
  background: var(--bg-secondary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 169px;
  justify-content: flex-end;
  flex-shrink: 0;
}

.auth-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 8px;
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s, transform 0.15s, background 0.15s;
}

.auth-btn-signup {
  background: linear-gradient(135deg, var(--gold), var(--fire-orange));
  color: #003d15;
  border: 1px solid transparent;
}

.auth-btn-signup:hover {
  opacity: 0.92;
  transform: scale(1.02);
}

.auth-btn-login {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.auth-btn-login:hover {
  background: var(--bg-hover);
  border-color: var(--gold-dark);
}

.notification-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 500;
  padding: 1px 4px;
  border-radius: 10px;
  line-height: 1.2;
  min-width: 16px;
  text-align: center;
}

.avatar-btn {
  display: block;
  width: 32px;
  height: 32px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  margin-left: 8px;
  padding: 0;
  background: var(--bg-secondary);
  flex-shrink: 0;
  text-decoration: none;
  line-height: 0;
}

.avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Watch Page Layout */
.watch-container {
  display: flex;
  gap: 24px;
  max-width: 1720px;
  margin: var(--header-height) auto 0;
  padding: 24px 24px calc(var(--footer-height) + 48px);
}

.watch-primary {
  flex: 1;
  min-width: 0;
}

.watch-secondary {
  width: 402px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Player */
.player-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow:
    0 0 40px rgba(255, 107, 0, 0.25),
    0 4px 24px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 180, 50, 0.2);
}

.player-thumbnail {
  position: absolute;
  inset: 0;
  cursor: pointer;
  z-index: 2;
}

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

.player-thumbnail > a {
  display: block;
  width: 100%;
  height: 100%;
}

.thumb-top > a {
  pointer-events: auto;
  line-height: 0;
  flex-shrink: 0;
}

.thumbnail-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.55) 0%,
    transparent 30%,
    transparent 60%,
    rgba(0, 0, 0, 0.6) 100%
  );
  pointer-events: none;
}

.thumb-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
}

.thumb-channel-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--gold);
}

.thumb-channel-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.thumb-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.thumb-channel {
  font-size: 11px;
  color: #ddd;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.hot-badge {
  background: linear-gradient(135deg, #ff2200, #ff6600);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(255, 59, 0, 0.5);
  animation: hot-pulse 2s ease-in-out infinite;
}

@keyframes hot-pulse {
  0%,
  100% {
    box-shadow: 0 2px 8px rgba(255, 59, 0, 0.5);
  }
  50% {
    box-shadow: 0 2px 14px rgba(255, 107, 0, 0.8);
  }
}

.thumb-bottom {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}

.thumb-bottom::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: -60px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.92) 0%,
    rgba(0, 0, 0, 0.82) 40%,
    rgba(0, 0, 0, 0.45) 72%,
    transparent 100%
  );
  z-index: 0;
  pointer-events: none;
}

.thumb-cta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 440px;
  pointer-events: auto;
}

.cta-row {
  display: flex;
  gap: 8px;
}

.cta-btn {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  white-space: nowrap;
  background: linear-gradient(135deg, #00c853 0%, #00871f 55%, #005a17 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 14px rgba(0, 138, 43, 0.45);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}

.cta-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 6px 20px rgba(0, 200, 83, 0.5);
}

.cta-btn:active {
  transform: translateY(0);
}

.cta-btn-wide {
  width: auto;
  margin-left: -12px;
  margin-right: -12px;
  height: 46px;
  font-size: 15px;
  letter-spacing: 0.3px;
}

.cta-btn-green {
  background: linear-gradient(135deg, #00c853 0%, #00871f 55%, #005a17 100%);
  box-shadow: 0 4px 14px rgba(0, 138, 43, 0.45);
}

.cta-btn-green:hover {
  box-shadow: 0 6px 20px rgba(0, 200, 83, 0.55);
}

.cta-btn-orange {
  background: linear-gradient(135deg, #ffb020 0%, #ff6b00 55%, #ff3b00 100%);
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.45);
}

.cta-btn-orange:hover {
  box-shadow: 0 6px 20px rgba(255, 140, 0, 0.6);
}

.cta-btn-gold {
  background: linear-gradient(135deg, #ffd700 0%, #ff8c00 60%, #ff4d00 100%);
  color: #3a1e00;
  box-shadow: 0 4px 14px rgba(255, 140, 0, 0.45);
}

.cta-btn-gold:hover {
  box-shadow: 0 6px 20px rgba(255, 179, 0, 0.6);
}

.thumb-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-self: flex-start;
  gap: 16px;
  color: rgba(255, 255, 255, 0.85);
}

.watch-youtube {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.player-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  z-index: 1;
}

.player-wrapper.playing .player-thumbnail {
  display: none;
}

.player-wrapper.playing iframe,
.player-wrapper.playing iframe[hidden] {
  display: block !important;
}

/* Video Info */
.video-primary-info {
  margin-top: 12px;
}

.watch-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 12px;
  background: linear-gradient(90deg, var(--gold), #fff8f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: var(--gold);
}

.watch-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.channel-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.channel-avatar-lg {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--gold);
}

.channel-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.channel-name {
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-subs {
  font-size: 12px;
  color: var(--text-secondary);
}

.subscribe-btn {
  background: linear-gradient(135deg, var(--gold), var(--fire-orange));
  color: #003d15;
  border: 1px solid transparent;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-left: 12px;
  transition: opacity 0.15s, transform 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.subscribe-btn:hover {
  opacity: 0.92;
  transform: scale(1.02);
}

.subscribe-btn.subscribed {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--border-color);
  transform: none;
}

.action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid transparent;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.action-btn:hover {
  background: var(--bg-hover);
}

.action-btn.icon-only {
  padding: 8px;
}

.action-btn.liked {
  color: var(--gold);
  border-color: rgba(255, 215, 0, 0.35);
  background: rgba(255, 180, 50, 0.1);
}

/* Description */
.description-box {
  background: linear-gradient(135deg, var(--bg-secondary), #004a1a);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 24px;
  transition: background 0.15s;
}

.description-box:hover {
  background: linear-gradient(135deg, var(--bg-hover), #006628);
}

.description-stats {
  display: flex;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-primary);
  flex-wrap: wrap;
}

.description-text {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-line;
  max-height: 60px;
  overflow: hidden;
  color: var(--text-primary);
}

.description-box.expanded .description-text {
  max-height: none;
}

.show-more-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 4px;
  padding: 0;
}

.show-more-btn:hover {
  text-decoration: underline;
  color: var(--gold);
}

/* Channel row link reset */
.channel-row > a {
  flex-shrink: 0;
  line-height: 0;
  text-decoration: none;
}

/* FAQ Section */
.faq-section {
  margin-top: 8px;
}

.faq-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.faq-heading {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--gold), var(--fire-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: var(--gold);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: linear-gradient(135deg, var(--bg-secondary), #004a1a);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.15s, background 0.15s;
}

.faq-item[open] {
  border-color: rgba(255, 180, 50, 0.4);
}

.faq-item:hover {
  border-color: var(--gold-dark);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  cursor: pointer;
  list-style: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-q-text {
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}

.faq-chevron {
  flex-shrink: 0;
  color: var(--gold);
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 16px 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* Left Sidebar */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.sidebar-overlay:not([hidden]) {
  opacity: 1;
  pointer-events: auto;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  max-width: 85vw;
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  z-index: 210;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
}

.sidebar.open {
  transform: translateX(0);
}

body.sidebar-open {
  overflow: hidden;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--header-height);
  padding: 0 12px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.sidebar-nav {
  padding: 20px 16px;
  overflow-y: auto;
  flex: 1;
}

.sidebar-auth {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: background 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}

.sidebar-btn:hover {
  transform: translateY(-1px);
}

.sidebar-btn:active {
  transform: translateY(0);
}

.sidebar-btn-register {
  background: linear-gradient(135deg, var(--fire-orange), var(--accent));
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(255, 59, 0, 0.35);
}

.sidebar-btn-register:hover {
  box-shadow: 0 6px 18px rgba(255, 59, 0, 0.45);
}

.sidebar-btn-login {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--gold);
}

.sidebar-btn-login:hover {
  background: rgba(255, 215, 0, 0.12);
}

/* Related Videos Sidebar */
.related-card {
  display: flex;
  gap: 8px;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.related-card:hover {
  background: var(--bg-hover);
}

.related-card.active {
  background: rgba(255, 180, 50, 0.08);
  border-color: rgba(255, 180, 50, 0.2);
}

.related-thumb {
  position: relative;
  width: 168px;
  flex-shrink: 0;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-secondary);
  box-shadow: 0 2px 8px rgba(255, 107, 0, 0.15);
}

.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.related-thumb > a {
  display: block;
  width: 100%;
  height: 100%;
}

.related-card:hover .related-thumb img {
  transform: scale(1.04);
}

.related-thumb .duration {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 4px;
  border-radius: 4px;
  line-height: 1.2;
}

.related-info {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.related-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.related-card.active .related-title {
  color: var(--gold);
}

.related-channel,
.related-meta {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Bottom Footer Nav */
.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  height: var(--footer-height);
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 55%, var(--bg-hover) 100%);
  border-top: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--fire-orange), var(--gold), var(--fire-orange)) 1;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.45);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.footer-nav {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 4px;
  max-width: 720px;
  height: var(--footer-height);
  margin: 0 auto;
  padding: 0 8px;
}

.footer-item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  text-decoration: none;
  color: var(--text-primary);
  border-radius: var(--radius-md);
  transition: background 0.15s, transform 0.15s;
}

.footer-item:hover {
  background: rgba(255, 180, 50, 0.12);
  transform: translateY(-2px);
}

.footer-item:active {
  transform: translateY(0);
}

.footer-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--gold);
  background: var(--bg-secondary);
  box-shadow: 0 2px 8px rgba(255, 107, 0, 0.3);
  line-height: 0;
}

.footer-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.footer-label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* Responsive */
@media (max-width: 1000px) {
  .watch-container {
    flex-direction: column;
    padding: 16px;
  }

  .watch-secondary {
    width: 100%;
  }

  .watch-actions-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .action-buttons {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
  }

  .action-buttons::-webkit-scrollbar {
    height: 4px;
  }

  .action-buttons::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
  }
}

@media (max-width: 768px) {
  .search-container {
    display: none;
  }

  .header-left,
  .header-right {
    min-width: auto;
  }

  .auth-buttons {
    margin-right: 4px;
    gap: 6px;
  }

  .auth-btn {
    height: 32px;
    padding: 0 10px;
    font-size: 12px;
  }

  .header-right .icon-btn {
    display: none;
  }

  .header {
    padding: 0 8px;
  }

  .watch-container {
    padding: 12px 12px 32px;
    gap: 16px;
  }

  .player-wrapper {
    border-radius: var(--radius-sm);
  }

  .watch-title {
    font-size: 18px;
  }

  .related-thumb {
    width: 140px;
  }

  .channel-row {
    width: 100%;
  }

  .subscribe-btn {
    margin-left: auto;
  }

  .faq-question {
    font-size: 14px;
    padding: 14px;
  }

  .footer-nav {
    gap: 0;
    padding: 0 4px;
  }

  .footer-item {
    padding: 8px 2px;
    gap: 3px;
  }

  .footer-label {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .auth-btn {
    padding: 0 8px;
    font-size: 11px;
  }

  .thumb-title {
    font-size: 11px;
  }

  .hot-badge {
    font-size: 10px;
    padding: 2px 6px;
  }

  .thumb-bottom {
    gap: 8px;
    padding: 10px;
  }

  .cta-btn {
    height: 38px;
    font-size: 13px;
    padding: 0 8px;
    gap: 4px;
  }

  .cta-btn svg {
    width: 15px;
    height: 15px;
  }

  .cta-btn-wide {
    height: 40px;
    font-size: 13px;
  }

  .related-thumb {
    width: 120px;
  }

  .related-title {
    font-size: 13px;
  }

  .watch-title {
    font-size: 16px;
  }

  .channel-avatar-lg {
    width: 36px;
    height: 36px;
  }

  .footer-icon {
    width: 30px;
    height: 30px;
    border-width: 1.5px;
  }

  .footer-label {
    font-size: 10px;
  }
}

@media (min-width: 1400px) {
  .watch-secondary {
    width: 440px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hot-badge {
    animation: none;
  }
}
