/* =========================================================
   YouTube Dark Mode (#0f0f0f) - Complete Style Sheet
   Typography, Colors & Components matching YouTube UI
   ========================================================= */

:root {
  --bg-primary: #0f0f0f;
  --bg-secondary: #121212;
  --bg-tertiary: #212121;
  --bg-card: #181818;
  --bg-hover: #272727;
  --bg-active: #3f3f3f;
  --border-color: #272727;
  --border-light: #383838;
  --text-primary: #f1f1f1;
  --text-secondary: #aaaaaa;
  --text-muted: #717171;
  --accent-red: #ff0000;
  --accent-blue: #3ea6ff;
  --accent-green: #2ba640;
  --accent-amber: #fbc02d;
  --sidebar-width: 240px;
  --sidebar-collapsed: 72px;
  --topbar-height: 56px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  --font-stack: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

*::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

body {
  font-family: var(--font-stack);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.4;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
  font-size: 14px;
}

input, textarea, select {
  font-family: inherit;
  color: var(--text-primary);
}

.hidden {
  display: none !important;
}

.mt-2 {
  margin-top: 8px;
}

/* =========================================================
   TOP BAR (HEADER)
   ========================================================= */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-height);
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-primary);
  transition: var(--transition);
}

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

.logo-container {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
  user-select: none;
}

.logo-badge {
  display: flex;
  align-items: center;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.8px;
  color: #fff;
  margin-left: 2px;
}

.logo-country {
  font-size: 10px;
  color: var(--text-muted);
  vertical-align: super;
  margin-top: -8px;
  margin-left: 2px;
  font-weight: 500;
}

/* Center Search Box */
.top-bar-center {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 1 732px;
  justify-content: center;
}

.search-box {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 600px;
  height: 40px;
  background-color: #121212;
  border: 1px solid #303030;
  border-radius: 40px 0 0 40px;
  overflow: hidden;
  transition: var(--transition);
}

.search-box:focus-within {
  border-color: #1c62b9;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  flex: 1;
  padding: 0 16px;
  height: 100%;
  gap: 10px;
}

.search-mini-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  user-select: none;
}

.search-input-wrapper input {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  font-size: 16px;
  color: var(--text-primary);
}

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

.search-clear-btn {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
}

.search-submit-btn {
  width: 64px;
  height: 40px;
  background-color: #222222;
  border: 1px solid #303030;
  border-left: none;
  border-radius: 0 40px 40px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: var(--transition);
}

.search-submit-btn:hover {
  background-color: #2a2a2a;
}

.voice-search-btn {
  background-color: #181818;
}

.voice-search-btn:hover {
  background-color: #272727;
}

/* Right Section */
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drive-status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-hover);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.drive-status-badge:hover {
  background-color: var(--bg-active);
  color: var(--text-primary);
}

.drive-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-amber);
  display: inline-block;
  box-shadow: 0 0 6px var(--accent-amber);
}

.drive-status-dot.active {
  background-color: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
}

.create-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-hover);
  padding: 0 16px;
  height: 36px;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 14px;
  transition: var(--transition);
}

.create-btn:hover {
  background-color: var(--bg-active);
}

.signin-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--accent-blue);
  color: var(--accent-blue);
  border-radius: var(--radius-full);
  padding: 0 16px;
  height: 36px;
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
}

.signin-btn:hover {
  background-color: rgba(62, 166, 255, 0.15);
}

.header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.user-pill {
  position: relative;
}

.user-avatar-btn {
  display: flex;
  align-items: center;
  padding: 2px;
  border-radius: 50%;
  transition: var(--transition);
}

.user-avatar-btn:hover {
  outline: 2px solid var(--accent-blue);
}

/* User Dropdown Menu */
.user-dropdown-menu {
  position: absolute;
  top: 44px;
  right: 0;
  width: 280px;
  background-color: #282828;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  padding: 12px 0;
  z-index: 2000;
  border: 1px solid #383838;
}

.dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 12px 16px;
}

.dropdown-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.dropdown-user-details {
  display: flex;
  flex-direction: column;
}

.dropdown-name {
  font-weight: 600;
  font-size: 15px;
  color: #fff;
}

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

.dropdown-channel-link {
  font-size: 13px;
  color: var(--accent-blue);
  margin-top: 4px;
}

.dropdown-divider {
  height: 1px;
  background-color: #383838;
  margin: 6px 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-primary);
  transition: var(--transition);
  text-align: left;
}

.dropdown-item:hover {
  background-color: var(--bg-hover);
}

.logout-item:hover {
  color: #ff5252;
}

/* =========================================================
   APP BODY & SIDEBAR
   ========================================================= */
.app-layout {
  display: flex;
  padding-top: var(--topbar-height);
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background-color: var(--bg-primary);
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  z-index: 900;
  border-right: 1px solid var(--border-color);
  transition: var(--transition);
}

.sidebar::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-heading {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  transition: var(--transition);
}

.sidebar-link:hover {
  background-color: var(--bg-hover);
}

.sidebar-link.active {
  background-color: var(--bg-hover);
  font-weight: 600;
}

.sidebar-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 12px 0;
}

.subscribed-channels-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sub-channel-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.sub-channel-link:hover {
  background-color: var(--bg-hover);
}

.sub-channel-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.sub-channel-title {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.sidebar-empty-hint {
  font-size: 12px;
  color: var(--text-muted);
  padding: 6px 12px;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 12px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-footer .copyright {
  color: #555555;
}

/* =========================================================
   MAIN CONTENT & SPA VIEWS
   ========================================================= */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 16px 24px;
  min-height: calc(100vh - var(--topbar-height));
  transition: var(--transition);
}

/* Collapsed Left Sidebar on Desktop */
body.sidebar-collapsed .sidebar {
  transform: translateX(-100%);
}

body.sidebar-collapsed .main-content {
  margin-left: 0;
}

/* Sidebar overlay for mobile drawer */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1040;
  backdrop-filter: blur(2px);
  transition: opacity 0.2s ease;
}

.sidebar-overlay.hidden {
  display: none !important;
}

.view-container {
  max-width: 1600px;
  margin: 0 auto;
}

.view-header {
  margin-bottom: 20px;
}

.view-header h2 {
  font-size: 22px;
  font-weight: 700;
}

.view-header.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-subtext {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Category Chips Bar */
.chips-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.chips-bar::-webkit-scrollbar {
  display: none;
}

.chip {
  padding: 6px 12px;
  background-color: var(--bg-hover);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  transition: var(--transition);
}

.chip:hover {
  background-color: var(--bg-active);
}

.chip.active {
  background-color: #f1f1f1;
  color: #0f0f0f;
  font-weight: 600;
}

/* Drive Notice Banner */
.drive-notice-banner {
  background: linear-gradient(90deg, #152238 0%, #111a2e 100%);
  border: 1px solid #1c355e;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.notice-icon {
  display: flex;
  align-items: center;
}

.notice-content h4 {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
}

.notice-content p {
  font-size: 13px;
  color: #b0c4de;
  margin-top: 2px;
}

.notice-btn {
  margin-left: auto;
  background-color: rgba(62, 166, 255, 0.2);
  color: var(--accent-blue);
  border: 1px solid var(--accent-blue);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.notice-btn:hover {
  background-color: rgba(62, 166, 255, 0.35);
}

/* Video Grid (Authentic YouTube Responsive Grid) */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px 16px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.history-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px 16px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.video-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.video-thumb-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #1a1a1a;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.video-thumb-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.2s ease;
  display: block;
}

.video-card:hover .video-thumb-img {
  transform: scale(1.03);
}

.video-duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background-color: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  backdrop-filter: blur(4px);
}

.shorts-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background-color: var(--accent-red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.video-meta-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  width: 100%;
  min-width: 0;
}

.video-author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.video-details {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.video-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.video-author-name {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.video-author-name:hover {
  color: var(--text-primary);
}

.video-stats {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.dot-separator {
  color: var(--text-muted);
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.empty-state-icon {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.empty-state h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.primary-btn {
  background-color: #ffffff;
  color: #0f0f0f;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 14px;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.primary-btn:hover {
  background-color: #d9d9d9;
}

.pill-btn {
  background-color: var(--bg-hover);
  color: var(--text-primary);
  padding: 0 16px;
  height: 36px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.pill-btn:hover {
  background-color: var(--bg-active);
}

.pill-btn.danger-btn {
  color: #ff5252;
}
.pill-btn.danger-btn:hover {
  background-color: rgba(255, 82, 82, 0.15);
}

.text-btn {
  color: var(--text-primary);
  padding: 8px 16px;
  font-weight: 600;
  font-size: 14px;
}
.text-btn:hover {
  color: #fff;
}

/* =========================================================
   DEDICATED SHORTS SHELF IN HOME FEED
   ========================================================= */
.shorts-shelf-container {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.shorts-shelf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.shorts-shelf-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shorts-shelf-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.shorts-shelf-cards {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 4px 14px 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.shorts-shelf-cards::-webkit-scrollbar {
  height: 6px;
}

.shorts-shelf-cards::-webkit-scrollbar-track {
  background: transparent;
}

.shorts-shelf-cards::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.shorts-shelf-cards::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.35);
}

.shelf-arrow-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.shelf-arrow-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.25);
  transform: scale(1.06);
}

.shelf-arrow-btn:active {
  transform: scale(0.95);
}

.shorts-shelf-card {
  position: relative;
  aspect-ratio: 9 / 16;
  flex: 0 0 190px;
  width: 190px;
  min-width: 190px;
  max-width: 190px;
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  background-color: #1a1a1a;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  scroll-snap-align: start;
}

@media (max-width: 768px) {
  .shorts-shelf-cards {
    gap: 12px;
    padding-bottom: 12px;
  }
  .shorts-shelf-card {
    flex: 0 0 150px;
    width: 150px;
    min-width: 150px;
    max-width: 150px;
  }
}

.shorts-shelf-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.shorts-shelf-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shorts-shelf-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.2) 60%, transparent 100%);
  pointer-events: none;
}

.shorts-shelf-card-info {
  position: relative;
  z-index: 2;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.shorts-shelf-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shorts-shelf-card-views {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
}

/* =========================================================
   STUDIO & ANALYTICS STYLING
   ========================================================= */
.analytics-modal-box,
.edit-modal-box {
  max-width: 620px;
  width: 100%;
}

.analytics-header-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  background-color: var(--bg-hover);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.analytics-thumb {
  width: 120px;
  height: 68px;
  object-fit: cover;
  border-radius: 6px;
  background-color: #222;
  flex-shrink: 0;
}

.analytics-video-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.analytics-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.analytics-sub-info {
  font-size: 12px;
  color: var(--text-secondary);
}

.analytics-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 500px) {
  .analytics-metrics-grid {
    grid-template-columns: 1fr;
  }
}

.metric-card {
  padding: 16px;
  background-color: var(--bg-hover);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.metric-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.metric-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.metric-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.analytics-comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 180px;
  overflow-y: auto;
}

.analytics-comment-item {
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  font-size: 13px;
}

.action-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

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

.action-badge-btn.action-analytics {
  color: #3ea6ff;
}
.action-badge-btn.action-analytics:hover {
  background-color: rgba(62, 166, 255, 0.15);
}

.action-badge-btn.action-edit {
  color: #2ba640;
}
.action-badge-btn.action-edit:hover {
  background-color: rgba(43, 166, 64, 0.15);
}

.action-badge-btn.action-delete {
  color: #ff5252;
}
.action-badge-btn.action-delete:hover {
  background-color: rgba(255, 82, 82, 0.15);
}
.watch-layout {
  display: flex;
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

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

.watch-side-col {
  width: 400px;
  flex-shrink: 0;
}

.side-col-heading {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.video-player-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}

.video-player-container iframe,
.player-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
  display: block;
  background: #000000;
}

.html5-player-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  z-index: 2;
}

/* Elegant top mask that obscures Google Drive's raw file title and branding */
.player-top-mask {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(15, 15, 15, 0.96) 0%, rgba(15, 15, 15, 0.75) 50%, rgba(15, 15, 15, 0) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-sizing: border-box;
}

.player-top-info {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 60px);
  overflow: hidden;
}

