:root,
[data-theme="dark"],
[data-theme="light"] {
  --bg-base: #0b0710;
  --bg-surface: rgba(20, 15, 26, 0.6);
  --bg-footer: #08050c;

  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;

  --accent: #f43f5e;
  --accent-hover: #a855f7;
  --accent-text: #ffffff;
  --accent-gradient: linear-gradient(135deg, #a855f7 0%, #f43f5e 100%);
  --accent-light: rgba(244, 63, 94, 0.1);

  --border-color: rgba(255, 255, 255, 0.06);
  --nav-bg: rgba(11, 7, 16, 0.75);
  --glass-border: rgba(255, 255, 255, 0.08);

  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);

  --glow-1: rgba(168, 85, 247, 0.15);
  --glow-2: rgba(244, 63, 94, 0.15);

  --progress-bg: rgba(255, 255, 255, 0.1);
  --overlay-bg: rgba(11, 7, 16, 0.9);
  --controls-bg: linear-gradient(
    to top,
    rgba(11, 7, 16, 0.95) 0%,
    rgba(11, 7, 16, 0.5) 70%,
    transparent 100%
  );

  --neon-pink: #f43f5e;
  --neon-purple: #a855f7;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
body {
  font-family: "Noto Sans", sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  transition:
    background-color 0.5s ease,
    color 0.5s ease;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  cursor: pointer;
}
#password-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: rgba(11, 7, 16, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  justify-content: center;
  align-items: center;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}
