/* ==========================================================
   VidFire — smooth, minimal, light UI
   Aapki script.js ke real class names ke hisaab se
   ========================================================== */

:root {
  --bg: #f6f6f8;
  --surface: #ffffff;
  --surface-2: #efeff2;
  --border: #e6e6ea;
  --text: #1d1d20;
  --muted: #8b8b93;
  --accent: #ff4e1c;
  --accent-soft: #fff0ea;
  --danger: #e5484d;
  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 22px;
  --shadow: 0 2px 14px rgba(20, 20, 30, 0.07);
  --shadow-lg: 0 12px 40px rgba(20, 20, 30, 0.14);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-tap-highlight-color: transparent; }


body {
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
a { color: var(--accent); text-decoration: none; font-weight: 500; }
button, input, textarea { font-family: inherit; font-size: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Logo ---------- */
.logo-container { display: flex; align-items: center; gap: 6px; }
.logo-box { display: flex; align-items: center; justify-content: center; }
.logo-image { width: 36px; height: 36px; }
.logo-text { font-size: 19px; font-weight: 600; color: var(--text); }
.logo-text.wm { font-weight: 700; letter-spacing: -0.3px; }
.logo-text.wm span { color: var(--accent); }

/* ---------- Loading ---------- */
.loading-container {
  position: fixed; inset: 0; z-index: 999;
  background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 40px;
}
.loading-container .logo-image { width: 72px; height: 72px; }
.loading-container .logo-text { font-size: 30px; }
.loading-bar-container { width: min(240px, 68vw); text-align: center; }
.loading-text { font-size: 11px; color: var(--muted); letter-spacing: 1.5px; margin-bottom: 10px; }
.loading-bar { height: 4px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.loading-progress { height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width 0.3s var(--ease); }

/* ---------- Page layout ---------- */
.page-container, .saved-videos-page, .novels-page {
  width: 100%; max-width: 1200px;
  height: 100vh;
  display: flex; flex-direction: column;
  background: var(--bg);
  padding-bottom: 76px;
  overflow-y: auto;
}

.app-header, .search-page-header {
  position: sticky; top: 0; z-index: 10; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  min-height: 58px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-logo { flex: 1; justify-content: flex-start; }
.header-icon {
  font-size: 18px; color: var(--text); cursor: pointer;
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.header-icon:hover { background: var(--surface-2); color: var(--accent); }
.header-right-icons { display: flex; align-items: center; min-width: 38px; justify-content: flex-end; }
.header-right-icons i { margin-left: 0; }

/* ---------- Video list + thumbnail card ---------- */
.video-list, .saved-videos-list, .novels-list {
  flex: 0 0 auto;
  display: flex; flex-direction: column; gap: 18px;
  padding: 16px;
}
@media (min-width: 700px) {
  .video-list, .saved-videos-list {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

.video-card-container {
  background: var(--surface);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.video-card-container:active { transform: scale(0.985); }
@media (hover: hover) {
  .video-card-container:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
}

/* THUMBNAIL — JS inline background-image lagata hai, isliye yahan height zaroori hai */
.video-card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 160px;
  background-color: var(--surface-2);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}
.video-card-controls {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; gap: 14px;
}
.video-card-controls .icon-link {
  width: 52px; height: 52px; display: grid; place-items: center;
  font-size: 20px; color: var(--accent);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s var(--ease);
}
.video-card-container:hover .icon-link { transform: scale(1.08); }

.video-description { padding: 12px 14px 14px; }
.video-title {
  font-size: 14.5px; font-weight: 600; line-height: 1.4; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.video-details { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- Bottom nav ---------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 1200px; z-index: 9;
  display: flex; justify-content: space-around; align-items: center;
  height: 62px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
}
.nav-item {
  width: 20%; height: 100%; position: relative;
  display: flex; justify-content: center; align-items: center;
  color: var(--muted); cursor: pointer;
  transition: color 0.2s var(--ease);
}
.nav-icon { font-size: 20px; color: inherit; transition: transform 0.25s var(--ease); }
.nav-item.active { color: var(--accent); }
.nav-item.active .nav-icon { transform: translateY(-2px); }
.nav-item.active::after {
  content: ''; position: absolute; bottom: 9px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; top: 0; left: 0; height: 100vh; width: min(290px, 82vw);
  z-index: 15;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform: translateX(-105%);
  transition: transform 0.35s var(--ease);
  display: flex; flex-direction: column; overflow-y: auto;
}
.sidebar.visible { transform: translateX(0); }
.overlay { position: fixed; inset: 0; z-index: 14; background: rgba(20, 20, 30, 0.35); backdrop-filter: blur(2px); }
.sidebar-header { display: flex; align-items: center; gap: 14px; padding: 34px 20px 20px; border-bottom: 1px solid var(--border); }
.profile-placeholder {
  width: 48px; height: 48px; border-radius: 50%;
  background-color: var(--accent-soft); border: 2px solid var(--accent);
  background-size: cover; background-position: center;
}
.profile-text { font-size: 16px; font-weight: 600; }
.sidebar-menu { display: flex; flex-direction: column; gap: 2px; padding: 10px; }
.sidebar-item {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 14px; border-radius: var(--radius-s);
  color: var(--text); font-weight: 500;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.sidebar-item i { width: 20px; text-align: center; color: var(--muted); font-size: 16px; margin: 0; }
.sidebar-item span { font-size: 14.5px; }
.sidebar-item:hover { background: var(--accent-soft); color: var(--accent); }
.sidebar-item:hover i { color: var(--accent); }

/* ---------- Auth / profile ---------- */
.auth-container, .profile-container {
  width: 100%; max-width: 100%; min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 14px; padding: 24px; margin: 0;
  background: var(--bg);
}
.auth-container > *, .profile-container > * { width: min(380px, 100%); }
.auth-container h2, .profile-container h2 { font-size: 26px; font-weight: 700; text-align: center; margin-bottom: 6px; color: var(--text); }
.auth-container p { text-align: center; color: var(--muted); margin: 0; }

input[type="text"], input[type="email"], input[type="password"], textarea {
  width: 100%; padding: 13px 16px;
  background: var(--surface); color: var(--text);
  border: 1.5px solid var(--border); border-radius: var(--radius-s);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
input::placeholder, textarea::placeholder { color: #b4b4bb; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

button {
  border: none; cursor: pointer; font-weight: 600;
  padding: 13px 20px; border-radius: var(--radius-s);
  background: var(--accent); color: #fff;
  transition: transform 0.15s var(--ease), box-shadow 0.25s var(--ease);
}
button:hover { box-shadow: 0 6px 18px rgba(255, 78, 28, 0.28); }
button:active { transform: scale(0.97); }
.button-group { display: flex; gap: 12px; }
.button-group button { flex: 1; }
.cancel-btn, #cancel-edit-btn, #profile-page-back-btn { background: var(--surface-2) !important; color: var(--text) !important; }
.cancel-btn:hover, #cancel-edit-btn:hover, #profile-page-back-btn:hover { box-shadow: none; }
#edit-profile-btn { background: var(--accent) !important; }
.add-btn { background: var(--accent); }
.full-width-btn { width: 100%; background: var(--surface); color: var(--accent); border: 1.5px solid var(--accent); }
.full-width-btn:hover { background: var(--accent-soft); box-shadow: none; }

.profile-info {
  background: var(--surface); border-radius: var(--radius-m); box-shadow: var(--shadow);
  padding: 20px; display: flex; flex-direction: column; gap: 10px;
}
.profile-info p { color: var(--text); margin: 0; }
.profile-info strong { color: var(--muted); font-weight: 500; }
.profile-info span { color: var(--text); }
.profile-info-item { display: flex; align-items: center; gap: 14px; }
.profile-image-display {
  width: 72px; height: 72px; border-radius: 50%; margin: 6px auto;
  background-color: var(--accent-soft); background-size: cover; background-position: center;
  border: 3px solid var(--surface); box-shadow: var(--shadow);
}
.image-upload-label, .file-upload-label {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px; cursor: pointer;
  border: 1.5px dashed var(--border); border-radius: var(--radius-s);
  background: var(--surface); color: var(--muted); font-weight: 500;
  transition: all 0.2s var(--ease);
}
.image-upload-label:hover, .file-upload-label:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ---------- Login (Google only) + clean profile ---------- */
.auth-brand { text-align: center; margin-bottom: 6px; }
.auth-brand .logo-text.wm { font-size: 30px; }
.auth-brand p { margin-top: 8px; }
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--surface); color: var(--text);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow);
}
.google-btn i { color: #ea4335; font-size: 16px; }
.google-btn:hover { box-shadow: var(--shadow-lg); }

.profile-card {
  width: 100%; background: var(--surface); border-radius: var(--radius-m);
  box-shadow: var(--shadow); padding: 28px 20px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.profile-card .profile-image-display { width: 88px; height: 88px; margin: 0 0 8px; }
.profile-card h2 { margin: 0; font-size: 20px; }
.profile-email { color: var(--muted); font-size: 13.5px; margin: 0; }
.vidfire-id-badge {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
  padding: 6px 14px; border-radius: 999px; background: var(--accent-soft);
  color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: .3px;
}
.vidfire-id-badge i { font-size: 12px; }

/* ---------- Search ---------- */
.search-page-header { justify-content: flex-start; gap: 8px; }
.search-back-btn { font-size: 18px; width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer; margin: 0; }
.search-bar {
  flex: 1; position: relative; display: flex; align-items: center;
  background: var(--surface-2); border-radius: 99px; padding: 2px 16px;
}
.search-bar input { background: transparent; border: none; box-shadow: none !important; padding: 10px 28px 10px 0; }
.search-bar .fa-magnifying-glass { position: absolute; right: 16px; color: var(--muted); cursor: pointer; }
.search-suggestions {
  position: absolute; left: 16px; right: 16px; top: 100%;
  background: var(--surface); border-radius: var(--radius-m); box-shadow: var(--shadow);
  margin-top: 6px; overflow: hidden; z-index: 15;
}
.search-suggestion-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; font-size: 13.5px; color: var(--text); cursor: pointer;
}
.search-suggestion-item:hover, .search-suggestion-item.active { background: var(--surface-2); }
.search-suggestion-item i { color: var(--muted); font-size: 13px; }
.search-results { flex: 0 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.search-results-title { font-size: 15px; font-weight: 600; padding-left: 2px; color: var(--text); }
.search-result-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; background: var(--surface);
  border-radius: var(--radius-m); box-shadow: var(--shadow); cursor: pointer;
  transition: transform 0.25s var(--ease);
}
.search-result-item:active { transform: scale(0.985); }
.search-result-thumbnail {
  width: 112px; height: 64px; min-width: 112px; border-radius: var(--radius-s);
  background-color: var(--surface-2); background-size: cover; background-position: center; background-repeat: no-repeat;
}
.search-result-info { flex: 1; min-width: 0; }
.search-result-title { font-size: 13.5px; font-weight: 600; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.search-result-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- Player ---------- */
.video-player-page {
  width: 100%; max-width: 1200px; height: 100vh;
  display: flex; flex-direction: column;
  background: var(--bg); overflow-y: auto;
}
.video-player-frame { position: relative; width: 100%; background: #000; flex-shrink: 0; }

/* ---------- Mini player: floating, draggable box (YouTube jaisa PiP) ---------- */
.video-player-page.mini-player {
  position: fixed; width: 46vw; min-width: 160px; max-width: 230px; height: auto;
  top: 70px; left: auto; right: 10px; bottom: auto;
  z-index: 60; border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow-lg); background: #000; cursor: grab; touch-action: none;
}
.video-player-page.mini-player.dragging { cursor: grabbing; }
.video-player-page.mini-player .video-player-content,
.video-player-page.mini-player .player-back-btn,
.video-player-page.mini-player .mini-player-info { display: none; }
.video-player-page.mini-player .video-player-frame { width: 100%; height: auto; }
.video-player-page.mini-player #player-placeholder,
.video-player-page.mini-player #player-placeholder iframe,
.video-player-page.mini-player #player-placeholder video {
  position: relative; width: 100%; height: auto; aspect-ratio: 16 / 9; max-height: none;
}
.mini-player-info {
  display: none; flex: 1; min-width: 0; padding: 0 10px;
  font-size: 13.5px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mini-player-close {
  display: none; position: absolute; top: 6px; right: 6px; z-index: 2;
  width: 24px; height: 24px; border-radius: 50%; align-items: center; justify-content: center;
  background: rgba(0,0,0,.6); color: #fff; font-size: 13px;
}
.video-player-page.mini-player .mini-player-close { display: flex; }
#player-placeholder { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 75vh; background: #000; }
#player-placeholder iframe, #player-placeholder video {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none;
}
#player-placeholder video { object-fit: cover; }
#player-placeholder::after { content: ''; position: absolute; right: 0; bottom: 0; width: 38px; height: 36px; z-index: 5; }
.player-back-btn {
  position: absolute; top: 10px; left: 10px; z-index: 20;
  width: 36px; height: 36px; display: grid; place-items: center;
  font-size: 16px; color: #fff; cursor: pointer;
  background: rgba(0, 0, 0, 0.45); border-radius: 50%;
  backdrop-filter: blur(6px);
}
.video-player-content { padding: 16px 16px 40px; color: var(--text); }
.video-title-row { display: flex; align-items: baseline; gap: 4px; cursor: pointer; }
.video-title-on-player {
  font-size: 17px; font-weight: 600; line-height: 1.4; color: var(--text);
  flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.video-details-on-player { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

/* ---------- Description panel (title se neeche tak, bina blur / bina curve) ---------- */
.desc-panel {
  display: none; flex: 1 0 auto; padding: 16px 16px 40px;
  background: var(--bg); color: var(--text); border-radius: 0;
  transform-origin: top; animation: descExpand 0.28s var(--ease);
}
.video-player-page.desc-open .video-player-content { display: none; }
.video-player-page.desc-open .desc-panel { display: block; }
.video-player-page.mini-player .desc-panel { display: none; }
@keyframes descExpand { from { opacity: 0.4; transform: scaleY(0.92); } to { opacity: 1; transform: scaleY(1); } }
.desc-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; font-weight: 600; cursor: pointer;
  padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--border);   /* line 1: Description | title */
}
.desc-panel-head i { font-size: 18px; color: var(--muted); }
.desc-panel-title { font-size: 17px; font-weight: 600; line-height: 1.4; word-break: break-word; }
.desc-panel-stats {
  display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; padding-bottom: 14px;
  font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--border);   /* line 2: title/likes/views | description */
}
.desc-panel-stats strong { color: var(--text); font-weight: 600; }
.description-modal-text {
  padding-top: 14px; font-size: 13.5px; line-height: 1.6; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
}

.video-actions { display: flex; gap: 8px; overflow-x: auto; padding: 16px 2px 8px; border: none; scrollbar-width: none; }
.video-actions::-webkit-scrollbar { display: none; }
.action-item {
  flex: 0 0 auto; flex-direction: row; display: flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 99px;
  background: var(--surface); box-shadow: var(--shadow);
  font-size: 13px; font-weight: 500; color: var(--text); cursor: pointer; user-select: none;
  transition: background 0.2s var(--ease), transform 0.15s var(--ease);
}
.action-item:active { transform: scale(0.94); }
.action-item i { font-size: 15px; margin: 0; color: var(--muted); }
.action-item.liked, .action-item.disliked, .action-item.saved { background: var(--accent-soft); }
.action-item.liked i, .action-item.liked span,
.action-item.disliked i, .action-item.disliked span,
.action-item.saved i, .action-item.saved span { color: var(--accent); }
.action-item.delete-btn, .action-item.delete-btn i { color: var(--danger); }

/* ---------- Star: send-a-star button (YouTube Thanks / Telegram Stars jaisa) ---------- */
.star-rate-item { gap: 6px; cursor: pointer; }
.star-rate-stars i { font-size: 17px; color: #f5a623; transition: transform 0.15s var(--ease); }
.star-rate-stars.star-sent i { animation: star-pulse 0.4s var(--ease); }
@keyframes star-pulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.5) rotate(-10deg); }
  100% { transform: scale(1); }
}
#star-rate-avg { font-size: 12.5px; color: var(--muted); }

/* ---------- Comments ---------- */
.comments-section { margin-top: 18px; }
.comments-section h4, .video-player-content > h4 { font-size: 15px; font-weight: 600; color: var(--text) !important; margin-bottom: 10px; }
.comment-input-container {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px 8px 8px; margin-bottom: 15px;
  background: var(--surface); border-radius: 99px; box-shadow: var(--shadow); cursor: pointer;
}
.comment-avatar-small, .comment-avatar {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; margin: 0;
  background-color: var(--accent-soft); background-size: cover; background-position: center;
  border: none;
}
.comment-input-placeholder { font-size: 14px; color: var(--muted); }
.comment-item { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.comment-avatar { margin-right: 0; }
.comment-content { font-size: 13px; color: var(--muted); word-break: break-word; }
.comment-content p { color: var(--text); margin: 0; }

.modal {
  display: none; position: fixed; inset: 0; z-index: 20;
  background: rgba(20, 20, 30, 0.4); backdrop-filter: blur(3px);
}
.modal-content {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 640px; margin: 0; padding: 0;
  background: var(--surface); color: var(--text);
  border-radius: var(--radius-l) var(--radius-l) 0 0;
  box-shadow: var(--shadow-lg);
  animation: sheet 0.35s var(--ease);
}
@keyframes sheet { from { transform: translate(-50%, 40px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; margin: 0; border-bottom: 1px solid var(--border); }
.modal-header h4 { font-size: 16px; font-weight: 600; color: var(--text); }
.close-btn { font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; }
.close-btn:hover { color: var(--accent); }
.modal-comments-list { max-height: 50vh; min-height: 120px; overflow-y: auto; padding: 16px 20px; margin: 0; }
.modal-comment-input-area { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); }
.modal-comment-input-area input { flex: 1; margin: 0; border-radius: 99px; padding: 10px 16px; }
.modal-comment-input-area button { border-radius: 99px; padding: 10px 16px; background: var(--accent); }

/* ---------- Novels ---------- */
.novels-page .novel-card {
  background: var(--surface); border: none; border-radius: var(--radius-m);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; cursor: pointer;
}
.novels-page .novel-card h3 { font-size: 15px; margin-bottom: 4px; color: var(--text); }
.novels-page .novel-card p { font-size: 13px; color: var(--muted); }
.novels-page .novel-card .audio-player { margin-top: 10px; width: 100%; }

/* ---------- Add / upload video ---------- */
.add-video-container { display: flex; flex-direction: column; gap: 14px; padding: 20px 16px; width: 100%; max-width: 520px; margin: 0 auto; }
.add-video-container h3 { text-align: center; font-size: 15px; font-weight: 600; color: var(--text); text-shadow: none; }
.input-with-button { display: flex; gap: 8px; align-items: center; }
.input-with-button input { flex: 1; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); }
.input-with-button button { padding: 13px 18px; }
.form-group { position: relative; display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.auto-resize-textarea { resize: none; overflow: hidden; min-height: 46px; }
.char-counter { position: static; align-self: flex-end; font-size: 11px; color: var(--muted); }
.thumbnail-preview-container {
  position: relative; width: 100%; padding-top: 56.25%;
  border-radius: var(--radius-m); overflow: hidden;
  background: var(--surface-2); border: none; display: none;
}
.thumbnail-preview-container img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.add-video-container button { box-shadow: none; }
.add-video-container button:hover { box-shadow: 0 6px 18px rgba(255, 78, 28, 0.25); }
.add-video-container .cancel-btn:hover { box-shadow: none; }
.file-upload-container { border: none; padding: 0; }
.preview-container { margin-top: 0; padding: 12px; background: var(--surface); border: none; border-radius: var(--radius-m); box-shadow: var(--shadow); }
.preview-container h4 { font-size: 12.5px; font-weight: 500; color: var(--muted); margin-bottom: 8px; }
.preview-container video, .preview-container img { width: 100%; border-radius: var(--radius-s); }

/* Scrollbar kahin nahi dikhega (scroll phir bhi chalega) */
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}


/* ==========================================================
   YOUTUBE-STYLE CARD
   thumbnail (border + round, no shadow) -> niche:
   [profile logo]  title / channel name / views • time
   ========================================================== */
.video-list, .saved-videos-list { gap: 26px; }

.video-card-container {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
  padding: 0;
  border: none;
  border-image: none;
}
@media (hover: hover) {
  .video-card-container:hover { transform: none; box-shadow: none; }
}

/* thumbnail: rounded 8px + halka border, koi shadow nahi */
.video-card {
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: none;
  background-color: #000;
  aspect-ratio: auto;      /* height fix nahi: image ke hisab se auto */
  min-height: 0;
}
.vc-img {
  display: block; width: 100%; height: auto;
  aspect-ratio: auto 16 / 9;   /* image aane se pehle 16/9, baad me image ka apna ratio */
}
/* Related videos: player page ke padding se bahar nikalo taaki home jitni hi chaudi ho */
.video-player-content .video-list { margin-left: -16px; margin-right: -16px; }
/* thumbnail thodi chaudi: list ka side padding kam (16px -> 8px) */
.video-list, .saved-videos-list { padding-left: 8px; padding-right: 8px; }
.video-card-controls .icon-link { opacity: 0; box-shadow: none; }

/* thumbnail ke niche wali row */
.video-description { padding: 12px 2px 0; margin: 0; }
.video-description:has(.vd-avatar) {
  display: grid;
  grid-template-columns: 40px 1fr;
  column-gap: 12px;
  align-items: start;
}
.video-description > :not(.vd-avatar) { grid-column: 2; }

.vd-avatar {
  grid-column: 1; grid-row: 1 / span 3;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background-color: var(--accent); color: #fff;
  font-size: 15px; font-weight: 600;
  background-size: cover; background-position: center;
}
.video-title {
  font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--text);
  -webkit-line-clamp: 2;
}
/* channel • views • time  -> ek hi line me (jagah kam ho to next line me wrap) */
.vd-meta {
  display: flex; flex-wrap: wrap; align-items: baseline;
  column-gap: 6px; margin-top: 3px;
  font-size: 13px; color: var(--muted);
}
.vd-channel { font-size: 13px; color: var(--muted); margin: 0; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.video-details { font-size: 13px; color: var(--muted); margin: 0; white-space: nowrap; }
.vd-meta .video-details::before { content: "•"; margin-right: 6px; }

/* ---------- Skeleton loading (video list load hote waqt) ---------- */
.skeleton-shimmer {
  position: relative; overflow: hidden; background: var(--surface-2);
}
.skeleton-shimmer::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  animation: skeleton-sweep 1.3s infinite;
}
@keyframes skeleton-sweep { 100% { transform: translateX(100%); } }
.skeleton-card .video-card { aspect-ratio: 16 / 9; border: none; }
.skeleton-avatar-row { display: flex; align-items: center; gap: 10px; }
.skeleton-avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.skeleton-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.skeleton-line { height: 10px; border-radius: 6px; }

.scroll-sentinel { height: 1px; flex: 0 0 auto; }

/* Thumbnail: image aane tak shimmer skeleton, aate hi smooth fade-in */
.video-card .vc-img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity 0.3s var(--ease); }
.video-card .vc-img.loaded { opacity: 1; }
.video-card.skeleton-shimmer::after { z-index: 2; pointer-events: none; }

/* ---------- Description: html text + VidFire link cards ---------- */
.description-modal-text.html-desc { white-space: normal; }
.description-modal-text.html-desc p, .description-modal-text.html-desc div { margin: 0; }
.description-modal-text img { max-width: 100%; height: auto; }

.desc-link-card {
  display: flex; align-items: center; gap: 12px; width: 100%;
  margin: 14px 0; padding: 6px; cursor: pointer;
  background: var(--surface); border-radius: 8px;
  box-shadow: var(--shadow); overflow: hidden;
}
.desc-link-card:active { transform: scale(0.985); }
.dlc-thumb { position: relative; flex: 0 0 128px; width: 128px; aspect-ratio: 16 / 9; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.dlc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity 0.3s var(--ease); }
.dlc-thumb img.loaded { opacity: 1; }
.dlc-thumb.skeleton-shimmer::after { z-index: 2; pointer-events: none; }
.dlc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dlc-title {
  font-size: 13.5px; font-weight: 600; line-height: 1.3; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  word-break: break-word;
}
.dlc-meta { font-size: 11.5px; color: var(--muted); }
.dlc-line { display: block; height: 11px; border-radius: 6px; margin: 6px 0; }
.dlc-line.short { width: 60%; }
.desc-link-card.dlc-plain { padding: 12px; color: var(--accent); word-break: break-all; }

/* Vid-Fire channel: logo avatar + red naam */
.vd-avatar.vd-avatar-brand { background: #fff; border: 1px solid var(--border); }
.vd-avatar-brand svg { width: 26px; height: 26px; }
.vd-channel.vd-channel-brand { color: var(--accent); font-weight: normal; }

.description-modal-text .desc-inner { display: block; }
.description-modal-text.html-desc br + br { line-height: 1.2; }

/* html-desc ka 'div { margin:0 }' card ka margin na dabaye */
.description-modal-text .desc-link-card { margin: 14px 0; }