.player-top-title {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  letter-spacing: 0.2px;
}

/* Blocks clicking Google Drive's external popout button in the top right */
.player-popout-blocker {
  position: absolute;
  top: 0;
  right: 0;
  width: 64px;
  height: 48px;
  pointer-events: auto;
  cursor: default;
  z-index: 5;
  background: transparent;
}

.player-fullscreen-btn {
  display: none !important;
}

.player-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #000;
  display: block;
}

.player-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Double-tap Seek Ripples */
.seek-ripple {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 8;
}

.seek-ripple.seek-left {
  left: 0;
  border-radius: 0 50% 50% 0;
  transform: translateX(-15px);
}

.seek-ripple.seek-right {
  right: 0;
  border-radius: 50% 0 0 50%;
  transform: translateX(15px);
}

.seek-ripple.active {
  opacity: 1;
  transform: translateX(0);
}

.center-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 7;
}

.center-play-icon.flash {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

/* Player Top Bar (Quality badge & Quick Mute) */
.player-top-controls {
  position: absolute;
  top: 10px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 12;
  transition: opacity 0.25s ease;
}

.player-quick-badge {
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.player-top-btn {
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.player-top-btn:hover {
  background: rgba(40, 40, 40, 0.9);
  transform: scale(1.05);
}

/* Custom Controls Bar */
.player-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
  padding: 0 12px 6px 12px;
  display: flex;
  flex-direction: column;
  z-index: 12;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.player-controls.fade-out,
.player-top-controls.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Timeline Scrubber */
.progress-bar-container {
  position: relative;
  width: 100%;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  border-radius: 3px;
  margin-bottom: 6px;
  touch-action: none;
  transition: height 0.15s ease;
}

.progress-bar-container:hover,
.progress-bar-container.touching {
  height: 9px;
}

.progress-buffer-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.4);
  border-radius: 2px;
  width: 0%;
}

.progress-play-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-color: var(--accent-red);
  border-radius: 2px;
  width: 0%;
}

.progress-scrubber-dot {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--accent-red);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.15s ease;
}

.progress-bar-container:hover .progress-scrubber-dot {
  transform: translate(-50%, -50%) scale(1);
}

.progress-tooltip {
  position: absolute;
  bottom: 16px;
  transform: translateX(-50%);
  background-color: rgba(28, 28, 28, 0.9);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  display: none;
}

.controls-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
}

.controls-left, .controls-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #ffffff;
  border-radius: 50%;
  transition: var(--transition);
}

.ctrl-btn:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.ctrl-btn.text-btn {
  width: auto;
  border-radius: 4px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 600;
}

.volume-container {
  display: flex;
  align-items: center;
  gap: 4px;
}

.volume-slider {
  width: 60px;
  accent-color: #ffffff;
  height: 3px;
  cursor: pointer;
}

.time-display {
  font-size: 12px;
  color: #ddd;
  user-select: none;
  font-variant-numeric: tabular-nums;
}

/* Speed Dropdown Menu */
.speed-menu-wrapper {
  position: relative;
}

.speed-dropdown {
  position: absolute;
  bottom: 44px;
  right: 0;
  background-color: #282828;
  border-radius: var(--radius-md);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7);
  padding: 6px 0;
  z-index: 100;
  width: 140px;
  border: 1px solid #383838;
}

.speed-opt {
  width: 100%;
  padding: 6px 16px;
  text-align: left;
  font-size: 13px;
  color: #f1f1f1;
  cursor: pointer;
  transition: var(--transition);
}

.speed-opt:hover {
  background-color: var(--bg-hover);
}

.speed-opt.active {
  font-weight: 600;
  color: var(--accent-blue);
}

/* Quality Dropdown Menu */
.quality-menu-wrapper {
  position: relative;
}

.quality-dropdown {
  position: absolute;
  bottom: 44px;
  right: 0;
  background-color: #282828;
  border-radius: var(--radius-md);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7);
  padding: 6px 0;
  z-index: 100;
  width: 160px;
  border: 1px solid #383838;
}

.quality-opt {
  width: 100%;
  padding: 8px 16px;
  text-align: left;
  font-size: 13px;
  color: #f1f1f1;
  cursor: pointer;
  transition: var(--transition);
}

.quality-opt:hover {
  background-color: var(--bg-hover);
}

.quality-opt.active {
  font-weight: 600;
  color: var(--accent-blue);
}

.ctrl-badge-label {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: #fff;
  letter-spacing: 0.5px;
}

.player-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-primary);
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s, transform 0.1s;
}

.player-mode-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
}

.player-mode-btn:active {
  transform: scale(0.97);
}

/* Video Info Below Player */
.watch-video-info {
  margin-top: 14px;
}

.watch-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.watch-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
}

.watch-channel-block {
  display: flex;
  align-items: center;
  gap: 16px;
}

.watch-channel-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

.channel-avatar-md {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.channel-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.watch-channel-meta {
  display: flex;
  flex-direction: column;
}

.channel-name {
  font-weight: 600;
  font-size: 15px;
  color: #fff;
}

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

.subscribe-btn {
  background-color: #f1f1f1;
  color: #0f0f0f;
  font-weight: 600;
  font-size: 14px;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.subscribe-btn:hover {
  background-color: #d9d9d9;
}

.subscribe-btn.subscribed {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

.watch-interaction-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.segmented-btn-group {
  display: flex;
  align-items: center;
  background-color: var(--bg-hover);
  border-radius: var(--radius-full);
  height: 36px;
  overflow: hidden;
}

.segmented-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: 100%;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}

.segmented-btn:hover {
  background-color: var(--bg-active);
}

.segmented-btn.liked {
  color: var(--accent-blue);
}

.segmented-divider {
  width: 1px;
  height: 20px;
  background-color: var(--border-light);
}

/* Description Box */
.watch-description-box {
  background-color: #212121;
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-top: 16px;
  cursor: pointer;
  transition: var(--transition);
}

.watch-description-box:hover {
  background-color: #272727;
}

.desc-stats-header {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  gap: 6px;
}

.desc-text {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.watch-description-box.expanded .desc-text {
  display: block;
  -webkit-line-clamp: unset;
}

.desc-link {
  color: #b388ff !important;
  text-decoration: none;
  font-weight: 500;
  word-break: break-word;
  transition: color 0.15s ease, text-decoration 0.15s ease;
}

.desc-link:hover {
  color: #d8b4fe !important;
  text-decoration: underline;
}

.watch-description-box .desc-text a,
.channel-profile-bio a,
.channel-about-card a,
.post-card a.desc-link,
.comment-text a.desc-link {
  color: #b388ff !important;
}

.watch-description-box .desc-text a:hover,
.channel-profile-bio a:hover,
.channel-about-card a:hover,
.post-card a.desc-link:hover,
.comment-text a.desc-link:hover {
  color: #d8b4fe !important;
  text-decoration: underline;
}

/* Quick insertion tags in Studio / Bio Modal */
.social-quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  margin-bottom: 4px;
}

.social-quick-btn {
  background: rgba(179, 136, 255, 0.12);
  border: 1px solid rgba(179, 136, 255, 0.25);
  color: #b388ff;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.social-quick-btn:hover {
  background: rgba(179, 136, 255, 0.25);
  border-color: #b388ff;
  color: #ffffff;
  transform: translateY(-1px);
}

/* Channel Header Social Links Bar */
.channel-social-links-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.channel-social-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(179, 136, 255, 0.08);
  border: 1px solid rgba(179, 136, 255, 0.22);
  border-radius: 9999px;
  color: #b388ff;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.channel-social-pill:hover {
  background: rgba(179, 136, 255, 0.2);
  border-color: #b388ff;
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 0 10px rgba(179, 136, 255, 0.3);
  transform: translateY(-1px);
}

.channel-social-pill svg {
  flex-shrink: 0;
}

/* Channel About Social Grid */
.channel-about-social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.channel-about-social-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(179, 136, 255, 0.2);
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.18s ease;
}

.channel-about-social-card:hover {
  background: rgba(179, 136, 255, 0.1);
  border-color: #b388ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(179, 136, 255, 0.15);
}

.channel-about-social-icon-wrapper {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(179, 136, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b388ff;
  flex-shrink: 0;
}

.channel-about-social-card:hover .channel-about-social-icon-wrapper {
  background: #b388ff;
  color: #121212;
}

.channel-about-social-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.channel-about-social-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-about-social-url {
  font-size: 12px;
  color: #b388ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Timestamp Links in Description & Comments */
.timestamp-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: rgba(62, 166, 255, 0.12);
  color: #3ea6ff;
  border: 1px solid rgba(62, 166, 255, 0.2);
  border-radius: 6px;
  padding: 1px 7px;
  font-family: inherit;
  font-size: 0.92em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  vertical-align: baseline;
  text-decoration: none;
  line-height: 1.4;
  margin: 0 2px;
}

.timestamp-link:hover {
  background: rgba(62, 166, 255, 0.24);
  color: #70b8ff;
  border-color: rgba(62, 166, 255, 0.45);
  box-shadow: 0 0 8px rgba(62, 166, 255, 0.25);
}

.timestamp-link:active {
  transform: scale(0.95);
  background: rgba(62, 166, 255, 0.35);
}

.timestamp-link svg {
  flex-shrink: 0;
}

.desc-toggle-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 8px;
  padding: 0;
}

/* Comments Section */
.comments-section {
  margin-top: 24px;
}