#password-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.pw-modal {
  background: var(--bg-surface);
  padding: 32px 24px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  text-align: center;
  width: 90%;
  max-width: 360px;
  transform: scale(1);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#password-overlay.hidden .pw-modal {
  transform: scale(0.95);
}
.pw-icon {
  margin-bottom: 16px;
  animation: bounceLock 2.5s ease-in-out infinite;
  display: inline-block;
  color: var(--accent);
}
@keyframes bounceLock {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}
.pw-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}
.pw-question-box {
  background: rgba(0, 0, 0, 0.2);
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-bottom: 20px;
}
.pw-question-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.pw-question-text {
  font-size: 15px;
  color: var(--accent);
  font-weight: 600;
  line-height: 1.4;
}
#pw-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-primary);
  font-family: "Noto Sans", sans-serif;
  font-size: 15px;
  outline: none;
  transition: all 0.2s;
  text-align: center;
  font-weight: 600;
}
#pw-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.pw-btn {
  margin-top: 16px;
  width: 100%;
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.2);
  transition: all 0.2s ease;
}
.pw-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(244, 63, 94, 0.3);
}
.pw-error {
  color: #ef4444;
  font-size: 13px;
  margin-top: 12px;
  font-weight: 500;
  min-height: 20px;
}
.shake {
  animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
@keyframes shake {
  10%,
  90% {
    transform: translate3d(-2px, 0, 0);
  }
  20%,
  80% {
    transform: translate3d(3px, 0, 0);
  }
  30%,
  50%,
  70% {
    transform: translate3d(-4px, 0, 0);
  }
  40%,
  60% {
    transform: translate3d(4px, 0, 0);
  }
}
header {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 1200px;
  height: 60px;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: all 0.4s ease;
}
.nav-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.3px;
}
.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
}
.nav-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 16px;
  border-radius: 100px;
  border: 1px solid var(--border-color);
}
.theme-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.theme-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}
.cl-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.cl-bell-icon {
  transform-origin: top center;
}
.cl-bell-icon.ringing {
  animation: bellRing 2.5s ease-in-out infinite;
  color: var(--text-primary);
}
@keyframes bellRing {
  0%,
  100% {
    transform: rotate(0);
  }
  5%,
  15%,
  25% {
    transform: rotate(12deg);
  }
  10%,
  20% {
    transform: rotate(-12deg);
  }
  30% {
    transform: rotate(0);
  }
}
.cl-badge {
  position: absolute;
  top: 2px;
  right: 4px;
  background: var(--accent);
  color: white;
  font-size: 9px;
  font-weight: 800;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  transition:
    transform 0.2s,
    opacity 0.2s;
}
.cl-badge.hidden {
  opacity: 0;
  transform: scale(0);
}
.cl-popup {
  position: absolute;
  top: 55px;
  right: 0;
  width: 320px;
  max-height: calc(100vh - 100px);
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1001;
  opacity: 1;
  transform: translateY(0);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.cl-popup.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  pointer-events: none;
}
.cl-header {
  padding: 16px;
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.cl-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 320px;
}
.cl-body::-webkit-scrollbar {
  width: 4px;
}
.cl-body::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
.cl-item {
  font-size: 13px;
  color: var(--text-secondary);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  line-height: 1.5;
  animation: chatFadeIn 0.3s ease;
}
.cl-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.cl-date {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
  font-size: 11px;
  display: inline-block;
  background: var(--accent-light);
  padding: 4px 10px;
  border-radius: 6px;
}
.cl-msg {
  color: var(--text-primary);
}
#timelinePopup {
  position: absolute;
  top: 45px;
  right: 0;
  width: 260px;
  max-height: calc(100vh - 100px);
}
#timelineBody {
  padding: 12px;
  gap: 12px;
  flex: 1;
}
#timelineBody .cl-item {
  padding-bottom: 12px;
}
.player-container {
  max-width: 1600px;
  margin: 110px auto 40px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 320px 1fr 340px;
  gap: 24px;
  align-items: stretch;
}
.playlist-card,
.video-card {
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}
.playlist-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: calc(100vh - 150px);
}
.video-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 150px);
}
.video-wrapper {
  position: relative;
  flex-grow: 1;
  width: 100%;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-sm);
  z-index: 10;
}
.yt-title-blocker,
.mobile-chat-gradient {
  display: none;
}
.video-info {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  min-width: 0;
}
.video-title-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition:
    opacity 0.3s,
    visibility 0.3s;
  min-width: 0;
  flex: 1;
}
.mobile-pill-title {
  display: none;
}
.video-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  line-height: 1.4;
}
#real-time-clock {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  display: none;
}
.action-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
  margin-left: 16px;
}
.download-btn {
  background: var(--bg-surface);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
  cursor: pointer;
}
.download-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-muted);
}
.custom-visit-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border-color);
  cursor: default;
}
.custom-visit-badge .badge-label {
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-secondary);
  padding: 6px 12px;
}
.custom-visit-badge .badge-number {
  background: var(--accent-light);
  color: var(--accent);
  padding: 6px 12px;
  font-weight: 700;
}
.right-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: calc(100vh - 150px);
}
.gift-card,
.comment-card {
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.gift-card {
  flex: 3;
  padding: 16px;
}
.comment-card {
  flex: 7;
  padding: 16px 20px;
}
.gift-card h3,
.comment-card h3 {
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.gift-card h3 {
  font-size: 13px;
  margin-bottom: 12px;
  color: var(--text-secondary);
}
.gift-card h3 svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}
.comment-card h3 {
  font-size: 15px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}
.comment-card h3 svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}
.gift-list,
.comment-list {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding-right: 6px;
  flex-grow: 1;
  height: 100%;
}
.gift-list {
  gap: 10px;
}
.comment-list {
  gap: 16px;
}
.gift-list::-webkit-scrollbar,
.comment-list::-webkit-scrollbar {
  width: 4px;
}
.gift-list::-webkit-scrollbar-thumb,
.comment-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
.comment-item {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  transition:
    transform 0.2s,
    background 0.2s;
  animation: chatFadeIn 0.3s ease;
  border: 1px solid transparent;
}
.comment-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-color);
  transform: translateX(4px);
}
@keyframes chatFadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
  object-fit: cover;
}
.comment-body {
  flex-grow: 1;
  min-width: 0;
}
.comment-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.comment-name {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 13px;
}
.comment-text {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.sys-msg {
  color: var(--text-muted);
  font-size: 13px;
  font-style: italic;
  text-align: center;
  padding: 16px 0;
}
.badge-container {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
  margin-right: 2px;
  flex-shrink: 0;
}
.tt-badge {
  display: inline-flex;
  align-items: center;
  height: 16px;
  border-radius: 4px;
  padding: 0 4px;
  flex-shrink: 0;
}
.badge-icon {
  height: 10px;
  width: auto;
  margin-right: 4px;
}
.badge-text {
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.5px;
}

.gift-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 12px 6px 6px;
  border-radius: 50px;
  border: 1px solid var(--border-color);
  gap: 10px;
  animation: slideInRight 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  transition: opacity 0.3s ease;
  width: 100%;
}
@keyframes slideInRight {
  from {
    transform: translateX(15px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
.gift-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.gift-avt {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
  object-fit: cover;
}
.gift-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.g-user-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  width: 100%;
  min-width: 0;
}
.g-user {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.g-info {
  font-size: 11px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.g-info b {
  font-weight: 600;
  color: var(--accent);
}
.gift-icon-inline {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}
.combo-text {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
  flex-shrink: 0;
}
@keyframes comboPop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2) rotate(-5deg);
  }
  100% {
    transform: scale(1) rotate(0);
  }
}

.playlist-header-wrapper {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.playlist-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.desktop-playlist-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.mobile-landscape-brand {
  display: none;
}
.badge-count {
  background: var(--accent-light);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}
.search-container {
  position: relative;
  width: 100%;
}
.search-input {
  width: 100%;
  padding: 10px 16px 10px 38px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-primary);
  font-family: "Noto Sans", sans-serif;
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
}
.search-input:focus {
  border-color: var(--text-muted);
  background: rgba(0, 0, 0, 0.5);
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  width: 14px;
  height: 14px;
}
.playlist-items {
  flex-grow: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.playlist-items::-webkit-scrollbar {
  width: 4px;
}
.playlist-items::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
.playlist-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  background: transparent;
}
.playlist-item:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--border-color);
  transform: translateX(4px);
}
.playlist-item.active {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}
.playlist-item.active .item-title {
  color: var(--text-primary);
  font-weight: 600;
}
.item-thumb {
  width: 72px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  opacity: 0.8;
  transition: 0.3s;
}
.playlist-item.active .item-thumb {
  opacity: 1;
  border: 1px solid var(--border-color);
}
.item-icon {
  width: 72px;
  height: 40px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: 0.3s;
}
.playlist-item.active .item-icon {
  background: var(--accent-light);
  color: var(--accent);
  border-color: transparent;
}
.item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  word-break: break-word;
  line-height: 1.4;
  transition: 0.2s;
}
.no-results {
  text-align: center;
  color: var(--text-muted);
  padding: 20px;
  font-size: 13px;
  font-style: italic;
}

