/* YouFlow PWA - Modern YouTube Style CSS */
:root {
  --bg-main: #0f0f0f;
  --bg-sidebar: #0f0f0f;
  --bg-card: #181818;
  --bg-elevated: #212121;
  --bg-hover: #272727;
  --bg-active: #383838;
  --border-color: #303030;
  
  --text-main: #f1f1f1;
  --text-secondary: #aaaaaa;
  --text-muted: #717171;
  
  --brand-red: #ff0033;
  --brand-red-hover: #cc0029;
  --accent-blue: #3ea6ff;
  
  --header-height: 58px;
  --sidebar-width: 210px;
  --bottom-nav-height: 56px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.4;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: #555;
}

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

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

.hidden {
  display: none !important;
}

/* App Container Layout */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 16px;
  background-color: rgba(15, 15, 15, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

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

.logo-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-icon {
  border-radius: 8px;
}

.pwa-badge {
  font-size: 0.65rem;
  background-color: var(--brand-red);
  color: #fff;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  letter-spacing: 0.5px;
}

.header-center {
  flex: 1;
  max-width: 600px;
  margin: 0 20px;
  position: relative;
}

.search-bar {
  display: flex;
  align-items: center;
  width: 100%;
  position: relative;
}

.search-input {
  width: 100%;
  height: 40px;
  padding: 0 16px 0 18px;
  background-color: #121212;
  border: 1px solid var(--border-color);
  border-right: none;
  border-radius: 40px 0 0 40px;
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--accent-blue);
  background-color: #000;
}

.search-btn {
  height: 40px;
  width: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #222;
  border: 1px solid var(--border-color);
  border-radius: 0 40px 40px 0;
  color: var(--text-main);
  transition: var(--transition);
}

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

.search-suggestions-dropdown {
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  z-index: 120;
}

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 0.92rem;
  transition: background 0.15s;
}

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

.suggestion-item svg {
  color: var(--text-muted);
}

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

.icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--text-main);
  transition: background 0.15s;
}

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

.btn-install-pwa {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: var(--brand-red);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-install-pwa:hover {
  background-color: var(--brand-red-hover);
  transform: translateY(-1px);
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid #3ea6ff;
  border-radius: var(--radius-full);
  color: #3ea6ff;
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition);
}

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

.user-btn.logged-in {
  border-color: var(--border-color);
  color: var(--text-main);
  padding: 4px 10px;
}

.user-avatar-mini {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.user-name-label {
  font-size: 0.85rem;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Body Layout */
.app-body {
  display: flex;
  flex: 1;
}

/* Sidebar */
.app-sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  padding: 12px 8px;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.15s;
  text-align: left;
}

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

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

.nav-item.active svg {
  color: var(--brand-red);
}

/* Main Content Area */
.app-main {
  flex: 1;
  padding: 16px 24px;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

/* PWA Install Banner */
.pwa-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, #1f1214 0%, #261619 100%);
  border: 1px solid #5a1c22;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  gap: 16px;
}

.pwa-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
}

.pwa-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* Chips Bar */
.chips-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0 16px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips-wrapper::-webkit-scrollbar {
  display: none;
}

.chip {
  padding: 7px 14px;
  background-color: var(--bg-elevated);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-main);
  white-space: nowrap;
  transition: var(--transition);
}

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

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

/* Section Header */
.section-header {
  margin-bottom: 18px;
}

.section-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
}

/* Video Grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

/* Video Card */
.video-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

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

.thumbnail-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #222;
}

.thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background-color: rgba(0, 0, 0, 0.82);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.quick-btn-watch-later {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
}

.video-card:hover .quick-btn-watch-later {
  opacity: 1;
}

.quick-btn-watch-later.active {
  opacity: 1;
  background-color: var(--brand-red);
}

.video-details {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  padding: 0 4px;
}

.channel-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
}

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

.video-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.channel-name {
  font-size: 0.84rem;
  color: var(--text-secondary);
  transition: color 0.15s;
}

.channel-name:hover {
  color: var(--text-main);
}

.stats-row {
  display: flex;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Watch View */
.watch-layout {
  display: flex;
  flex-direction: column;
}

.watch-top-bar {
  margin-bottom: 14px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background-color: var(--bg-elevated);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.15s;
}

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

.watch-content-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
}

.watch-primary {
  display: flex;
  flex-direction: column;
}

.player-container {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: #000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.player-wrapper {
  position: relative;
  width: 100%;
}

.aspect-16-9 {
  aspect-ratio: 16 / 9;
}

.player-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Theater Mode */
.theater-mode .watch-content-grid {
  grid-template-columns: 1fr;
}
.theater-mode .player-wrapper {
  max-height: 80vh;
}

.watch-header {
  margin-top: 14px;
}

.watch-video-title {
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.35;
}

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

.watch-meta-left {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.watch-meta-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background-color: var(--bg-elevated);
  border-radius: var(--radius-full);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-main);
  transition: var(--transition);
}

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

.action-btn.active {
  background-color: #fff;
  color: #000;
}

.watch-channel-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}

.channel-name-large {
  font-size: 1.05rem;
  font-weight: 600;
  display: block;
}