.comments-header {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.comments-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.comments-sort-dropdown-wrap {
  position: relative;
  display: inline-block;
}

.comments-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.comments-sort-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.comments-sort-btn .sort-chevron-icon {
  transition: transform 0.2s ease;
}

.comments-sort-btn[aria-expanded="true"] .sort-chevron-icon {
  transform: rotate(180deg);
}

.comments-sort-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  background: #212121;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 6px 0;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65);
  z-index: 100;
  display: flex;
  flex-direction: column;
  animation: fadeInDown 0.15s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.comments-sort-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.comments-sort-option:hover {
  background: rgba(255, 255, 255, 0.08);
}

.comments-sort-option.active {
  font-weight: 600;
  color: #3ea6ff;
  background: rgba(62, 166, 255, 0.08);
}

.comments-sort-option .sort-check-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #3ea6ff;
}

.add-comment-box {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.comment-input-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.comment-input-container textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-color);
  outline: none;
  resize: none;
  color: var(--text-primary);
  font-size: 14px;
  padding-bottom: 4px;
  transition: border-color 0.2s;
}

.comment-input-container textarea:focus {
  border-bottom: 2px solid #ffffff;
}

.comment-input-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.comment-item,
.comment-reply-item {
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.comment-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.comment-author-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-author-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

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

.comment-text {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.4;
  word-break: break-word;
  white-space: pre-wrap;
}

.comment-actions-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}

.comment-like-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.comment-like-btn:hover {
  color: var(--text-primary);
}

.comment-like-btn.liked {
  color: var(--accent-blue);
}

.comment-delete-btn {
  font-size: 12px;
  color: var(--text-muted);
}
.comment-delete-btn:hover {
  color: #ff5252;
}

/* Recommended Videos in Watch View */
.recommended-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rec-video-card {
  display: flex;
  gap: 10px;
  cursor: pointer;
  width: 100%;
  min-width: 0;
}

.rec-thumb-wrapper {
  position: relative;
  width: 168px;
  aspect-ratio: 16 / 9;
  height: auto;
  flex-shrink: 0;
  background-color: #202020;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.rec-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.rec-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.rec-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.rec-author {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.rec-stats {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* =========================================================
   SHORTS VIEW (9:16 VERTICAL PLAYER FEED)
   ========================================================= */
.shorts-feed-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 10px 0;
  min-height: calc(100vh - var(--topbar-height) - 40px);
}

.shorts-card {
  display: flex;
  align-items: flex-end;
  gap: 16px;
}

.shorts-video-container {
  position: relative;
  width: 380px;
  height: 675px; /* 9:16 Aspect Ratio */
  background-color: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  cursor: pointer;
  user-select: none;
}

.shorts-video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* Shorts Top Overlay Controls */
.shorts-top-controls {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  z-index: 10;
  pointer-events: auto;
}

.shorts-top-btn {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.shorts-top-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.05);
}

.shorts-top-btn:active {
  transform: scale(0.95);
}

/* Animated Center Play / Pause Indicator */
.shorts-overlay-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  padding: 16px;
  pointer-events: none;
  z-index: 15;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.shorts-overlay-play.pulse {
  animation: shortsPlayPulse 0.4s ease-out forwards;
}

@keyframes shortsPlayPulse {
  0% { transform: translate(-50%, -50%) scale(0.7); opacity: 0.9; }
  50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
}

/* Shorts Interactive Scrubber & Timeline */
.shorts-progress-bar-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 18px;
  display: flex;
  align-items: flex-end;
  cursor: pointer;
  z-index: 30;
  pointer-events: auto;
  padding: 0;
}

.shorts-progress-bar-track {
  position: relative;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  transition: height 0.15s ease;
}

.shorts-progress-bar-container:hover .shorts-progress-bar-track {
  height: 5px;
}

.shorts-progress-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: var(--accent-red, #ff0000);
  border-radius: 0 2px 2px 0;
  transition: width 0.05s linear;
}

.shorts-progress-handle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 12px;
  height: 12px;
  background: var(--accent-red, #ff0000);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
  transition: transform 0.15s ease;
  pointer-events: none;
}

.shorts-progress-bar-container:hover .shorts-progress-handle {
  transform: translate(-50%, -50%) scale(1);
}

.shorts-progress-tooltip {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Dedicated seamless bottom darkening gradient */
.shorts-gradient-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 280px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.72) 40%, rgba(0, 0, 0, 0.25) 75%, transparent 100%);
  pointer-events: none;
  z-index: 10;
}

.shorts-bottom-meta {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  z-index: 20;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
}

.shorts-bottom-meta * {
  pointer-events: auto;
}

.shorts-channel-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shorts-channel-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.shorts-sub-btn {
  background-color: #fff;
  color: #0f0f0f;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.shorts-title {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  line-height: 1.35;
  margin: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.shorts-actions-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.shorts-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.action-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.action-icon-circle:hover {
  background-color: var(--bg-active);
}

.shorts-action-btn.liked .action-icon-circle {
  background-color: var(--accent-blue);
  color: #fff;
}

.shorts-nav-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shorts-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: var(--transition);
}

.shorts-nav-btn:hover {
  background-color: var(--bg-active);
}

/* =========================================================
   TYTS / SHORTS COMMENTS DRAWER & BOTTOM SHEET
   ========================================================= */
.shorts-comments-sheet {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: auto;
}

.shorts-comments-sheet.hidden {
  display: none !important;
}

.shorts-comments-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.shorts-comments-sheet.open .shorts-comments-backdrop {
  opacity: 1;
}

.shorts-comments-panel {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  height: 75vh;
  max-height: 82vh;
  background: #181818;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -10px 36px rgba(0, 0, 0, 0.75);
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  overflow: hidden;
}

.shorts-comments-sheet.open .shorts-comments-panel {
  transform: translateY(0);
}

.shorts-comments-drag-handle {
  width: 100%;
  padding: 8px 0 4px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  background: transparent;
}

.shorts-comments-drag-handle .drag-pill {
  width: 38px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.3);
  transition: background 0.15s;
}

.shorts-comments-drag-handle:active .drag-pill {
  background: rgba(255, 255, 255, 0.55);
}

.shorts-comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.shorts-comments-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shorts-comments-heading {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.shorts-comments-count-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 12px;
}

.shorts-comments-close-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s, background 0.15s, transform 0.15s;
}

.shorts-comments-close-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  transform: scale(1.06);
}

.shorts-comments-close-btn:active {
  transform: scale(0.94);
}

/* Comments List inside Tyts */
.shorts-comments-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-sizing: border-box;
}

.shorts-comments-list .comment-item {
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.shorts-comments-list .comment-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
}

.shorts-comments-list .comment-text {
  font-size: 13.5px;
  line-height: 1.45;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.shorts-comments-list .comment-replies-container {
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1.5px solid rgba(255, 255, 255, 0.15);
  width: calc(100% - 10px);
  box-sizing: border-box;
  gap: 10px;
}

.shorts-comments-list .comment-reply-form {
  margin-left: 0;
  width: 100%;
  box-sizing: border-box;
}

.shorts-comments-loading,
.shorts-comments-empty,
.shorts-comments-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 16px;
  color: var(--text-secondary);
  font-size: 14px;
  gap: 12px;
  margin: auto 0;
}

.shorts-comments-empty p {
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
  font-size: 13.5px;
}

/* Bottom Input Bar inside Tyts */
.shorts-comments-input-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  background: #1f1f1f;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  box-sizing: border-box;
}

.shorts-input-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.shorts-comment-field-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 2px 6px 2px 12px;
  transition: border-color 0.2s, background 0.2s;
  min-height: 38px;
  box-sizing: border-box;
}

.shorts-comment-field-wrapper:focus-within {
  border-color: #3ea6ff;
  background: rgba(255, 255, 255, 0.1);
}

.shorts-comment-field-wrapper textarea {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 13.5px;
  resize: none;
  max-height: 80px;
  line-height: 1.4;
  padding: 6px 0;
  font-family: inherit;
  box-sizing: border-box;
}

.shorts-comment-submit-btn {
  background: none;
  border: none;
  color: #3ea6ff;
  width: 34px;
  height: 34px;
  min-width: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s, background 0.15s;
  padding: 0;
}

.shorts-comment-submit-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  color: var(--text-secondary);
}

.shorts-comment-submit-btn:not(:disabled):hover {
  background: rgba(62, 166, 255, 0.15);
  transform: scale(1.06);
}

.shorts-comment-submit-btn:not(:disabled):active {
  transform: scale(0.92);
}

/* =========================================================
   CHANNEL PROFILE VIEW
   ========================================================= */
.channel-banner-container {
  width: 100%;
  height: 200px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, #1f2a44 0%, #161623 100%);
  margin-bottom: 24px;
}

.channel-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.channel-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 20px;
}

.channel-header-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.channel-profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border-light);
}

.channel-profile-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.channel-profile-title {
  font-size: 26px;
  font-weight: 700;
}