.ext-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100000;
  opacity: 1;
  transition: all 0.3s ease;
}
.ext-modal-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.ext-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 90%;
  max-width: 650px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(0) scale(1);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.ext-modal-overlay.hidden .ext-modal {
  transform: translateY(20px) scale(0.98);
}
.ext-modal-header {
  display: flex;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
}
.ext-modal-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ext-modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 0.2s;
}
.ext-modal-close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}
.ext-modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: 80vh;
  overflow-y: auto;
}
.ext-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.ext-card {
  background: rgba(0, 0, 0, 0.2);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: 0.3s;
}
.ext-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}
.ext-card h3 {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
}
.ext-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex-grow: 1;
}
.ext-card p b {
  color: var(--accent);
}
.ext-dl-btn {
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  transition: 0.2s;
}
.ext-dl-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}
.ext-dl-btn.disabled-btn {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
  cursor: not-allowed;
  pointer-events: none;
}
.ext-guide {
  background: rgba(0, 0, 0, 0.2);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}
.ext-guide h4 {
  margin-bottom: 12px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
}
.ext-guide ol {
  padding-left: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
}
.ext-guide code {
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-primary);
  font-family: monospace;
  border: 1px solid var(--border-color);
}

.player-container:fullscreen,
.player-container:-webkit-full-screen {
  max-width: none;
  width: 100vw;
  margin: 0;
  padding: 16px;
  gap: 16px;
  background-color: #000;
  height: 100vh;
  border-radius: 0;
  overflow: hidden;
}
.player-container:fullscreen .playlist-card,
.player-container:-webkit-full-screen .playlist-card {
  height: calc(100vh - 32px);
}
.player-container:fullscreen .right-column,
.player-container:-webkit-full-screen .right-column {
  height: calc(100vh - 32px);
  gap: 16px;
}
.player-container:fullscreen .video-card,
.player-container:-webkit-full-screen .video-card {
  height: calc(100vh - 32px);
  padding: 0;
  background: #000;
  border: none;
}
.player-container:fullscreen .video-wrapper,
.player-container:-webkit-full-screen .video-wrapper {
  height: 100%;
  border-radius: 16px;
}
.player-container:fullscreen .yt-title-blocker,
.player-container:-webkit-full-screen .yt-title-blocker {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.8) 0%,
    transparent 100%
  );
  z-index: 15;
  pointer-events: none;
}
.player-container:fullscreen .video-info,
.player-container:-webkit-full-screen .video-info {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 20;
  margin: 0;
  padding: 0;
}
.player-container:fullscreen .action-badges,
.player-container:-webkit-full-screen .action-badges,
.player-container:fullscreen .video-title,
.player-container:-webkit-full-screen .video-title {
  display: none;
}
.player-container:fullscreen .mobile-pill-title,
.player-container:-webkit-full-screen .mobile-pill-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 50px;
  padding: 4px 14px 4px 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: auto;
}
.player-container:fullscreen .pill-avatar,
.player-container:-webkit-full-screen .pill-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.player-container:fullscreen .pill-text,
.player-container:-webkit-full-screen .pill-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
}
.player-container:fullscreen .pill-main,
.player-container:-webkit-full-screen .pill-main {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
.player-container:fullscreen .pill-sub,
.player-container:-webkit-full-screen .pill-sub {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
}
.player-container:fullscreen #real-time-clock,
.player-container:-webkit-full-screen #real-time-clock {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin-left: 12px;
  margin-top: 6px;
  display: block !important;
}

