/* ═══════════════════════════════════════════════════════════
   REELS — PAGE LOCK
   ═══════════════════════════════════════════════════════════ */
html.reels-page, html.reels-page body { overflow: hidden !important; height: 100vh !important; }
html.reels-page body { padding-bottom: 0 !important; }
html.reels-page .page-body { overflow: hidden !important; margin: 0 !important; padding: 0 !important; }
html.reels-page #spa-main {
  padding: 0 !important; margin: 0 !important; overflow: hidden !important;
  height: calc(100vh - var(--reels-nav-h, 48px) - var(--reels-bottom-nav-h, 0px)) !important;
}
html.reels-page #spa-main > .container {
  max-width: 100% !important; padding: 0 !important; margin: 0 !important;
  height: 100% !important; overflow: hidden !important;
}
html.reels-page #friendsSidebar { display: none !important; }
html.reels-page .mobile-bottom-nav { display: none !important; }
@media (max-width: 767.98px) {
  html.reels-page #spa-main {
    height: calc(100vh - var(--reels-nav-h, 48px)) !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   TOP BAR
   ═══════════════════════════════════════════════════════════ */
.reels-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 16px; background: #111; height: 42px; flex-shrink: 0; z-index: 10;
}
.reels-topbar h5 { margin: 0; font-size: .95rem; color: #fff; font-weight: 700; }

/* ═══════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════ */
.reels-wrapper { display: flex; flex-direction: column; height: 100%; background: #000; }
.reels-content { flex: 1; display: flex; overflow: hidden; position: relative; }
.reels-feed { position: relative; flex: 1; display: flex; justify-content: center; background: #000; }

/* ═══════════════════════════════════════════════════════════
   VIDEO SCROLL CONTAINER
   ═══════════════════════════════════════════════════════════ */
.reels-container {
  position: relative; width: 100%; max-width: 480px; height: 100%;
  overflow-y: scroll; scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.reels-container::-webkit-scrollbar { display: none; }

/* ═══════════════════════════════════════════════════════════
   REEL SLIDE
   ═══════════════════════════════════════════════════════════ */
.reel-slide {
  scroll-snap-align: start; scroll-snap-stop: always;
  height: 100%; position: relative; background: #000;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.reel-slide video { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }

/* Play indicator */
.reel-play-indicator {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(0);
  width: 72px; height: 72px; background: rgba(0,0,0,.45);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 2rem; pointer-events: none; z-index: 5;
  transition: transform .15s ease;
}
.reel-play-indicator.show {
  transform: translate(-50%,-50%) scale(1);
  animation: reelPlayPop .35s ease forwards;
}
@keyframes reelPlayPop {
  0%   { transform: translate(-50%,-50%) scale(0);   opacity:1; }
  50%  { transform: translate(-50%,-50%) scale(1.1); opacity:1; }
  80%  { transform: translate(-50%,-50%) scale(1);   opacity:.8; }
  100% { transform: translate(-50%,-50%) scale(.8);  opacity:0; }
}

/* ═══════════════════════════════════════════════════════════
   MUTE BUTTON
   ═══════════════════════════════════════════════════════════ */
.reel-mute-fab {
  position: absolute; top: 12px; left: 12px; z-index: 8;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,.45); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem; cursor: pointer;
  backdrop-filter: blur(4px); transition: opacity .2s, transform .15s;
  opacity: 0; pointer-events: none;
}
.reel-mute-fab:hover { transform: scale(1.1); background: rgba(0,0,0,.6); }
.reel-mute-fab.is-muted { opacity: 1; pointer-events: auto; }

/* ═══════════════════════════════════════════════════════════
   MORE MENU
   ═══════════════════════════════════════════════════════════ */
.reel-more-wrap { position: relative; flex-shrink: 0; }
.reel-more-btn {
  display: flex; flex-direction: column; align-items: center;
  background: none; border: none; color: #fff !important; padding: 0;
  cursor: pointer; font-size: .7rem;
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.5));
}
.reel-more-btn i { font-size: 1.8rem; line-height: 1; color: #fff !important; }
.reel-more-menu {
  display: none; position: fixed; z-index: 100;
  background: rgba(30,30,30,.92); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px; padding: 6px;
  flex-direction: row; gap: 4px; align-items: center; white-space: nowrap;
}
.reel-more-menu.show { display: flex; }
[data-bs-theme="light"] .reel-more-menu {
  background: rgba(255,255,255,.92); box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.reel-more-menu-btn {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; border: none;
  color: #fff; cursor: pointer; font-size: 1.05rem; transition: background .15s;
}
.reel-more-menu-btn.mm-share { background: rgba(59,130,246,.6); }
.reel-more-menu-btn.mm-fullscreen { background: rgba(255,255,255,.15); }
.reel-more-menu-btn.mm-edit { background: rgba(234,179,8,.5); }
.reel-more-menu-btn.mm-delete { background: rgba(220,38,38,.6); }
.reel-more-menu-btn.mm-block-vid { background: rgba(245,158,11,.5); }
.reel-more-menu-btn.mm-block-usr { background: rgba(245,158,11,.5); }
.reel-more-menu-btn:hover { filter: brightness(1.2); }

/* ═══════════════════════════════════════════════════════════
   SIDE ACTION BUTTONS (mobile)
   ═══════════════════════════════════════════════════════════ */
.reel-side-actions {
  position: absolute; right: 10px; bottom: 90px;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  z-index: 6; overflow: visible;
}
.reel-side-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: none; color: #fff; padding: 0;
  cursor: pointer; font-size: .7rem; justify-content: center;
  transition: transform .15s; text-decoration: none;
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); flex-shrink: 0;
}
.reel-side-btn:hover { transform: scale(1.15); color: #fff; }
.reel-side-btn i { font-size: 2.1rem; line-height: 1; }
.reel-side-btn .count { font-size: .78rem; line-height: 1; margin-top: 3px; }
.reel-side-btn.liked i { color: #ef4444; }
.reel-side-avatar {
  width: 58px; height: 58px; border-radius: 50%;
  border: 2.5px solid #fff; object-fit: cover;
  cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.5); flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   BOTTOM INFO OVERLAY (mobile)
   ═══════════════════════════════════════════════════════════ */
.reel-bottom-info {
  position: absolute; bottom: 10px; left: 14px; right: 60px;
  z-index: 6; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.7);
}
.reel-bottom-nick { font-weight: 700; font-size: .9rem; display: none; }
.reel-bottom-title { font-weight: 700; font-size: .9rem; margin-bottom: 2px; }
.reel-bottom-desc {
  font-size: .8rem; opacity: .9; margin-top: 2px;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  word-break: break-word; max-width: 100%;
}

/* ═══════════════════════════════════════════════════════════
   DESKTOP PANEL
   ═══════════════════════════════════════════════════════════ */
.reels-desktop-panel { display: none; }

/* ═══════════════════════════════════════════════════════════
   OVERLAYS (comment, share, edit)
   ═══════════════════════════════════════════════════════════ */
.reel-overlay-panel {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1060;
}
.reel-overlay-panel.show { display: flex; flex-direction: column; }
.reel-overlay-backdrop {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.5);
}
.reel-overlay-sheet {
  position: absolute; bottom: 0; left: 0; right: 0;
  max-width: 500px; margin: 0 auto;
  background: var(--bg-card, #fff);
  border-radius: 16px 16px 0 0; max-height: 65vh;
  display: flex; flex-direction: column;
  animation: slideUp .25s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.reel-overlay-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px; border-bottom: 1px solid var(--border-color, #eee);
  font-weight: 700; font-size: .95rem;
}
.reel-overlay-body { flex: 1; overflow-y: auto; padding: 10px 16px; min-height: 120px; }
.reel-comment-row { display: flex; gap: 8px; margin-bottom: 10px; font-size: .85rem; }
.reel-comment-row img { flex-shrink: 0; }
.reel-overlay-input-bar {
  display: flex; gap: 8px; padding: 10px 16px 14px;
  border-top: 1px solid var(--border-color, #eee); align-items: center;
}

/* Share-to-friends */
.share-friend-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 4px; cursor: pointer; border-radius: 8px; transition: background .15s;
}
.share-friend-item:hover { background: rgba(0,0,0,.04); }
[data-bs-theme="dark"] .share-friend-item:hover { background: rgba(255,255,255,.06); }
.share-friend-item.selected { background: rgba(37,99,235,.08); }
.share-friend-item .check-circle {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--border-color, #ccc);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; color: transparent; transition: all .15s; margin-left: auto;
}
.share-friend-item.selected .check-circle {
  background: var(--accent, #2563eb); border-color: var(--accent, #2563eb); color: #fff;
}
.share-copy-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 16px; border-radius: 12px;
  border: 1px solid var(--border-color, #ddd); background: none;
  color: var(--text-main, #333); font-size: .75rem; cursor: pointer; transition: background .15s;
}
.share-copy-btn:hover { background: rgba(0,0,0,.04); }

/* Loading spinner */
.reel-loading-more {
  display: none; padding: 30px; text-align: center;
  color: #fff; background: #000; scroll-snap-align: none;
}
.reel-loading-more.show { display: block; }

/* Empty state */
.reels-empty {
  height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 2rem;
}

/* Upload modal */
#reelUploadModal .modal-dialog { max-width: 520px; width: calc(100% - 24px); margin: 1.75rem auto; }
#reelUploadModal .modal-content {
  border-radius: var(--radius-lg); background: var(--bg-card);
  max-height: calc(100vh - 3.5rem); overflow-y: auto;
}
@media (max-width: 576px) {
  #reelUploadModal .modal-dialog { max-width: 100%; width: 100%; margin: 0; min-height: 100vh; align-items: flex-end; }
  #reelUploadModal .modal-content { border-radius: 16px 16px 0 0; max-height: 92vh; }
  #reelUploadModal #reelVideoPreview { max-height: 180px; }
}
#reelDropzone {
  border: 2px dashed var(--border-color); border-radius: var(--radius);
  padding: 2rem; text-align: center; cursor: pointer; transition: border-color .2s, background .2s;
}
#reelDropzone.drag-over { border-color: var(--accent); background: rgba(37,99,235,.06); }
#reelVideoPreview { display: none; max-height: 240px; border-radius: var(--radius); background: #000; }

/* ═══════════════════════════════════════════════════════════
   MOBILE TWEAKS (<=576px)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 576px) {
  .reels-container { max-width: 100%; }
  .reel-side-actions { right: 8px; gap: 16px; }
  .reel-side-btn i { font-size: 1.9rem; }
  .reel-side-avatar { width: 50px; height: 50px; }
  .reel-bottom-info { bottom: 12px; right: 58px; }
}

/* ═══════════════════════════════════════════════════════════
   DESKTOP LAYOUT (>=992px) — TikTok-style
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 992px) {
  .reels-feed { flex: 1; min-width: 0; }
  .reels-container {
    max-width: clamp(300px, calc((100vh - 100px) * 9 / 16), 460px);
    border-radius: 12px; overflow: hidden;
    margin: 12px auto; height: calc(100% - 24px);
  }
  .reel-slide video { object-fit: contain; }
  .reel-side-actions { display: none !important; }
  .reel-bottom-info { display: none !important; }
  .reel-mute-fab { opacity: 0; pointer-events: none; transition: opacity .2s; }
  .reel-mute-fab.is-muted { opacity: 1; pointer-events: auto; }
  .reel-slide:hover .reel-mute-fab { opacity: 1; pointer-events: auto; }
  .reel-mute-fab { top: 16px; left: 16px; }

  .reels-desktop-panel {
    display: flex; flex-direction: column;
    width: 420px; min-width: 340px; height: 100%;
    background: var(--bg-card, #1a1a1a);
    border-left: 1px solid rgba(255,255,255,.08);
    overflow: hidden; color: var(--text-main, #e8e8e8);
  }
  [data-bs-theme="light"] .reels-desktop-panel { background: #fff; border-left: 1px solid #eee; color: #222; }
  .rdp-user { display: flex; gap: 12px; align-items: center; padding: 16px 16px 8px; }
  .rdp-user-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
  .rdp-user-info { flex: 1; min-width: 0; }
  .rdp-user-nick { font-weight: 700; font-size: .95rem; text-decoration: none; color: inherit; }
  .rdp-user-nick:hover { text-decoration: underline; }
  .rdp-user-time { font-size: .75rem; opacity: .6; }
  .rdp-desc { padding: 4px 16px 12px; font-size: .88rem; line-height: 1.4; }
  .rdp-engagement {
    display: flex; gap: 4px; padding: 8px 12px; flex-wrap: wrap;
    border-top: 1px solid var(--border-color, rgba(255,255,255,.1));
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,.1));
  }
  .rdp-action-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 20px;
    background: rgba(255,255,255,.08); border: none;
    color: inherit; font-size: .82rem; cursor: pointer; transition: background .15s;
  }
  [data-bs-theme="light"] .rdp-action-btn { background: #f0f0f0; }
  .rdp-action-btn:hover { background: rgba(255,255,255,.15); }
  [data-bs-theme="light"] .rdp-action-btn:hover { background: #e0e0e0; }
  .rdp-action-btn i { font-size: 1.1rem; }
  .rdp-action-btn.liked { color: #ef4444; }
  .rdp-action-btn.delete-btn { color: #ef4444; }
  .rdp-action-btn.block-btn { color: #f59e0b; }
  .rdp-mod-actions {
    display: none; gap: 4px; padding: 6px 12px;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,.1));
  }
  .rdp-share-row { display: flex; gap: 8px; padding: 10px 16px; align-items: center; }
  .rdp-copy-link {
    flex: 1; display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; border-radius: 8px;
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
    font-size: .78rem; color: inherit; overflow: hidden;
    cursor: pointer; transition: background .15s;
  }
  [data-bs-theme="light"] .rdp-copy-link { background: #f5f5f5; border-color: #ddd; }
  .rdp-copy-link:hover { background: rgba(255,255,255,.12); }
  .rdp-copy-link-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; opacity: .7; }
  .rdp-comments-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px 8px; font-weight: 700; font-size: .9rem;
  }
  .rdp-comments-body { flex: 1; overflow-y: auto; padding: 8px 16px; min-height: 80px; }
  .rdp-comments-input {
    display: flex; gap: 8px; padding: 10px 16px 14px;
    border-top: 1px solid var(--border-color, rgba(255,255,255,.1)); align-items: center;
  }
  .mobile-only-overlay { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   ARROW NAVIGATION
   ═══════════════════════════════════════════════════════════ */
.reels-nav-arrows {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 8px; z-index: 9;
}
.reels-nav-arrow {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.12); border: none; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; cursor: pointer; transition: all .15s; backdrop-filter: blur(4px);
}
.reels-nav-arrow:hover { background: rgba(255,255,255,.25); transform: scale(1.1); }
.reels-nav-arrow:disabled { opacity: .25; cursor: default; }
@media (max-width: 991.98px) { .reels-nav-arrows { display: none; } }

/* ═══════════════════════════════════════════════════════════
   SOUND TOAST
   ═══════════════════════════════════════════════════════════ */
.reel-sound-toast {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  background: rgba(0,0,0,.7); color: #fff; padding: 10px 20px;
  border-radius: 12px; font-size: .85rem; font-weight: 600;
  z-index: 20; pointer-events: none; display: flex; align-items: center; gap: 8px;
  animation: reelToastFade 2s ease forwards;
}
@keyframes reelToastFade { 0%, 60% { opacity: 1; } 100% { opacity: 0; } }

/* ═══════════════════════════════════════════════════════════
   COMMENT REPLY & LIKE
   ═══════════════════════════════════════════════════════════ */
.rc-actions { display: flex; gap: 10px; margin-top: 3px; font-size: .72rem; color: var(--text-muted, #999); }
.rc-actions button { background: none; border: none; color: inherit; cursor: pointer; padding: 0; font-size: .72rem; transition: color .15s; }
.rc-actions button:hover { color: var(--text-main, #fff); }
.rc-actions button.liked { color: #ef4444; }
.rc-actions .rc-delete-btn { color: #ef4444; opacity: .7; }
.rc-actions .rc-delete-btn:hover { opacity: 1; }
.rc-reply-row { margin-left: 36px; }
.rc-reply-toggle {
  font-size: .72rem; color: var(--accent, #3b82f6); cursor: pointer;
  margin-left: 36px; margin-bottom: 6px; background: none; border: none; padding: 0;
}
.rc-reply-toggle:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════
   USER PROFILE — REELS GRID (modernized)
   ═══════════════════════════════════════════════════════════ */
.reels-profile-page { background: var(--bg-body); min-height: 100vh; padding-bottom: 2rem; }

.rp-header {
  max-width: 680px; margin: 0 auto; padding: 1.5rem 1rem .5rem;
}
.rp-profile-card {
  background: var(--bg-card); border-radius: var(--radius-xl, 16px);
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,.08));
  overflow: hidden;
}
.rp-banner {
  height: 100px; background: linear-gradient(135deg, #ef4444 0%, #f97316 50%, #ec4899 100%);
  position: relative;
}
.rp-banner::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 50%;
  background: linear-gradient(transparent, rgba(0,0,0,.15));
}
.rp-body { padding: 0 1.5rem 1.5rem; text-align: center; margin-top: -44px; position: relative; z-index: 1; }
.rp-avatar-link { display: inline-block; text-decoration: none; }

.rp-avatar {
  width: 88px; height: 88px; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--bg-card); box-shadow: 0 4px 16px rgba(0,0,0,.18);
}
.rp-nick {
  font-weight: 800; font-size: 1.2rem; margin: .5rem 0 .1rem;
  color: var(--text-main);
}
.rp-bio {
  font-size: .82rem; color: var(--text-muted); margin-bottom: .8rem;
  max-width: 400px; margin-left: auto; margin-right: auto;
}
.rp-stats {
  display: flex; justify-content: center; gap: 0;
  margin: .8rem -1.5rem; padding: .6rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}
.rp-stat { flex: 1; text-align: center; }
.rp-stat + .rp-stat { border-left: 1px solid var(--border-color); }
.rp-stat strong {
  display: block; font-size: 1.15rem; font-weight: 800;
  color: var(--text-main); line-height: 1.2;
}
.rp-stat span {
  font-size: .68rem; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: .5px; font-weight: 600;
}
.rp-actions {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  margin-top: 1rem;
}
.rp-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 20px; border-radius: 10px; font-size: .82rem; font-weight: 600;
  text-decoration: none; transition: all .2s; border: none; cursor: pointer;
}
.rp-btn-outline {
  background: var(--bg-input, #f3f4f6); color: var(--text-main);
  border: 1px solid var(--border-color);
}
.rp-btn-outline:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.rp-btn-primary {
  background: linear-gradient(135deg, #ef4444, #f97316); color: #fff;
}
.rp-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(239,68,68,.3); }

/* Grid */
.rp-grid-section { max-width: 680px; margin: 0 auto; padding: 1rem .5rem 0; }
.rp-grid-label {
  display: flex; align-items: center; gap: .5rem;
  font-weight: 700; font-size: .88rem; color: var(--text-main);
  padding: 0 .25rem .75rem;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: .75rem;
}
.rp-grid-label i { color: #ef4444; }
.rp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.rp-item {
  aspect-ratio: 9/16; position: relative; overflow: hidden;
  border-radius: 8px; background: #111; cursor: pointer;
}
.rp-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.rp-item:hover img { transform: scale(1.06); }
.rp-item::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(0,0,0,0); transition: background .2s; pointer-events: none;
}
.rp-item:hover::after { background: rgba(0,0,0,.15); }
.rp-item-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1a1a2e, #16213e); color: rgba(255,255,255,.4);
  font-size: 2rem;
}
.rp-item-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 6px 8px; background: linear-gradient(transparent, rgba(0,0,0,.75));
  color: #fff; font-size: .7rem; display: flex; align-items: center; gap: 8px; z-index: 1;
}
.rp-item-overlay span { display: flex; align-items: center; gap: 3px; }
.rp-item-overlay i { font-size: .65rem; }
.rp-item-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(.8);
  width: 42px; height: 42px; background: rgba(255,255,255,.2);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.15rem; opacity: 0;
  transition: opacity .25s, transform .25s; z-index: 2;
}
.rp-item:hover .rp-item-play { opacity: 1; transform: translate(-50%,-50%) scale(1); }

.rp-empty {
  text-align: center; padding: 3rem 1rem; color: var(--text-muted);
}
.rp-empty i { font-size: 3rem; opacity: .3; }

/* ═══════════════════════════════════════════════════════════
   UPLOAD MODAL (custom — no Bootstrap modal dependency)
   ═══════════════════════════════════════════════════════════ */
.rp-upload-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  z-index: 1100; backdrop-filter: blur(4px);
}
.rp-upload-modal {
  position: fixed; inset: 0; z-index: 1101;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.rp-upload-card {
  background: var(--bg-card, #fff); border-radius: 16px;
  width: 100%; max-width: 480px; max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,.3);
  overflow: hidden;
}
.rp-upload-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border-color, #eee);
}
.rp-upload-header h5 { margin: 0; font-size: 1rem; font-weight: 700; }
.rp-upload-body { padding: 20px; overflow-y: auto; flex: 1; }
.rp-upload-footer {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 12px 20px; border-top: 1px solid var(--border-color, #eee);
}

/* Dropzone */
.rp-dropzone {
  border: 2px dashed var(--border-color, #ccc); border-radius: 12px;
  padding: 2.5rem 1rem; text-align: center; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.rp-dropzone:hover, .rp-dropzone.drag-over {
  border-color: #ef4444; background: rgba(239,68,68,.04);
}
.rp-dropzone i { font-size: 2.5rem; color: #ef4444; opacity: .6; display: block; margin-bottom: .5rem; }
.rp-dropzone p { margin: .5rem 0 .25rem; font-weight: 600; font-size: .9rem; }
.rp-dropzone p span { color: #ef4444; cursor: pointer; }
.rp-dropzone small { color: var(--text-muted, #888); font-size: .75rem; }

/* Preview */
#rpVideoPreview {
  max-height: 220px; width: 100%; border-radius: 10px;
  background: #000; margin-bottom: 12px;
}

/* Progress */
.rp-prog-bar {
  height: 6px; border-radius: 3px; background: var(--border-color, #eee);
  overflow: hidden; margin-bottom: 6px;
}
.rp-prog-fill {
  height: 100%; border-radius: 3px; width: 0%;
  background: linear-gradient(90deg, #ef4444, #f97316);
  transition: width .3s;
}

/* Error */
.rp-upload-error {
  margin-top: 8px; padding: 8px 12px; border-radius: 8px;
  background: rgba(239,68,68,.1); color: #ef4444;
  font-size: .82rem; font-weight: 500;
}

@media (max-width: 576px) {
  .rp-upload-modal { align-items: flex-end; padding: 0; }
  .rp-upload-card { border-radius: 16px 16px 0 0; max-height: 92vh; max-width: 100%; }
  .rp-banner { height: 80px; }
  .rp-body { padding: 0 1rem 1rem; margin-top: -36px; }
  .rp-avatar { width: 72px; height: 72px; }
  .rp-nick { font-size: 1.05rem; }
  .rp-stat strong { font-size: 1rem; }
  .rp-grid { gap: 2px; }
  .rp-item { border-radius: 4px; }
  .rp-item-play { width: 34px; height: 34px; font-size: .95rem; }
}

/* ═══════════════════════════════════════════════════════════
   DESKTOP PROFILE LAYOUT (>=992px) — wider grid
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
  .rp-header { max-width: 900px; }
  .rp-grid-section { max-width: 900px; }
  .rp-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .rp-item { border-radius: 10px; }
}
@media (min-width: 1200px) {
  .rp-header { max-width: 1100px; }
  .rp-grid-section { max-width: 1100px; }
  .rp-grid { grid-template-columns: repeat(5, 1fr); gap: 8px; }
  .rp-item { border-radius: 12px; }
  .rp-banner { height: 140px; }
  .rp-avatar { width: 100px; height: 100px; }
  .rp-body { margin-top: -52px; }
}