.channel-profile-meta {
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.channel-profile-bio {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.channel-tabs-bar {
  display: flex;
  gap: 24px;
  margin: 16px 0 24px 0;
  border-bottom: 1px solid var(--border-color);
}

.channel-tab {
  padding: 10px 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.channel-tab:hover {
  color: var(--text-primary);
}

.channel-tab.active {
  color: var(--text-primary);
  border-bottom-color: #ffffff;
}

/* =========================================================
   MY VIDEOS TABLE (STUDIO MANAGEMENT)
   ========================================================= */
.my-videos-table-container {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow-x: auto;
}

.my-videos-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.my-videos-table th {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

.my-videos-table td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.my-videos-table tr:hover td {
  background-color: var(--bg-hover);
}

.table-video-col {
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-video-thumb {
  width: 100px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background-color: #222;
}

.table-video-title {
  font-weight: 600;
  color: var(--text-primary);
}

/* =========================================================
   MODALS
   ========================================================= */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 20px;
}

.modal-box {
  background-color: #212121;
  border-radius: var(--radius-lg);
  border: 1px solid #383838;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.8);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #383838;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.close-modal-btn {
  color: var(--text-secondary);
}
.close-modal-btn:hover {
  color: var(--text-primary);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid #383838;
  margin-top: 16px;
}

/* Upload Form */
.upload-form {
  padding: 20px;
}

.upload-type-selector {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.type-radio-label {
  cursor: pointer;
}

.type-radio-label input {
  display: none;
}

.type-pill {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background-color: var(--bg-hover);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}

.type-radio-label input:checked + .type-pill {
  background-color: var(--accent-blue);
  color: #fff;
  font-weight: 600;
}

.dropzone {
  position: relative;
  border: 2px dashed #444;
  border-radius: var(--radius-md);
  padding: 30px 20px;
  text-align: center;
  background-color: #1a1a1a;
  cursor: pointer;
  margin-bottom: 16px;
  transition: var(--transition);
}

.dropzone:hover {
  border-color: var(--accent-blue);
  background-color: #222;
}

.visually-hidden-file-input,
.file-hidden-input {
  display: none !important;
}

.dropzone-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
}

.dropzone-content h4 {
  font-size: 15px;
  font-weight: 600;
  margin-top: 8px;
}

.dropzone-content p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.file-selected-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-green);
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input, .form-textarea {
  width: 100%;
  background-color: #121212;
  border: 1px solid #383838;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--accent-blue);
}

.thumb-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.thumb-file-name {
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Upload Progress Bar */
.upload-progress-box {
  background-color: #161616;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-top: 16px;
}

.progress-bar-track {
  width: 100%;
  height: 6px;
  background-color: #333;
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background-color: var(--accent-blue);
  transition: width 0.15s ease;
}

.progress-status-row {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* Auth Modal Tabs */
.auth-modal-box {
  max-width: 400px;
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid #383838;
}

.auth-tab-btn {
  flex: 1;
  padding: 12px 0;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.auth-tab-btn.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}

.auth-form {
  padding: 20px;
}

.auth-submit-btn {
  width: 100%;
  margin-top: 8px;
  justify-content: center;
}

.auth-error-msg {
  background-color: rgba(255, 82, 82, 0.15);
  border: 1px solid #ff5252;
  color: #ff8a80;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 12px;
}

/* Studio Modal */
.studio-form {
  padding: 20px;
}

.studio-file-row {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}

.studio-banner-preview-box {
  width: 100%;
  height: 100px;
  border-radius: var(--radius-sm);
  background-color: #181818;
  border: 1px dashed #444;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.studio-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.studio-banner-placeholder {
  font-size: 12px;
  color: var(--text-muted);
}

/* Drive Info Details */
.drive-info-body {
  padding: 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
}

.drive-info-body code {
  background-color: #121212;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-blue);
}

/* Toast */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background-color: #282828;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  border-left: 4px solid var(--accent-blue);
  font-size: 14px;
  font-weight: 500;
  z-index: 5000;
  animation: slideInUp 0.3s ease;
}

@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* =========================================================
   MOBILE BOTTOM NAVIGATION
   ========================================================= */
.mobile-bottom-nav {
  display: none;
}

/* =========================================================
   RESPONSIVE DESIGN & PHONE OPTIMIZATION
   ========================================================= */
@media (max-width: 1200px) {
  .watch-layout {
    flex-direction: column;
  }
  .watch-side-col {
    width: 100%;
  }
}

/* =========================================================
   RESPONSIVE LAYOUT SYSTEM (MOBILE & TABLET OPTIMIZED)
   Prevents any overflow on phones down to 320px width
   ========================================================= */

/* Desktop / Laptop breakpoint */
@media (max-width: 1200px) {
  .watch-layout {
    flex-direction: column;
  }
  .watch-side-col {
    width: 100%;
  }
}

/* Tablets and Mobile (Sidebar drawer + bottom navigation) */
@media (max-width: 840px) {
  :root {
    --topbar-height: 52px;
  }

  .app-layout {
    padding-top: 52px !important;
  }

  .sidebar {
    top: 0;
    z-index: 1100;
    width: 240px;
    transform: translateX(-100%);
    box-shadow: none;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .sidebar.mobile-open {
    transform: translateX(0) !important;
    box-shadow: 6px 0 24px rgba(0, 0, 0, 0.85);
  }

  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    padding: 10px !important;
    padding-bottom: calc(64px + env(safe-area-inset-bottom)) !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 52px;
    background-color: #0f0f0f;
    border-top: 1px solid #272727;
    z-index: 990;
    align-items: center;
    justify-content: space-around;
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom);
    box-sizing: border-box;
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-secondary);
    font-size: 10px;
    text-decoration: none;
    flex: 1;
    height: 100%;
    transition: color 0.15s ease;
  }

  .mobile-nav-item.active,
  .mobile-nav-item:hover {
    color: #ffffff;
  }

  .mobile-nav-item svg {
    width: 20px;
    height: 20px;
  }

  .mobile-nav-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
  }

  .mobile-nav-create-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #272727;
    border: 1px solid #3f3f3f;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease;
    margin: 0 4px;
    flex-shrink: 0;
  }

  .mobile-nav-create-btn:hover {
    background-color: #333333;
    transform: scale(1.05);
  }

  /* Hide shorts arrow navigation on phones/tablets */
  .shorts-nav-controls {
    display: none !important;
  }
}

/* =========================================================
   MOBILE PHONES (<= 600px) - STRICT OVERFLOW CONTAINMENT
   ========================================================= */