.k-loading-overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.4s ease,
    visibility 0.4s;
}
.k-loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
#statusOverlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  padding: 20px;
  opacity: 1;
  transition:
    opacity 0.4s ease,
    visibility 0.4s;
}
#statusOverlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
#statusOverlay h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
#statusOverlay p {
  font-size: 13px;
  color: var(--text-secondary);
}
.k-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--text-secondary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.k-loading-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.5px;
}
.k-gradient-text {
  color: var(--text-primary);
  margin-right: 4px;
}
.k-dots span {
  display: inline-block;
  animation: bounce 1.4s infinite ease-in-out both;
  color: var(--text-muted);
}
.k-dots span:nth-child(1) {
  animation-delay: -0.32s;
}
.k-dots span:nth-child(2) {
  animation-delay: -0.16s;
}
@keyframes bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1.2);
  }
}

.k-center-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 64px;
  height: 64px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  color: #fff;
  transition:
    transform 0.3s ease,
    background 0.3s,
    opacity 0.4s ease,
    visibility 0.4s;
}
.k-loading-overlay:not(.hidden) ~ .k-center-play,
.video-wrapper.is-playing .k-center-play {
  transform: translate(-50%, -50%) scale(1.5);
  opacity: 0;
  visibility: hidden;
}
.k-center-play:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: translate(-50%, -50%) scale(1.05);
}
.k-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--controls-bg);
  padding: 30px 20px 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 25;
}
.video-wrapper:not(.ui-active) .k-controls {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(20px);
  transition:
    transform 0.4s ease,
    opacity 0.3s,
    visibility 0.3s;
}
.video-wrapper.ui-active .k-controls {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition:
    transform 0.4s ease,
    opacity 0.3s;
}
.k-progress-slider {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  background: var(--progress-bg);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  transition: height 0.2s;
  margin-bottom: 8px;
}
.k-progress-slider:hover {
  height: 6px;
}
.k-progress-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  transform: scale(0);
}
.k-progress-slider:hover::-webkit-slider-thumb {
  transform: scale(1);
}
.k-buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.k-left-btns,
.k-right-btns {
  display: flex;
  align-items: center;
  gap: 16px;
}
button.k-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    color 0.2s,
    opacity 0.2s;
  opacity: 0.8;
}
button.k-btn:hover {
  opacity: 1;
  color: #fff;
}
.k-time {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  user-select: none;
  font-variant-numeric: tabular-nums;
}
.k-volume-container {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  width: 24px;
  transition: width 0.3s ease;
}
.k-volume-container:hover {
  width: 90px;
}
.k-volume-slider {
  width: 50px;
  height: 4px;
  -webkit-appearance: none;
  background: var(--progress-bg);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.k-volume-container:hover .k-volume-slider {
  opacity: 1;
}
.k-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}
.startup-overlay {
  position: absolute;
  inset: 0;
  z-index: 15;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.5s ease,
    visibility 0.5s;
}
.startup-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.startup-content {
  text-align: center;
  position: relative;
  z-index: 2;
  opacity: 0.5;
}
.startup-brand {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  display: block;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.startup-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}