.channel-sub-count {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.btn-sub {
  padding: 9px 20px;
  background-color: #fff;
  color: #000;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.btn-sub:hover {
  opacity: 0.9;
}

.btn-sub.subscribed {
  background-color: var(--bg-elevated);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.watch-description-box {
  margin-top: 14px;
  background-color: var(--bg-card);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.5;
  color: #dedede;
  max-height: 250px;
  overflow-y: auto;
}

.watch-comments-section {
  margin-top: 20px;
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

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

.comments-header h3 {
  font-size: 1.05rem;
}

.btn-toggle-comments svg {
  transition: transform 0.2s;
}
.btn-toggle-comments.open svg {
  transform: rotate(180deg);
}

.comments-list.collapsed {
  display: none;
}

.comment-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.88rem;
}

.comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.comment-author {
  font-weight: 600;
  font-size: 0.85rem;
}

.comment-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.comment-text {
  line-height: 1.4;
  color: #e5e5e5;
  word-break: break-word;
}

.comment-likes {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Related Column */
.related-heading {
  font-size: 1.05rem;
  margin-bottom: 14px;
}

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

.related-videos-list .video-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
}

.related-videos-list .thumbnail-wrapper {
  aspect-ratio: 16 / 9;
}

.related-videos-list .video-title {
  font-size: 0.86rem;
  -webkit-line-clamp: 2;
}

/* Channel View */
.channel-header {
  margin-bottom: 24px;
}

.channel-banner {
  width: 100%;
  height: 180px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.channel-profile {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.channel-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.channel-info {
  flex: 1;
}

.channel-title {
  font-size: 1.4rem;
  font-weight: 700;
}

.channel-subs {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 4px 0 8px 0;
}

.channel-bio {
  font-size: 0.86rem;
  color: #bbb;
  max-width: 600px;
}

/* Subscriptions Bar */
.subscriptions-channels-bar {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 8px 0 18px 0;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.sub-channel-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 72px;
  cursor: pointer;
  text-align: center;
}

.sub-channel-chip img {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  object-fit: cover;
  margin-bottom: 6px;
  border: 2px solid transparent;
  transition: border-color 0.15s;
}

.sub-channel-chip:hover img {
  border-color: var(--brand-red);
}

.sub-channel-chip span {
  font-size: 0.76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* Library View */
.library-sections {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

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

.library-header h3 {
  font-size: 1.15rem;
}

.btn-text-danger {
  color: #ff5252;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

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

.modal-header h2 {
  font-size: 1.2rem;
}

.modal-close {
  font-size: 1.6rem;
  line-height: 1;
  color: var(--text-muted);
}
.modal-close:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-input {
  width: 100%;
  padding: 10px 14px;
  background-color: #121212;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.92rem;
  outline: none;
}
.modal-input:focus {
  border-color: var(--accent-blue);
}

.btn-primary {
  padding: 10px 18px;
  background-color: var(--brand-red);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.15s;
}
.btn-primary:hover {
  background-color: var(--brand-red-hover);
}

.btn-secondary {
  padding: 9px 16px;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.88rem;
}
.btn-secondary:hover {
  background-color: var(--bg-hover);
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 18px;
  background-color: #ffffff;
  color: #3c4043;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: opacity 0.15s;
}
.btn-google:hover {
  opacity: 0.94;
}

.btn-danger {
  padding: 10px 18px;
  background-color: #3a1518;
  border: 1px solid #772027;
  color: #ff6b6b;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
}
.btn-danger:hover {
  background-color: #551c22;
}

.full-width {
  width: 100%;
}

.auth-guest-banner {
  display: flex;
  gap: 14px;
  background-color: rgba(255, 0, 51, 0.08);
  border: 1px solid rgba(255, 0, 51, 0.25);
  padding: 14px;
  border-radius: var(--radius-md);
}

.auth-guest-banner svg {
  color: var(--brand-red);
  flex-shrink: 0;
}

.auth-guest-banner h4 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.auth-guest-banner p {
  font-size: 0.82rem;
  color: #bbb;
}

.auth-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-option-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-option-card h4 {
  font-size: 0.95rem;
}

.auth-option-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.auth-logged-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 12px 0;
}

.auth-avatar-large {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.auth-email {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.auth-mode-badge {
  background-color: #272727;
  color: #4caf50;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-top: 4px;
}

.settings-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-group label {
  font-size: 0.88rem;
  font-weight: 500;
}

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

/* Toast */
.toast-container {
  position: fixed;
  bottom: 74px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2000;
  pointer-events: none;
}

.toast {
  background-color: #222;
  color: #fff;
  border: 1px solid #444;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  animation: toastIn 0.25s ease-out;
  transition: opacity 0.3s ease;
}

.toast.fade-out {
  opacity: 0;
}

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

/* Mobile Bottom Nav */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background-color: rgba(15, 15, 15, 0.98);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-color);
  z-index: 100;
  justify-content: space-around;
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  color: var(--text-muted);
  flex: 1;
}

.mobile-nav-btn.active {
  color: var(--brand-red);
  font-weight: 600;
}

/* Loading & Empty States */
.loading-state, .empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--text-secondary);
  gap: 14px;
}

.spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: var(--brand-red);
  animation: spin 0.8s linear infinite;
}

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

.error-box {
  background-color: #211214;
  border: 1px solid #5a1d22;
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 480px;
  margin: 40px auto;
}

/* Responsive Media Queries */
@media (max-width: 900px) {
  .app-sidebar {
    display: none;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .app-main {
    padding: 12px 14px calc(var(--bottom-nav-height) + 20px) 14px;
  }

  .watch-content-grid {
    grid-template-columns: 1fr;
  }

  .hide-mobile {
    display: none !important;
  }

  .header-center {
    margin: 0 8px;
  }

  .toast-container {
    bottom: calc(var(--bottom-nav-height) + 16px);
  }
}

@media (max-width: 600px) {
  .video-grid {
    grid-template-columns: 1fr;
  }

  .pwa-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .watch-video-title {
    font-size: 1.1rem;
  }
}