@media (max-width: 600px) {
  html, body {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    position: relative;
    box-sizing: border-box;
  }

  .app-layout {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box;
  }

  .main-content {
    padding: 6px 8px !important;
    padding-bottom: calc(64px + env(safe-area-inset-bottom)) !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  /* Top Bar Mobile Optimization */
  .top-bar {
    padding: 0 8px !important;
    height: 52px !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }

  .top-bar-left {
    gap: 6px !important;
    min-width: 0 !important;
    flex-shrink: 0 !important;
  }

  .logo-container {
    gap: 4px !important;
  }

  .logo-text {
    font-size: 16px !important;
    letter-spacing: -0.5px !important;
  }

  .logo-badge svg {
    width: 24px !important;
    height: 20px !important;
  }

  .top-bar-center {
    display: none !important;
  }

  .top-bar-right {
    gap: 4px !important;
    flex-shrink: 0 !important;
  }

  .top-bar-right .create-btn {
    display: none !important;
  }

  .mobile-search-toggle-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 36px !important;
    height: 36px !important;
    color: var(--text-primary);
    flex-shrink: 0;
  }

  .signin-btn {
    padding: 0 10px !important;
    height: 32px !important;
    font-size: 12px !important;
    gap: 4px !important;
  }

  .signin-btn svg {
    width: 16px !important;
    height: 16px !important;
  }

  .icon-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    padding: 0 !important;
  }

  /* Expandable Full-Width Mobile Search Bar */
  .top-bar.mobile-search-active .top-bar-left,
  .top-bar.mobile-search-active .top-bar-right {
    display: none !important;
  }

  .top-bar.mobile-search-active .top-bar-center {
    display: flex !important;
    flex: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .top-bar.mobile-search-active .mobile-search-back-btn {
    display: inline-flex !important;
    flex-shrink: 0 !important;
    width: 36px !important;
    height: 36px !important;
  }

  .top-bar.mobile-search-active .search-box {
    flex: 1 !important;
    max-width: 100% !important;
    height: 36px !important;
  }

  .top-bar.mobile-search-active .search-box input {
    font-size: 14px !important;
  }

  /* Dropdowns constrained within mobile viewport */
  .notif-dropdown {
    right: 0 !important;
    left: auto !important;
    width: min(320px, calc(100vw - 16px)) !important;
    max-width: calc(100vw - 16px) !important;
    z-index: 2100 !important;
  }

  .user-dropdown-menu {
    right: 0 !important;
    left: auto !important;
    width: min(260px, calc(100vw - 16px)) !important;
    max-width: calc(100vw - 16px) !important;
    z-index: 2100 !important;
  }

  /* Category Filter Chips Bar */
  .chips-bar {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-bottom: 4px !important;
    scrollbar-width: none !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
  }

  .chip {
    flex-shrink: 0 !important;
    font-size: 13px !important;
    padding: 6px 12px !important;
    white-space: nowrap !important;
  }

  /* Video Grid: 1 Column on Phones */
  .videos-grid,
  .history-list,
  #subscriptionsVideosGrid,
  #channelVideosGrid,
  #myVideosGrid {
    grid-template-columns: 100% !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .video-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .video-thumb-container {
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    border-radius: 8px !important;
  }

  .video-meta-row {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    gap: 10px !important;
    margin-top: 8px !important;
  }

  .video-author-avatar {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
  }

  .video-details {
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .video-title {
    font-size: 14px !important;
    line-height: 1.35 !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }

  /* Watch View: Edge-to-Edge Responsive Player + Clean Spacing */
  body.watch-active .main-content {
    padding-top: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  #watchView {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  .watch-layout {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 0 calc(120px + env(safe-area-inset-bottom, 24px)) 0 !important;
    gap: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .watch-main-col {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .player-container,
  .video-player-container {
    width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    min-height: 0 !important;
    height: auto !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
    overflow: hidden !important;
    margin: 0 !important;
    border: none !important;
    background: #000000 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
  }

  .watch-video-details {
    padding: 10px 12px 0 12px !important;
  }

  .watch-comments-section,
  .watch-side-col {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .player-container iframe,
  .video-player-container iframe,
  .player-container video,
  .video-player-container video {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
    display: block !important;
    background: #000000 !important;
  }

  .player-top-mask {
    height: 40px !important;
    padding: 0 10px !important;
  }

  .player-top-title {
    font-size: 12px !important;
    max-width: calc(100% - 50px) !important;
  }

  .player-popout-blocker {
    width: 56px !important;
    height: 40px !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    pointer-events: auto !important;
    z-index: 5 !important;
  }

  .volume-slider {
    display: none !important;
  }

  .controls-bottom-row {
    height: 36px !important;
  }

  .ctrl-btn {
    width: 36px !important;
    height: 36px !important;
  }

  .progress-bar-container {
    height: 6px !important;
    margin-bottom: 4px !important;
  }

  .watch-video-info {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 4px !important;
    padding: 0 2px !important;
    box-sizing: border-box !important;
  }

  .watch-title {
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    color: #ffffff !important;
    margin: 0 0 6px 0 !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    display: block !important;
  }

  .watch-actions-bar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    margin-top: 4px !important;
    margin-bottom: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .watch-channel-block {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 8px !important;
    margin-bottom: 4px !important;
  }

  .watch-channel-link {
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    gap: 8px !important;
  }

  .channel-avatar-md {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
  }

  .channel-name {
    font-size: 14px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 150px !important;
  }

  .subscribe-btn {
    flex-shrink: 0 !important;
    height: 34px !important;
    padding: 0 14px !important;
    font-size: 13px !important;
  }

  .watch-interaction-btns {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-bottom: 6px !important;
    scrollbar-width: none !important;
    box-sizing: border-box !important;
  }

  .watch-interaction-btns > * {
    flex-shrink: 0 !important;
  }

  .watch-interaction-btns .pill-btn,
  .reaction-dislike-btn {
    height: 34px !important;
    font-size: 13px !important;
    padding: 0 12px !important;
    white-space: nowrap !important;
  }

  .watch-description-box {
    margin-top: 10px !important;
    padding: 10px 12px !important;
    border-radius: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .desc-text {
    font-size: 13px !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }

  .comments-section {
    margin-top: 18px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .comments-header h3 {
    font-size: 16px !important;
  }

  .add-comment-box {
    display: flex !important;
    gap: 10px !important;
    margin-bottom: 18px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .add-comment-box #commentUserAvatar {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
  }

  .comment-input-container {
    flex: 1 !important;
    min-width: 0 !important;
    width: calc(100% - 44px) !important;
    box-sizing: border-box !important;
  }

  .comment-input-container textarea {
    width: 100% !important;
    box-sizing: border-box !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    min-height: 40px !important;
    color: #fff !important;
  }

  .comment-input-container textarea:focus {
    border-color: #3ea6ff !important;
    background: rgba(255, 255, 255, 0.09) !important;
  }

  .comment-input-actions {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    margin-top: 8px !important;
    flex-wrap: wrap !important;
  }

  .comment-input-actions button {
    min-height: 36px !important;
    padding: 6px 14px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-radius: 18px !important;
    touch-action: manipulation !important;
  }

  .comments-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .comment-item,
  .comment-reply-item {
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  .comment-content-wrap {
    display: flex !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    align-items: flex-start !important;
  }

  .comment-avatar {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
  }

  .comment-reply-item .comment-avatar {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
  }

  .comment-body {
    flex: 1 !important;
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .comment-author-line {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 4px 8px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .comment-author-name {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #fff !important;
    max-width: 170px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .comment-creator-badge {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 10px !important;
    padding: 1px 6px !important;
    border-radius: 4px !important;
    background: rgba(255, 255, 255, 0.16) !important;
    color: #fff !important;
  }

  .comment-date {
    font-size: 11px !important;
    color: var(--text-secondary) !important;
  }

  .comment-text {
    font-size: 13.5px !important;
    line-height: 1.45 !important;
    color: var(--text-primary) !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    margin: 3px 0 !important;
  }

  .comment-actions-row {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px 10px !important;
    margin-top: 6px !important;
    width: 100% !important;
  }

  .comment-like-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    min-height: 34px !important;
    padding: 4px 8px !important;
    border-radius: 16px !important;
    font-size: 12px !important;
    color: var(--text-secondary) !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
  }

  .comment-like-btn.liked {
    color: #3ea6ff !important;
  }

  .comment-action-reply-btn {
    min-height: 32px !important;
    padding: 4px 10px !important;
    font-size: 12px !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-primary) !important;
    border: none !important;
    touch-action: manipulation !important;
  }

  .comment-author-ctrl-btn {
    min-height: 32px !important;
    padding: 3px 8px !important;
    font-size: 11px !important;
    border-radius: 16px !important;
    touch-action: manipulation !important;
  }

  .comment-delete-btn {
    min-height: 32px !important;
    padding: 3px 8px !important;
    font-size: 12px !important;
    color: #ff5252 !important;
    touch-action: manipulation !important;
  }

  .comment-action-report-btn {
    min-height: 32px !important;
    width: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    touch-action: manipulation !important;
  }

  .comment-replies-container {
    margin-left: 16px !important;
    padding-left: 10px !important;
    border-left: 2px solid rgba(255, 255, 255, 0.15) !important;
    width: auto !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    gap: 10px !important;
    margin-top: 8px !important;
  }

  .comment-replies-container .comment-replies-container {
    margin-left: 0 !important;
    padding-left: 0 !important;
    border-left: none !important;
    width: 100% !important;
  }

  .comment-reply-item {
    margin-left: 0 !important;
    padding-left: 0 !important;
    border-left: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .comment-replies-toggle-btn {
    margin-left: 16px !important;
    font-size: 12px !important;
    padding: 4px 10px !important;
  }

  .comment-replies-container .comment-replies-toggle-btn {
    margin-left: 0 !important;
  }

  .comment-reply-box-wrapper {
    margin-left: 16px !important;
    width: auto !important;
    box-sizing: border-box !important;
    margin-top: 8px !important;
  }

  .comment-replies-container .comment-reply-box-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .comment-reply-form {
    margin-left: 16px !important;
    width: auto !important;
    box-sizing: border-box !important;
    padding: 10px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
  }

  .comment-replies-container .comment-reply-form {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .comment-reply-form .reply-input {
    width: 100% !important;
    box-sizing: border-box !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 6px !important;
    padding: 8px 10px !important;
    font-size: 13.5px !important;
    min-height: 38px !important;
    color: #fff !important;
  }

  .comment-reply-form .cancel-reply-btn,
  .comment-reply-form .submit-reply-btn {
    min-height: 34px !important;
    padding: 4px 12px !important;
    font-size: 12px !important;
    border-radius: 16px !important;
    touch-action: manipulation !important;
  }

  .watch-side-col {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-top: 14px !important;
    box-sizing: border-box !important;
    padding: 0 !important;
  }

  .rec-video-card {
    width: 100% !important;
    max-width: 100% !important;
    gap: 10px !important;
    box-sizing: border-box !important;
  }

  .rec-thumb-wrapper {
    width: 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
    aspect-ratio: 16 / 9 !important;
    border-radius: 6px !important;
  }

  .rec-meta {
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .rec-title {
    font-size: 13px !important;
    line-height: 1.3 !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }

  /* Tyts / Shorts Mobile View: Full Bleed Screen, Zero Overflow */
  .shorts-feed-wrapper {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    height: calc(100vh - var(--topbar-height) - 52px - env(safe-area-inset-bottom)) !important;
    max-height: calc(100vh - var(--topbar-height) - 52px) !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .shorts-card {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    aspect-ratio: auto !important;
    border-radius: 0 !important;
    gap: 0 !important;
    align-items: stretch !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  .shorts-video-container {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
  }

  .shorts-video-container video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .shorts-bottom-meta {
    position: absolute !important;
    bottom: 16px !important;
    left: 14px !important;
    right: 76px !important;
    z-index: 20 !important;
    padding: 0 !important;
    pointer-events: none !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95) !important;
  }

  .shorts-bottom-meta * {
    pointer-events: auto !important;
  }

  .shorts-bottom-meta .shorts-title {
    font-size: 14px !important;
    line-height: 1.35 !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }

  .shorts-actions-column {
    position: absolute !important;
    right: 10px !important;
    bottom: 24px !important;
    z-index: 25 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    align-items: center !important;
  }

  .shorts-action-btn {
    font-size: 11px !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9) !important;
  }

  .action-icon-circle {
    width: 42px !important;
    height: 42px !important;
    background: rgba(0, 0, 0, 0.45) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
  }

  /* Modals on Phones: Safe Margins and Internal Scrolling */
  .modal-backdrop {
    padding: 10px 8px !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 3000 !important;
    box-sizing: border-box !important;
  }

  .modal-box {
    width: 100% !important;
    max-width: calc(100vw - 16px) !important;
    max-height: 88vh !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 0 !important;
  }

  .modal-header {
    padding: 12px 14px !important;
    position: sticky !important;
    top: 0 !important;
    background-color: #212121 !important;
    z-index: 10 !important;
  }

  .modal-header h3 {
    font-size: 16px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: calc(100vw - 70px) !important;
  }

  .modal-footer {
    padding: 10px 14px !important;
    position: sticky !important;
    bottom: 0 !important;
    background-color: #212121 !important;
    z-index: 10 !important;
    margin-top: 8px !important;
  }

  .upload-form {
    padding: 12px 14px !important;
  }

  .dropzone {
    padding: 18px 12px !important;
  }

  .quota-banner {
    padding: 10px 12px !important;
    font-size: 12px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .form-input, .form-textarea, .form-select {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 15px !important;
    box-sizing: border-box !important;
  }

  .auth-modal-box {
    padding: 16px !important;
    border-radius: 14px !important;
  }

  .legal-modal-box {
    width: 100% !important;
    max-width: calc(100vw - 16px) !important;
    padding: 12px 14px !important;
  }

  /* Channel Profile Mobile */
  .channel-banner-container {
    height: 90px !important;
    border-radius: 8px !important;
    margin-bottom: 12px !important;
  }

  .channel-profile-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding-bottom: 14px !important;
  }

  .channel-header-left {
    gap: 12px !important;
    align-items: center !important;
    width: 100% !important;
  }

  .channel-profile-avatar {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
  }

  .channel-profile-info {
    min-width: 0 !important;
    flex: 1 !important;
    overflow: hidden !important;
  }

  .channel-profile-title {
    font-size: 18px !important;
    line-height: 1.25 !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }

  .channel-profile-meta {
    font-size: 12px !important;
    flex-wrap: wrap !important;
  }

  .channel-header-actions {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .channel-header-actions button,
  .channel-header-actions a,
  .channel-header-actions .pill-btn,
  .channel-header-actions .primary-btn {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    min-height: 38px !important;
    padding: 8px 14px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-align: center !important;
    justify-content: center !important;
    align-items: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    border-radius: 20px !important;
  }

  .channel-tabs-bar {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    white-space: nowrap !important;
    gap: 14px !important;
    margin: 10px 0 16px 0 !important;
    scrollbar-width: none !important;
    padding-bottom: 2px !important;
  }

  .channel-tab {
    flex-shrink: 0 !important;
    padding: 8px 4px !important;
    font-size: 14px !important;
  }

  .channel-about-card {
    padding: 14px 12px !important;
    border-radius: 10px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .channel-stats-table {
    flex-direction: column !important;
    gap: 10px !important;
  }

  /* Admin Panel Mobile */
  .admin-panel-container {
    padding: 2px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .admin-stat-card {
    padding: 10px 12px !important;
  }

  .admin-stat-value {
    font-size: 20px !important;
  }

  .admin-tabs-bar {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    white-space: nowrap !important;
    gap: 6px !important;
    padding-bottom: 4px !important;
    scrollbar-width: none !important;
  }

  .admin-tab-btn {
    flex-shrink: 0 !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
  }

  .admin-subbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .admin-subbar-filters {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    white-space: nowrap !important;
    gap: 6px !important;
    padding-bottom: 4px !important;
    scrollbar-width: none !important;
  }

  .admin-subbar-filters .pill-btn {
    flex-shrink: 0 !important;
    padding: 4px 10px !important;
    font-size: 12px !important;
  }

  .admin-search-box {
    max-width: 100% !important;
    width: 100% !important;
  }

  .admin-table-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
  }

  .admin-table {
    min-width: 520px !important;
  }

  /* Custom Playlist and Other Views */
  .playlist-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  .playlist-cover-card {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Landscape Phone Orientation */
@media (max-height: 550px) and (orientation: landscape) {
  :root {
    --topbar-height: 44px;
  }
  .top-bar {
    height: 44px;
    padding: 0 10px;
  }
  .mobile-bottom-nav {
    display: none !important;
  }
  .main-content {
    padding: 6px 12px !important;
    padding-bottom: 12px !important;
  }
  .modal-box {
    max-height: 94vh;
  }
  .shorts-view-wrapper {
    height: calc(100vh - 50px);
  }
  .shorts-video-container {
    height: calc(100vh - 56px);
    max-height: 380px;
  }
  .video-player-container {
    max-height: 75vh;
  }
}

/* =========================================================
   AUTHOR ACTIONS & PINNED COMMENTS & EMAIL VERIFICATION
   ========================================================= */

.comment-item.pinned-comment {
  background: rgba(62, 166, 255, 0.05);
  border-left: 3px solid var(--accent-blue);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.comment-pinned-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-blue);
  margin-bottom: 6px;
}

.comment-pinned-indicator svg {
  fill: currentColor;
}

.comment-creator-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: rgba(255, 255, 255, 0.15);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  color: #fff;
  font-weight: 500;
}

.comment-creator-heart-badge {
  display: inline-flex;
  align-items: center;
  position: relative;
  margin-left: 4px;
  cursor: default;
}

.comment-creator-heart-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid #ff0000;
  object-fit: cover;
}

.comment-heart-icon-overlay {
  position: absolute;
  bottom: -4px;
  right: -5px;
  background: #ff0000;
  border-radius: 50%;
  width: 12px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 8px;
}

.comment-author-ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 12px;
  border-radius: 4px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
  transition: var(--transition);
}

.comment-author-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text-primary);
}

.comment-author-ctrl-btn.active {
  color: #ff4444;
  background: rgba(255, 68, 68, 0.15);
}

.comment-author-ctrl-btn.pinned {
  color: var(--accent-blue);
  background: rgba(62, 166, 255, 0.15);
}

.email-badge-status.verified {
  color: #4caf50;
  background: rgba(76, 175, 80, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
}

.email-badge-status.unverified {
  color: #ff9800;
  background: rgba(255, 152, 0, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
}

.text-link-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: 13px;
  text-decoration: underline;
}

.text-link-btn:hover {
  opacity: 0.85;
}

/* ========================================================= */
/* VERIFICATION & MUSICIAN BADGES                            */
/* ========================================================= */
.badge-verified {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #3ea6ff;
  margin-left: 4px;
  vertical-align: middle;
  font-size: 13px;
  line-height: 1;
}

.badge-verified svg {
  width: 14px;
  height: 14px;
  fill: #3ea6ff;
}

.badge-musician {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a855f7;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.3);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 5px;
  vertical-align: middle;
  gap: 3px;
  line-height: 1.2;
}

.badge-musician svg {
  width: 12px;
  height: 12px;
  fill: #c084fc;
}

/* ========================================================= */
/* REACTION BUTTONS (DISLIKE ONLY)                           */
/* ========================================================= */
.reaction-dislike-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #272727;
  color: var(--text-primary);
  border-radius: var(--radius-full);
  padding: 0 16px;
  height: 36px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s cubic-bezier(0.2, 0, 0.2, 1), background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  user-select: none;
}

.reaction-dislike-btn:hover {
  background: #383838;
}

.reaction-dislike-btn:active {
  transform: scale(0.92);
}

.reaction-dislike-btn.disliked {
  background: rgba(255, 68, 68, 0.22) !important;
  color: #ff4444 !important;
  border-color: rgba(255, 68, 68, 0.65) !important;
  box-shadow: 0 0 12px rgba(255, 68, 68, 0.25) !important;
}

.reaction-dislike-btn.disliked svg {
  fill: #ff4444 !important;
  stroke: #ff4444 !important;
  transform: scale(1.1);
  transition: transform 0.2s ease;
}

.reaction-dislike-btn.disliked span,
.reaction-dislike-btn.disliked #watchDislikesCount {
  color: #ff4444 !important;
  font-weight: 700 !important;
}

.shorts-action-btn {
  transition: transform 0.15s cubic-bezier(0.2, 0, 0.2, 1);
  user-select: none;
}

.shorts-action-btn:active {
  transform: scale(0.9);
}

.shorts-action-btn.disliked .action-icon-circle {
  background: rgba(255, 68, 68, 0.32) !important;
  color: #ff4444 !important;
  border: 2px solid #ff4444 !important;
  box-shadow: 0 0 14px rgba(255, 68, 68, 0.45) !important;
}

.shorts-action-btn.disliked svg {
  fill: #ff4444 !important;
  stroke: #ff4444 !important;
  transform: scale(1.12);
  transition: transform 0.2s ease;
}

.shorts-action-btn.disliked .action-label,
.shorts-action-btn.disliked #shortsDislikesCount {
  color: #ff4444 !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

/* ========================================================= */
/* NOTIFICATIONS CENTER DROPDOWN                             */
/* ========================================================= */
.notif-wrapper {
  position: relative;
  display: inline-block;
}

.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background-color: #cc0000;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: -50px;
  width: 380px;
  max-width: 90vw;
  background: #212121;
  border: 1px solid #383838;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.7);
  z-index: 1000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: notifFadeIn 0.15s ease-out;
}

@keyframes notifFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #333;
  background: #1a1a1a;
}

.notif-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  color: #fff;
}

.notif-header-title svg {
  fill: #3ea6ff;
}

#markAllNotifsReadBtn {
  color: #3ea6ff;
  font-size: 12px;
  font-weight: 500;
}

.notif-list {
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.notif-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #2a2a2a;
  cursor: pointer;
  transition: background 0.15s ease;
  position: relative;
}

.notif-item:hover {
  background: #2a2a2a;
}

.notif-item.unread {
  background: rgba(62, 166, 255, 0.08);
}

.notif-item.unread::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3ea6ff;
}

.notif-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.notif-body {
  flex: 1;
  min-width: 0;
}

.notif-text {
  font-size: 13px;
  color: #fff;
  line-height: 1.4;
  word-break: break-word;
}

.notif-time {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ========================================================= */
/* TYTS / SHORTS CONTAINER WITH VERTICAL SWIPE & SNAPPING   */
/* ========================================================= */
.shorts-feed-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: calc(100vh - 80px);
  width: 100%;
  overflow: hidden;
  user-select: none;
}

.shorts-card {
  position: relative;
  display: flex;
  gap: 16px;
  align-items: flex-end;
  height: 94%;
  max-height: 800px;
  aspect-ratio: 9 / 16;
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1);
}

.shorts-video-container {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  cursor: pointer;
}

.shorts-video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========================================================= */
/* NESTED COMMENTS TREE HIERARCHY                            */
/* ========================================================= */
.comments-tree {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.comment-node,
.comment-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.comment-reply-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  padding-left: 0 !important;
  border-left: none !important;
  box-sizing: border-box !important;
}

.comment-content-wrap {
  display: flex;
  gap: 12px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.comment-reply-item .comment-avatar {
  width: 30px;
  height: 30px;
  min-width: 30px;
}

.comment-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.comment-actions-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 2px;
  width: 100%;
  box-sizing: border-box;
}

/* Replies thread styling: ONLY one indentation step on root container */
.comment-replies-container {
  margin-left: 48px;
  border-left: 2px solid rgba(255, 255, 255, 0.12);
  padding-left: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 6px;
  width: auto;
  max-width: 100%;
  box-sizing: border-box;
}

/* Nested replies container inside an already indented branch - NO extra indentation! */
.comment-replies-container .comment-replies-container {
  margin-left: 0 !important;
  border-left: none !important;
  padding-left: 0 !important;
  width: 100% !important;
}

.comment-reply-box-wrapper {
  margin-left: 48px;
  margin-top: 6px;
  width: auto;
  box-sizing: border-box;
}

.comment-replies-container .comment-reply-box-wrapper {
  margin-left: 0 !important;
  width: 100% !important;
}

.comment-reply-form {
  margin-left: 48px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #1c1c1c;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #333;
  width: auto;
  box-sizing: border-box;
}

.comment-replies-container .comment-reply-form {
  margin-left: 0 !important;
  width: 100% !important;
}

.comment-reply-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.comment-replies-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--primary-accent, #3ea6ff);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 18px;
  cursor: pointer;
  margin-top: 4px;
  margin-bottom: 6px;
  margin-left: 48px;
  transition: background 0.15s ease, color 0.15s ease;
  width: fit-content;
}