#joinLog {
  font-size: 11px;
  color: var(--text-muted);
  background: transparent;
  padding: 4px 0;
  text-align: left;
  min-height: 20px;
  opacity: 0;
  transition: opacity 0.3s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
  border: none;
}
#joinLog.hidden-by-user,
.comment-card.hidden-by-user,
.gift-card.hidden-by-user {
  display: none !important;
}
.viewer-count-display {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 8px;
  border-radius: 6px;
  margin-left: 12px;
  vertical-align: middle;
  border: 1px solid var(--border-color);
}
.pill-sub .viewer-count-display {
  font-size: 9px;
  padding: 2px 6px;
  margin-left: 6px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-secondary);
  border-radius: 4px;
  border: none;
}
#interaction-shield {
  position: absolute;
  inset: 0;
  z-index: 12;
  cursor: pointer;
}

.top-right-actions {
  position: absolute;
  top: 65px;
  right: 20px;
  display: flex;
  gap: 10px;
  z-index: 30;
  pointer-events: auto;
}
.top-right-actions .k-btn {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  color: var(--text-secondary);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
}
.top-right-actions .k-btn:hover {
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.1);
}
#chatToggleBarBtn {
  display: none;
}
.translated-text {
  font-size: 12px;
  font-style: italic;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
  padding: 8px;
  margin-top: 6px;
  border-radius: 6px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
  border: 1px solid var(--border-color);
}
.translated-text svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--text-muted);
}

