/* ========================================
   PawTube - YouTube-Style Redesign
   ======================================== */

/* CSS Variables - YouTube Dark Theme */
:root {
  --bg-primary: #0f0f0f;
  --bg-secondary: #121212;
  --bg-elevated: #1f1f1f;
  --bg-hover: #272727;
  --bg-active: #3f3f3f;
  --border-color: #303030;
  --text-primary: #f1f1f1;
  --text-secondary: #aaaaaa;
  --text-disabled: #717171;
  --brand-red: #ff0000;
  --brand-red-hover: #cc0000;
  --brand-blue: #3ea6ff;
  --success: #2ba640;
  --error: #ff4d4d;
  --header-height: 56px;
  --sidebar-width: 240px;
  --sidebar-collapsed: 72px;
  --bottom-nav-height: 56px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.35s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

button, input {
  font-family: inherit;
}

button {
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
}

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

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

/* Material Symbols */
.material-symbols-rounded {
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
  font-size: 24px;
  line-height: 1;
}

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

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-center {
  flex: 1;
  max-width: 640px;
  display: flex;
  justify-content: center;
}

/* Icon Button */
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: background var(--transition-fast);
  flex-shrink: 0;
}

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

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

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

.logo-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.logo-icon svg {
  width: 100%;
  height: 100%;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  white-space: nowrap;
}

/* Search Bar */
.search-bar {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 640px;
  min-width: 0;
}

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

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

.search-bar input:focus {
  border-color: var(--brand-blue);
}

.search-btn {
  width: 40px;
  height: 40px;
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: background var(--transition-fast);
  flex-shrink: 0;
}

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

/* ========================================
   SIDEBAR
   ======================================== */
.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-primary);
  border-right: 1px solid var(--border-color);
  padding: 12px 0;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 90;
  transform: translateX(-100%);
  transition: transform var(--transition-normal);
}

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

.sidebar-nav {
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  transition: background var(--transition-fast);
}

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

.nav-item.active {
  background: var(--bg-hover);
  font-weight: 600;
}

.nav-icon {
  font-size: 24px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.sidebar-heading {
  padding: 0 24px 8px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
}

.sidebar-footer {
  margin-top: auto;
  padding: 24px 24px 32px;
}

.footer-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.footer-text.sub {
  color: var(--text-disabled);
}

/* Sidebar Overlay */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 85;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.sidebar-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* ========================================
   MAIN CONTENT
   ======================================== */
.main-content {
  margin-top: var(--header-height);
  padding: 24px 16px calc(var(--bottom-nav-height) + 24px);
  min-height: calc(100vh - var(--header-height));
}

/* ========================================
   BOTTOM NAV (Mobile)
   ======================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  transition: color var(--transition-fast), background var(--transition-fast);
  min-width: 64px;
}

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

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

.bnav-item .material-symbols-rounded {
  font-size: 24px;
}

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

/* ========================================
   CATEGORY CHIPS
   ======================================== */
.category-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 16px;
  margin: -4px 0 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.category-chip {
  flex-shrink: 0;
  padding: 8px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

.category-chip:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.category-chip.active {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
  font-weight: 600;
}

/* ========================================
   VIDEO GRID
   ======================================== */
.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px 16px;
}

.video-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.video-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.video-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Video Card */
.video-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: transform var(--transition-fast);
}

.video-card:hover {
  transform: translateY(-2px);
}

.thumbnail-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-elevated);
}

.thumbnail-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.video-card:hover .thumbnail-wrap img {
  transform: scale(1.04);
}

.thumbnail-wrap .play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.video-card:hover .play-overlay {
  opacity: 1;
}

.play-overlay .material-symbols-rounded {
  font-size: 48px;
  color: white;
}

.duration-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0,0,0,0.85);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  font-family: 'Roboto Mono', monospace;
}

.card-info {
  display: flex;
  gap: 12px;
  padding: 0 4px;
}

.channel-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-red);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  text-transform: uppercase;
}

.card-meta {
  flex: 1;
  min-width: 0;
}

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