.comment-replies-toggle-btn:hover {
  background: rgba(62, 166, 255, 0.12);
}

.comment-replies-toggle-btn .replies-toggle-icon {
  transition: transform 0.2s ease;
  display: inline-block;
}

.comment-replies-toggle-btn.expanded .replies-toggle-icon {
  transform: rotate(180deg);
}

.comment-replies-container .comment-replies-toggle-btn {
  margin-left: 0 !important;
}

.comment-action-reply-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 12px;
  transition: background 0.15s;
}

.comment-action-reply-btn:hover {
  background: #2a2a2a;
  color: var(--text-primary);
}

.comment-action-report-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 12px;
  transition: background 0.15s;
  display: inline-flex;
  align-items: center;
}

.comment-action-report-btn:hover {
  background: rgba(255, 68, 68, 0.15);
  color: #ff5252;
}

/* ========================================================= */
/* CHANNEL TABS & ABOUT PANE                                 */
/* ========================================================= */
.channel-tab-pane {
  padding-top: 16px;
}

.channel-about-card {
  background: #1c1c1c;
  border: 1px solid #2f2f2f;
  border-radius: 12px;
  padding: 24px;
  max-width: 800px;
}

.channel-about-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  border-bottom: 1px solid #2c2c2c;
  padding-bottom: 16px;
}