@media (max-width: 991px) and (orientation: portrait) {
  .cl-popup {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: 92vw;
    max-width: 360px;
    right: auto;
  }
  .cl-popup.hidden {
    transform: translate(-50%, -10px);
  }
  #timelinePopup.cl-popup {
    position: absolute;
    top: 40px;
    left: auto;
    right: 0;
    transform: translateY(0);
    width: 220px;
    max-width: 85vw;
  }
  header {
    height: 54px;
    top: 12px;
    width: calc(100% - 24px);
  }
  .nav-title,
  #openExtModalBtn {
    display: none;
  }
  .player-container {
    display: flex;
    flex-direction: column;
    margin-top: 80px;
    padding: 0 12px;
    gap: 16px;
  }
  .video-card {
    order: 1;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: none;
    height: auto;
  }
  .right-column {
    order: 2;
    height: auto;
    gap: 16px;
  }
  .playlist-card {
    order: 3;
    max-height: 500px;
    height: auto;
    border-radius: 16px;
  }
  .video-wrapper {
    height: 100vh;
    border-radius: 12px;
  }

  .mobile-chat-gradient {
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.8) 0%,
      transparent 100%
    );
    z-index: 15;
    pointer-events: none;
  }
  .video-wrapper .video-title-container {
    position: absolute;
    top: 0;
    left: 12px;
    right: 12px;
    z-index: 20;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    pointer-events: none;
    margin-top: 12px;
  }
  .video-wrapper .video-title {
    display: none;
  }
  .video-wrapper .mobile-pill-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    border-radius: 50px;
    padding: 4px 12px 4px 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 12px;
  }
  .video-wrapper .pill-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
  }
  .video-wrapper .pill-main {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
  }
  .video-wrapper .pill-sub {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.6);
  }
  .video-wrapper #real-time-clock {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    margin-left: 0 !important;
    margin-top: 0 !important;
    white-space: nowrap;
  }
  .video-wrapper .comment-card {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 35%;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 12px;
    z-index: 20;
    pointer-events: none;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .video-wrapper .comment-card h3 {
    display: none;
  }
  .video-wrapper .comment-list {
    justify-content: flex-end;
    padding-right: 0;
  }
  .video-wrapper .comment-item {
    background: transparent;
    border: none;
    padding: 2px 0;
    gap: 8px;
  }
  .video-wrapper .comment-avatar {
    width: 19px;
    height: 19px;
    font-size: 8px;
  }
  .video-wrapper .comment-name {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
  }
  .video-wrapper .comment-text {
    font-size: 11px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    line-height: 1.1 !important;
    margin-top: 0 !important;
    margin-bottom: 2px !important;
  }
  .video-wrapper .gift-card {
    position: absolute;
    top: 65px;
    bottom: auto;
    left: 0;
    width: 100%;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 12px;
    z-index: 20;
    pointer-events: none;
    height: 120px;
    justify-content: flex-start;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .video-wrapper .gift-card h3 {
    display: none;
  }
  .video-wrapper .gift-row {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    backdrop-filter: none !important;
    padding: 2px 0;
    max-width: 70vw;
  }
  .video-wrapper .gift-avt {
    width: 18px;
    height: 18px;
  }
  .video-wrapper .combo-text {
    font-size: 12px;
  }
  .video-wrapper .g-user {
    font-size: 9px;
    color: #fff;
  }
  .video-wrapper .g-info {
    font-size: 8px;
    color: rgba(255, 255, 255, 0.8);
  }
  .video-wrapper #joinLog {
    position: absolute;
    top: 60px;
    bottom: auto;
    left: 12px;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    color: rgba(255, 255, 255, 0.8);
    font-size: 9px;
    z-index: 20;
  }
  .video-info {
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
    background: var(--bg-surface);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
  }
  .action-badges {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }
  .download-btn {
    flex: 1;
    justify-content: center;
  }

  .top-right-actions {
    top: 55px;
    right: 12px;
  }
  #chatToggleBarBtn {
    display: flex;
  }
}
@media (max-width: 1250px) and (orientation: landscape) {
  .player-container {
    grid-template-columns: 240px 1fr 280px;
    gap: 16px;
    padding: 0 16px;
    margin-top: 85px;
  }
  header {
    width: calc(100% - 32px);
    height: 50px;
    top: 12px;
  }
  .nav-title {
    display: none;
  }
  .playlist-card,
  .video-card,
  .right-column {
    height: calc(100vh - 110px);
    border-radius: 16px;
  }
  .video-card {
    padding: 12px;
  }
  .video-info {
    display: none;
  }
  .yt-title-blocker {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.6) 0%,
      transparent 100%
    );
    z-index: 15;
    pointer-events: none;
  }
  .video-title-container {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 20;
  }
  .video-title {
    display: none;
  }
  .mobile-pill-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    border-radius: 50px;
    padding: 4px 12px 4px 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: auto;
  }
  .pill-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
  }
  .pill-main {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
  }
  .pill-sub {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.6);
  }
  #real-time-clock {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    display: block !important;
    margin-left: 12px;
    margin-top: 4px;
  }
  .top-right-actions {
    top: 12px;
    right: 12px;
  }
  .playlist-header-wrapper {
    padding: 16px;
  }
  .item-thumb,
  .item-icon {
    width: 56px;
    height: 32px;
  }
  .item-title {
    font-size: 11px;
  }
  .gift-card,
  .comment-card {
    padding: 12px;
  }
  .comment-avatar {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }
  .comment-text,
  .comment-name {
    font-size: 12px;
  }
}

@media (min-width: 992px) {
  .player-container.my-custom-fullscreen #main-player {
    transform: scale(1.55);
  }
}

#main-player {
  transition: transform 0.3s ease;
  overflow: hidden;
}

.nav-title.minimalist-glow {
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  position: relative;
}

.nav-title.minimalist-glow::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 2px;
  opacity: 0.7;
  box-shadow: 0 0 10px var(--glow-2);
}

.minimalist-glow .ks-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.minimalist-glow .r18-accent {
  font-size: 15px;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 12px var(--glow-2);
}