.card-channel {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.card-extra {
  font-size: 12px;
  color: var(--text-disabled);
  line-height: 1.4;
}

/* ========================================
   SECTION HEADER
   ======================================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title .material-symbols-rounded {
  font-size: 24px;
  color: var(--brand-red);
}

.section-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-xl);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  border: none;
}

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

.btn-primary:hover {
  background: #e0e0e0;
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--text-disabled);
}

.btn-danger {
  background: var(--brand-red);
  color: white;
}

.btn-danger:hover {
  background: var(--brand-red-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

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

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

/* ========================================
   PAGE: HOME
   ======================================== */
.home-page {
  max-width: 1400px;
  margin: 0 auto;
}

.hero-banner {
  background: linear-gradient(135deg, var(--brand-red) 0%, #cc0000 100%);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  margin-bottom: 24px;
  color: white;
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}

.hero-title {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 8px;
  position: relative;
}

.hero-subtitle {
  font-size: 15px;
  opacity: 0.9;
  margin-bottom: 20px;
  max-width: 500px;
  position: relative;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
}

.hero-btn {
  padding: 10px 24px;
  border-radius: var(--radius-xl);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-btn-primary {
  background: white;
  color: var(--brand-red);
}

.hero-btn-primary:hover {
  background: #f0f0f0;
}

.hero-btn-secondary {
  background: rgba(255,255,255,0.2);
  color: white;
  backdrop-filter: blur(8px);
}

.hero-btn-secondary:hover {
  background: rgba(255,255,255,0.3);
}

/* Search Section */
.search-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 24px;
}

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

.search-input {
  flex: 1;
  height: 44px;
  padding: 0 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition-fast);
}

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

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

/* ========================================
   PAGE: WATCH
   ======================================== */
.watch-page {
  max-width: 1400px;
  margin: 0 auto;
}

.watch-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.player-section {
  min-width: 0;
}

.player-container {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.player-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.player-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  text-align: center;
  padding: 24px;
}

.player-placeholder .material-symbols-rounded {
  font-size: 64px;
  color: var(--text-disabled);
}

.player-placeholder p {
  font-size: 15px;
  max-width: 320px;
  line-height: 1.5;
}

.player-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15,15,15,0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-primary);
  text-align: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.player-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.player-overlay .material-symbols-rounded {
  font-size: 48px;
  color: var(--brand-red);
}

.video-details {
  margin-top: 16px;
}

.video-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 12px;
}

.video-actions-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.related-section {
  min-width: 0;
}

.related-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.related-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.related-card {
  display: flex;
  gap: 10px;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

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

.related-thumb {
  width: 160px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-elevated);
  flex-shrink: 0;
}

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

.related-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

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

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

/* ========================================
   PAGE: HISTORY
   ======================================== */
.history-page {
  max-width: 1400px;
  margin: 0 auto;
}

.history-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-secondary);
}

.history-empty .material-symbols-rounded {
  font-size: 64px;
  color: var(--text-disabled);
  margin-bottom: 16px;
}

.history-empty h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.history-empty p {
  font-size: 14px;
  max-width: 300px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ========================================
   STATES
   ======================================== */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--text-secondary);
  gap: 10px;
  font-size: 14px;
}

.loading-spinner::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--brand-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-secondary);
}

.empty-state .material-symbols-rounded {
  font-size: 48px;
  color: var(--text-disabled);
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 14px;
}

.error-state {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-secondary);
}

.error-state .material-symbols-rounded {
  font-size: 48px;
  color: var(--error);
  margin-bottom: 12px;
}

/* ========================================
   TOAST
   ======================================== */
.toast {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + 20px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-normal);
  white-space: nowrap;
}

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

/* ========================================
   ABOUT MODAL
   ======================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform var(--transition-normal);
  box-shadow: var(--shadow-lg);
}

.modal-overlay.show .modal {
  transform: scale(1);
}

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

.modal-title {
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

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

.modal-body {
  overflow-y: auto;
  padding: 20px;
  flex: 1;
}

/* About Content */
.about-section {
  margin-bottom: 24px;
}

.about-section:last-child {
  margin-bottom: 0;
}

.about-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.about-description {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  text-align: center;
}

.about-description strong {
  color: var(--text-primary);
}