.channel-about-bio {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

.channel-about-bio a {
  color: #3ea6ff;
  text-decoration: underline;
}

.channel-about-bio a:hover {
  text-decoration: none;
}

.channel-stats-table {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.channel-stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.channel-stat-item svg {
  fill: var(--text-secondary);
}

/* ========================================================= */
/* ADMIN PANEL (#adminView)                                  */
/* ========================================================= */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 20px;
  margin-bottom: 24px;
}

.admin-stat-card {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 16px 20px;
}

.admin-stat-title {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.admin-stat-value {
  font-size: 28px;
  font-weight: 700;
  margin: 6px 0 4px 0;
}

.admin-stat-desc {
  font-size: 11px;
  color: #777;
}

.admin-tabs-bar {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #333;
  margin-bottom: 20px;
}

.admin-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-tab-btn:hover {
  color: #fff;
}

.admin-tab-btn.active {
  color: #3ea6ff;
  border-bottom-color: #3ea6ff;
}

.admin-tab-badge {
  background: #ff5252;
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 700;
}

.admin-subbar {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-subbar-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-search-box {
  max-width: 400px;
  width: 100%;
}

.admin-table-container {
  background: #181818;
  border: 1px solid #2e2e2e;
  border-radius: 10px;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.admin-table th {
  padding: 12px 14px;
  background: #212121;
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 1px solid #333;
  white-space: nowrap;
}

.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #262626;
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: #202020;
}

.admin-status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.admin-status-badge.pending {
  background: rgba(255, 152, 0, 0.15);
  color: #ff9800;
  border: 1px solid rgba(255, 152, 0, 0.3);
}

.admin-status-badge.resolved {
  background: rgba(76, 175, 80, 0.15);
  color: #4caf50;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.admin-status-badge.dismissed {
  background: rgba(158, 158, 158, 0.15);
  color: #9e9e9e;
  border: 1px solid rgba(158, 158, 158, 0.3);
}

.admin-btn-group {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.admin-btn.btn-resolve {
  background: #2ba640;
  color: #fff;
}

.admin-btn.btn-dismiss {
  background: #333;
  color: #ccc;
}

.admin-btn.btn-danger {
  background: #cc0000;
  color: #fff;
}

.admin-btn.btn-badge-toggle {
  background: #272727;
  color: #aaa;
  border: 1px solid #444;
}

.admin-btn.btn-badge-toggle.active {
  background: rgba(62, 166, 255, 0.15);
  color: #3ea6ff;
  border-color: #3ea6ff;
}

.admin-btn.btn-musician-toggle.active {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border-color: #a855f7;
}

.badge-verified-triple {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  vertical-align: middle;
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.3);
  padding: 1px 4px;
  border-radius: 6px;
  margin-left: 4px;
}

.badge-verified-triple svg {
  filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.4));
  transition: transform 0.15s ease;
}

.badge-verified-triple:hover svg {
  transform: scale(1.15);
}

.admin-items-list {
  background: #171717;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.admin-item-card {
  background: #171717;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 14px 18px;
  transition: background 0.15s ease;
}

.admin-item-card:last-child {
  border-bottom: none;
}

.admin-item-card:hover {
  background: #1f1f1f;
}

.admin-empty {
  padding: 40px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

/* ========================================================= */
/* LEGAL MODALS & FOOTER LINKS                               */
/* ========================================================= */
.sidebar-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.footer-legal-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-legal-btn:hover {
  color: #3ea6ff;
  text-decoration: underline;
}

.legal-modal-box {
  max-width: 680px;
  width: 90%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.legal-modal-body {
  overflow-y: auto;
  max-height: 60vh;
  padding: 8px 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
}

.legal-modal-body h4 {
  font-size: 15px;
  color: #fff;
  margin: 16px 0 8px 0;
}

.legal-modal-body ul {
  padding-left: 20px;
  margin: 8px 0;
}

.legal-modal-body li {
  margin-bottom: 6px;
}

.report-target-preview {
  padding: 10px 14px;
  background: #222;
  border-radius: 8px;
  border-left: 3px solid #ff5252;
  margin-bottom: 16px;
  font-size: 13px;
  color: #fff;
}

/* =========================================================
   NEW TYTS / SHORTS FULLSCREEN SCROLL-SNAP FEED
   ========================================================= */
.search-mini-logo {
  display: flex;
  align-items: center;
  margin-right: 8px;
  text-decoration: none;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.search-mini-logo:hover {
  transform: scale(1.08);
}
@media (max-width: 640px) {
  .search-mini-logo {
    display: none;
  }
}

.shorts-fullscreen-container {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--topbar-height));
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background-color: #050505;
}

.shorts-snap-feed {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
  align-items: center;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE */
}

.shorts-snap-feed::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.shorts-snap-item {
  width: 100%;
  height: calc(100vh - var(--topbar-height));
  min-height: calc(100vh - var(--topbar-height));
  max-height: calc(100vh - var(--topbar-height));
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-sizing: border-box;
  padding: 12px 16px;
}

.shorts-snap-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  height: 100%;
  max-height: 820px;
}

.shorts-snap-video-box {
  position: relative;
  height: 100%;
  aspect-ratio: 9 / 16;
  max-width: calc((100vh - var(--topbar-height) - 24px) * 9 / 16);
  background-color: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
  cursor: pointer;
  user-select: none;
}

.shorts-snap-video-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .shorts-fullscreen-container {
    height: calc(100vh - var(--topbar-height) - 56px - env(safe-area-inset-bottom, 0px));
  }
  .shorts-snap-item {
    height: calc(100vh - var(--topbar-height) - 56px - env(safe-area-inset-bottom, 0px));
    min-height: calc(100vh - var(--topbar-height) - 56px - env(safe-area-inset-bottom, 0px));
    max-height: calc(100vh - var(--topbar-height) - 56px - env(safe-area-inset-bottom, 0px));
    padding: 0;
  }
  .shorts-snap-card {
    width: 100%;
    height: 100%;
    gap: 0;
  }
  .shorts-snap-video-box {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
  }
  .shorts-snap-card .shorts-actions-column {
    position: absolute;
    right: 10px;
    bottom: 24px;
    z-index: 25;
  }
}

.channel-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 8px 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.channel-share-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.admin-verif-card {
  background: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-verif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-verif-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-verif-body {
  font-size: 13px;
  color: #ccc;
  background: rgba(0, 0, 0, 0.2);
  padding: 10px;
  border-radius: 6px;
  line-height: 1.5;
  word-break: break-word;
}

.admin-verif-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 4px;
}

/* =========================================================
   VERTICAL TYTS IN CHANNEL TAB & GRIDS
   ========================================================= */
.channel-tab-pane .shorts-shelf-cards,
#channelShortsGrid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
  gap: 16px !important;
  overflow-x: visible !important;
  padding: 16px 0 !important;
}

@media (max-width: 600px) {
  .channel-tab-pane .shorts-shelf-cards,
  #channelShortsGrid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    overflow-x: visible !important;
  }
}


/* =========================================================
   PLAYLISTS GRID & CARDS
   ========================================================= */
.playlists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  padding: 16px 0;
}

.playlist-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  background: var(--bg-card, #1e1e1e);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.playlist-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.16);
}

.playlist-card-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  overflow: hidden;
}

.playlist-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.playlist-card-badge-overlay {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 40%;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 8px;
  text-align: center;
}

.playlist-card-hover-play {
  position: absolute;
  top: 0;
  left: 0;
  width: 60%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  color: #fff;
  transition: opacity 0.15s ease;
}

.playlist-card:hover .playlist-card-hover-play {
  opacity: 1;
}

.playlist-card-meta {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.playlist-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.playlist-card-author {
  font-size: 13px;
  color: var(--text-secondary);
}

.playlist-card-date {
  font-size: 12px;
  color: var(--text-tertiary, #888);
}

/* =========================================================
   PLAYLIST DETAIL LAYOUT
   ========================================================= */
.playlist-detail-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 32px;
  padding: 16px 0 60px 0;
  align-items: start;
}

@media (max-width: 900px) {
  .playlist-detail-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.playlist-detail-sidebar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  position: sticky;
  top: 70px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.playlist-cover-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  background: #111;
}

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

.playlist-cover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.playlist-detail-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

.playlist-detail-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.playlist-author-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.playlist-detail-meta {
  font-size: 13px;
  color: var(--text-secondary);
}

.playlist-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.playlist-play-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-weight: 600;
}

.playlist-delete-btn {
  color: #ff5252;
}

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

.playlist-video-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s ease;
}

.playlist-video-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.playlist-video-index {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.playlist-video-thumb-wrap {
  position: relative;
  width: 120px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  background: #111;
}

.playlist-video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.playlist-video-details {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.playlist-video-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.playlist-video-meta {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.playlist-video-remove-btn {
  color: var(--text-secondary);
  opacity: 0.7;
}

.playlist-video-remove-btn:hover {
  opacity: 1;
  color: #ff5252;
}

/* =========================================================
   PLAYLIST QUEUE PANEL IN WATCH SIDEBAR
   ========================================================= */
.playlist-queue-panel {
  background: var(--bg-card, #1e1e1e);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}

.playlist-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.playlist-queue-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 2px 0;
}

.playlist-queue-index {
  font-size: 12px;
  color: var(--text-secondary);
}

.playlist-queue-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.playlist-queue-list {
  max-height: 320px;
  overflow-y: auto;
}

.playlist-queue-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s ease;
}

.playlist-queue-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.playlist-queue-item.active {
  background: rgba(62, 166, 255, 0.15);
  border-left: 3px solid var(--primary-accent, #3ea6ff);
}

.queue-item-index {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.queue-item-thumb-wrap {
  width: 64px;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: #111;
}

.queue-item-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.queue-item-info {
  flex: 1;
  min-width: 0;
}

.queue-item-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-item-author {
  font-size: 11px;
  color: var(--text-secondary);
}

/* =========================================================
   SEARCH CHANNEL CARDS & MOBILE SEARCH RESULTS
   ========================================================= */
.search-channels-section {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  width: 100%;
}

.search-channel-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card, #1e1e1e);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}

.search-channel-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.search-channel-avatar-link {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
}

.search-channel-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: #222;
}

.search-channel-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.search-channel-title-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--text-primary);
}

.search-channel-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-channel-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-channel-bio {
  font-size: 12px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.search-channel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.search-channel-actions .primary-btn,
.search-channel-actions .pill-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .search-channel-card {
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
  }

  .search-channel-avatar {
    width: 48px;
    height: 48px;
  }

  .search-channel-name {
    font-size: 14px;
  }

  .search-channel-meta {
    font-size: 11px;
    gap: 4px;
  }

  .search-channel-actions .primary-btn,
  .search-channel-actions .pill-btn {
    padding: 6px 12px;
    font-size: 12px;
    min-height: 36px;
  }

  .search-channel-actions .channel-go-btn {
    display: none;
  }
}

/* =========================================================
   PROGRESS BAR & CONTINUE WATCHING BADGE
   ========================================================= */
.video-progress-bar-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(0, 0, 0, 0.6);
  overflow: hidden;
  z-index: 3;
}

.video-progress-bar-fill {
  height: 100%;
  background: #ff0000;
  transition: width 0.2s ease;
}

.continue-watching-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(255, 0, 0, 0.9);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  z-index: 3;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* =========================================================
   PLAYLIST DETAIL VIEW MOBILE & OVERFLOW FIXES
   ========================================================= */
@media (max-width: 768px) {
  .playlist-detail-layout {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 10px 0 40px 0 !important;
  }

  .playlist-detail-sidebar {
    position: static !important;
    top: auto !important;
    padding: 16px !important;
    border-radius: 12px !important;
    gap: 12px !important;
  }

  .playlist-cover-box {
    max-width: 100% !important;
    border-radius: 8px !important;
  }

  .playlist-detail-title {
    font-size: 18px !important;
    line-height: 1.3 !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }

  .playlist-detail-actions {
    display: flex !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .playlist-play-all-btn,
  .playlist-delete-btn {
    flex: 1 !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 9px 12px !important;
    font-size: 13px !important;
    min-height: 38px !important;
    white-space: nowrap !important;
  }

  .playlist-video-item {
    gap: 10px !important;
    padding: 8px !important;
    border-radius: 8px !important;
  }

  .playlist-video-index {
    width: 18px !important;
    font-size: 12px !important;
    flex-shrink: 0 !important;
  }

  .playlist-video-thumb-wrap {
    width: 100px !important;
    border-radius: 6px !important;
    flex-shrink: 0 !important;
  }

  .playlist-video-details {
    min-width: 0 !important;
    flex: 1 !important;
    overflow: hidden !important;
  }

  .playlist-video-title {
    font-size: 13px !important;
    line-height: 1.3 !important;
    margin-bottom: 2px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }

  .playlist-video-meta {
    font-size: 11px !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    min-width: 0 !important;
  }

  .playlist-video-channel {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
}

/* =========================================================
   TOP CHANNELS LEADERBOARD STYLING
   ========================================================= */
.top-channels-container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto 32px;
  padding: 8px 4px 32px;
}

.top-channels-header {
  margin-bottom: 24px;
  padding: 18px 24px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 140, 0, 0.05) 50%, rgba(20, 20, 20, 0.4) 100%);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.top-channels-title {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-channels-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

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

.top-channel-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  transition: all 0.2s ease;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.top-channel-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* Top 3 rank highlighting */
.top-channel-card.rank-1 {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.12) 0%, rgba(255, 255, 255, 0.03) 70%);
  border-color: rgba(255, 215, 0, 0.4);
}

.top-channel-card.rank-2 {
  background: linear-gradient(90deg, rgba(192, 192, 192, 0.12) 0%, rgba(255, 255, 255, 0.03) 70%);
  border-color: rgba(192, 192, 192, 0.4);
}

.top-channel-card.rank-3 {
  background: linear-gradient(90deg, rgba(205, 127, 50, 0.12) 0%, rgba(255, 255, 255, 0.03) 70%);
  border-color: rgba(205, 127, 50, 0.4);
}

/* Rank badges */
.top-channel-rank-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
  background: #252525;
  color: var(--text-secondary);
}

.rank-badge-1 {
  background: linear-gradient(135deg, #ffd700 0%, #ffae00 100%);
  color: #000;
  box-shadow: 0 2px 10px rgba(255, 215, 0, 0.4);
}

.rank-badge-2 {
  background: linear-gradient(135deg, #e0e0e0 0%, #a8a8a8 100%);
  color: #000;
  box-shadow: 0 2px 10px rgba(192, 192, 192, 0.4);
}

.rank-badge-3 {
  background: linear-gradient(135deg, #e69a5c 0%, #b86928 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(205, 127, 50, 0.4);
}

.top-channel-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.top-channel-avatar:hover {
  transform: scale(1.06);
}

.top-channel-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.top-channel-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.top-channel-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-channel-name:hover {
  color: #3ea6ff;
}

.top-channel-handle {
  font-size: 13px;
  color: var(--text-secondary);
}

.top-channel-country-badge,
.channel-country-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.top-channel-bio {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.top-channel-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.top-channel-stats strong {
  color: #fff;
  font-weight: 600;
}

.top-channel-actions {
  flex-shrink: 0;
  margin-left: auto;
}

.top-channel-sub-btn {
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: #fff;
  color: #0f0f0f;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.top-channel-sub-btn:hover {
  background: #d9d9d9;
}

.top-channel-sub-btn.subscribed {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.top-channel-sub-btn.subscribed:hover {
  background: rgba(255, 255, 255, 0.25);
}

.top-channel-sub-btn.self {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-secondary);
  cursor: default;
}

/* Enhanced notifications styles */
.notif-avatar-link {
  flex-shrink: 0;
  display: inline-block;
}

.notif-item-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

.notif-item-message {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-target-thumb {
  width: 48px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  background: #1e1e1e;
}

@media (max-width: 600px) {
  .top-channel-card {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px;
  }
  .top-channel-actions {
    width: 100%;
    margin-left: 0;
    margin-top: 6px;
  }
  .top-channel-sub-btn {
    width: 100%;
    text-align: center;
  }
}

/* =========================================================
   POSTS («ЗАПИСЬКИ») & POLLS SYSTEM
   Mobile-first, responsive & high-contrast styling
   ========================================================= */
.home-posts-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 0 32px 0;
  width: 100%;
}

.posts-feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

.posts-feed-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.posts-feed-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.posts-feed-subtitle {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin: 0;
}

/* Quick Post Card */
.quick-create-post-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #181818;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 24px;
}

.quick-post-avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #282828;
}

.quick-post-input-trigger {
  flex: 1;
  background: #242424;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 10px 16px;
  color: var(--text-secondary);
  font-size: 14.5px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-post-input-trigger:hover {
  background: #2c2c2c;
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.16);
}

.quick-post-actions-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.quick-post-media-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-post-media-btn:hover {
  color: #3ea6ff;
  background: rgba(62, 166, 255, 0.1);
}

/* Post Cards Feed */
.posts-feed {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.post-card {
  background: #181818;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.2s ease;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.post-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.post-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.post-card-author-info {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.post-card-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #222;
}

.post-card-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.post-card-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.post-card-author-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.post-card-author-handle {
  font-size: 13px;
  color: var(--text-secondary);
}

.post-card-time {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.post-card-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.post-delete-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.post-delete-btn:hover {
  color: #ff5252;
  background: rgba(255, 82, 82, 0.12);
}

/* Post Text Content */
.post-card-content {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--text-primary);
  word-break: break-word;
  white-space: pre-line;
}

/* Post Attached Image */
.post-media-wrap {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.post-media-image {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  display: block;
  background: #0d0d0d;
}

/* Post Poll Component */
.post-poll-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #202020;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  margin-top: 4px;
}

.post-poll-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Unvoted Poll Option Button */
.poll-option-btn {
  width: 100%;
  text-align: left;
  background: #2a2a2a;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 12px 18px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}

.poll-option-btn:hover {
  background: #333333;
  border-color: #3ea6ff;
  color: #fff;
}

.poll-option-radio-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  display: inline-block;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.poll-option-btn:hover .poll-option-radio-dot {
  border-color: #3ea6ff;
}

/* Voted Poll Option Progress Bar */
.poll-voted-row {
  position: relative;
  width: 100%;
  min-height: 46px;
  border-radius: 8px;
  background: #262626;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-sizing: border-box;
}

.poll-voted-row.user-choice {
  border-color: #3ea6ff;
  background: rgba(62, 166, 255, 0.06);
}

.poll-progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 1;
}

.poll-voted-row.user-choice .poll-progress-fill {
  background: rgba(62, 166, 255, 0.28);
}

.poll-option-label-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-primary);
  max-width: 80%;
  word-break: break-word;
}

.poll-check-badge {
  color: #3ea6ff;
  display: inline-flex;
  align-items: center;
  font-weight: 700;
}

.poll-percent-label {
  position: relative;
  z-index: 2;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.poll-meta-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Post Actions Bar */
.post-card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.post-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 20px;
  padding: 8px 14px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 40px;
}

.post-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.post-action-btn.active-dislike {
  color: #ff5252;
  background: rgba(255, 82, 82, 0.12);
}

/* Create Post Modal Styling (Mobile Fullscreen Capable) */
.post-modal-box {
  max-width: 600px;
  width: 96%;
  background: #1c1c1c;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8);
}

.post-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #202020;
}

.post-modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.post-modal-cancel-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 0.15s;
}

.post-modal-cancel-btn:hover {
  color: var(--text-primary);
}

.post-modal-publish-btn {
  background: #3ea6ff;
  border: none;
  color: #000;
  font-size: 14.5px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.post-modal-publish-btn:hover {
  background: #65b8ff;
  transform: translateY(-1px);
}

.post-modal-publish-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.post-modal-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 70vh;
  overflow-y: auto;
}

.post-modal-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.post-author-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.post-author-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.post-author-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.post-visibility-tag {
  font-size: 12px;
  color: #3ea6ff;
  background: rgba(62, 166, 255, 0.12);
  padding: 2px 8px;
  border-radius: 10px;
  display: inline-block;
  width: fit-content;
}

.post-textarea-wrap {
  width: 100%;
}

.post-content-textarea {
  width: 100%;
  min-height: 120px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 16.5px; /* Prevent auto-zoom on iOS */
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
  font-family: inherit;
}

.post-image-preview-container {
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  max-height: 300px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.post-image-preview-container img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  display: block;
}

.post-image-remove-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.post-image-remove-btn:hover {
  background: rgba(255, 82, 82, 0.9);
}

/* Poll Builder in Modal */
.poll-builder-container {
  background: #242424;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.poll-builder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.poll-builder-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #3ea6ff;
  font-weight: 700;
  font-size: 14.5px;
}

.poll-builder-remove-btn {
  background: transparent;
  border: none;
  color: #ff5252;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.poll-options-inputs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.poll-option-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.poll-option-text-input {
  flex: 1;
  background: #181818;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 16px; /* Prevents auto-zoom on iOS */
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.poll-option-text-input:focus {
  border-color: #3ea6ff;
}

.poll-option-delete-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.poll-option-delete-btn:hover {
  color: #ff5252;
  background: rgba(255, 82, 82, 0.1);
}

.poll-add-option-btn {
  background: transparent;
  border: 1.5px dashed rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 10px;
  color: #3ea6ff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.poll-add-option-btn:hover {
  border-color: #3ea6ff;
  background: rgba(62, 166, 255, 0.08);
}

.poll-add-option-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

.post-modal-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #202020;
}

.post-bottom-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-action-tool-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.post-action-tool-btn:hover {
  background: rgba(62, 166, 255, 0.12);
  border-color: rgba(62, 166, 255, 0.3);
  color: #3ea6ff;
}

.post-action-tool-btn.active-tool {
  background: rgba(62, 166, 255, 0.2);
  border-color: #3ea6ff;
  color: #3ea6ff;
}

.action-tool-label {
  font-size: 9.5px;
  font-weight: 600;
  margin-top: 1px;
}

.post-char-counter {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Post Comments Bottom Sheet / Modal */
.post-comments-sheet-box {
  max-width: 580px;
  width: 96%;
  background: #1a1a1a;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 80vh;
  max-height: 640px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85);
}

.sheet-drag-handle {
  display: none;
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  margin: 10px auto 4px auto;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sheet-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sheet-title {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.sheet-count-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 12px;
}

.sheet-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.post-comment-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.post-comment-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #252525;
}

.post-comment-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.post-comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-comment-author-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-comment-author-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.post-comment-time {
  font-size: 12px;
  color: var(--text-secondary);
}

.post-comment-delete-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 2px 6px;
  font-size: 12px;
  border-radius: 4px;
}

.post-comment-delete-btn:hover {
  color: #ff5252;
}

.post-comment-text {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-primary);
  word-break: break-word;
}

.sheet-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #1f1f1f;
}

.sheet-comment-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sheet-comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.sheet-comment-input {
  flex: 1;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 9px 16px;
  color: var(--text-primary);
  font-size: 16px; /* >=16px prevents iOS zoom */
  outline: none;
  font-family: inherit;
}

.sheet-comment-input:focus {
  border-color: #3ea6ff;
}

.sheet-comment-send-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  background: #3ea6ff;
  border: none;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

.sheet-comment-send-btn:hover {
  background: #65b8ff;
  transform: scale(1.05);
}

.sheet-comment-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* =========================================================
   MOBILE OPTIMIZATIONS (@media max-width: 768px)
   ========================================================= */
@media (max-width: 768px) {
  /* Fullscreen Post Creation Modal on Mobile */
  .post-modal-box {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
    border: none !important;
  }

  .post-modal-body {
    max-height: none !important;
    flex: 1 !important;
  }

  /* Bottom-Sheet Animation & Layout on Mobile */
  #postCommentsModal {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  .post-comments-sheet-box {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    border-bottom: none !important;
    height: 85vh !important;
    max-height: 85vh !important;
    animation: slideUpSheet 0.25s cubic-bezier(0.1, 0.9, 0.2, 1);
  }

  .sheet-drag-handle {
    display: block;
  }

  @keyframes slideUpSheet {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  .post-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 14px 16px;
  }

  .quick-create-post-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin-bottom: 12px;
  }
}