.about-heading {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.about-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.about-text.muted {
  color: var(--text-disabled);
  font-size: 13px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.feature-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  transition: border-color var(--transition-fast);
}

.feature-card:hover {
  border-color: var(--text-disabled);
}

.feature-icon {
  font-size: 28px;
  color: var(--brand-red);
  margin-bottom: 8px;
}

.feature-card h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.feature-card p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

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

.step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.step-number {
  width: 32px;
  height: 32px;
  background: var(--brand-red);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.step p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-top: 5px;
}

.about-footer {
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.version-tag {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  font-family: 'Roboto Mono', monospace;
}

/* ========================================
   THEATER MODE
   ======================================== */
body.theater .header,
body.theater .sidebar,
body.theater .bottom-nav {
  display: none;
}

body.theater .main-content {
  margin-top: 0;
  padding: 0;
}

body.theater .player-container {
  border-radius: 0;
  max-height: 100vh;
}

body.theater .watch-layout {
  gap: 0;
}

body.theater .video-details,
body.theater .related-section {
  padding: 16px;
}

body.theater .theater-exit {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 500;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: background var(--transition-fast);
}

body.theater .theater-exit:hover {
  background: rgba(0,0,0,0.9);
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

/* Tablet: 600px+ */
@media (min-width: 600px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-banner {
    padding: 40px 32px;
  }
}

/* Desktop: 900px+ */
@media (min-width: 900px) {
  .sidebar {
    transform: translateX(0);
  }

  .menu-btn {
    display: none;
  }

  .main-content {
    margin-left: var(--sidebar-width);
    padding: 24px 28px;
  }

  .bottom-nav {
    display: none;
  }

  .main-content {
    padding-bottom: 24px;
  }

  .toast {
    bottom: 24px;
  }

  .video-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .watch-layout {
    grid-template-columns: 1fr 340px;
  }

  .hero-title {
    font-size: 36px;
  }
}

/* Large Desktop: 1200px+ */
@media (min-width: 1200px) {
  .video-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Collapsed sidebar on desktop */
@media (min-width: 900px) {
  .sidebar.collapsed {
    width: var(--sidebar-collapsed);
  }

  .sidebar.collapsed .nav-label,
  .sidebar.collapsed .sidebar-heading,
  .sidebar.collapsed .sidebar-footer {
    display: none;
  }

  .sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 14px;
  }

  .sidebar.collapsed .nav-icon {
    margin: 0;
  }

  .sidebar.collapsed + .main-content {
    margin-left: var(--sidebar-collapsed);
  }
}

/* Small mobile adjustments */
@media (max-width: 599px) {
  .header-center {
    display: none;
  }

  .hero-banner {
    padding: 24px 20px;
  }

  .hero-title {
    font-size: 22px;
  }

  .hero-subtitle {
    font-size: 13px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .search-row {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .search-row .btn {
    flex-shrink: 0;
  }

  .related-thumb {
    width: 120px;
  }

  .video-actions-bar {
    gap: 6px;
  }

  .video-actions-bar .btn {
    padding: 8px 12px;
    font-size: 13px;
  }

  .modal {
    max-height: 90vh;
    margin: 0 0;
  }

  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 85vh;
  }
}

/* Extra small */
@media (max-width: 359px) {
  .logo-text {
    display: none;
  }

  .video-grid {
    gap: 14px 10px;
  }

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

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

/* Focus styles */
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--text-disabled);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Logo images */
.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.about-logo img {
  display: block;
}

/* ========================================
   SAVE BUTTON (Watch Later)
   ======================================== */
.save-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
  z-index: 2;
  padding: 0;
}

.video-card:hover .save-btn,
.related-card:hover .save-btn {
  opacity: 1;
}

.save-btn.saved {
  opacity: 1;
  background: var(--brand-red);
  color: white;
}

.save-btn:hover {
  background: rgba(0,0,0,0.8);
}

.save-btn.saved:hover {
  background: var(--brand-red-hover);
}

.save-btn .material-symbols-rounded {
  font-size: 18px;
}

/* Compact card save button */
.related-card .save-btn {
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
}

.related-card .save-btn .material-symbols-rounded {
  font-size: 16px;
}

/* ========================================
   CHANNEL AVATAR WITH IMAGE
   ======================================== */
.channel-avatar-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-red);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  text-transform: uppercase;
  overflow: hidden;
  position: relative;
}

.channel-avatar-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
}

.channel-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  border-radius: 50%;
}

