/* c:/Users/Anouar3/Downloads/vidoewe vsite/public/styles.css */
/* AnouarVideos — Clean Minimal Media Host UI (No bloat, compact upload, video-first) */

:root {
  --bg: #0a0a0c;
  --surface: #121216;
  --surface-hover: #18181e;
  --surface-2: #1c1c24;
  --border: #262630;
  --border-light: #363644;
  --text: #f4f4f6;
  --text-dim: #9ca3af;
  --text-muted: #6b7280;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --green: #10b981;
  --green-hover: #059669;
  --danger: #ef4444;
  --radius: 8px;
}

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

html, body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

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

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
  font-size: 13px;
}

/* Top Header — Slim 52px bar */
.topbar {
  height: 54px;
  background: rgba(10, 10, 12, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-inner {
  max-width: 1240px;
  height: 100%;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}

.logo-mark {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--text);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-mark svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.logo-domain {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 13px;
}

.top-search {
  flex: 1;
  max-width: 360px;
}

.top-search input {
  width: 100%;
  height: 34px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

.top-search input:focus {
  border-color: var(--border-light);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.tab-link {
  height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.tab-link:hover {
  color: var(--text);
  background: var(--surface);
}

.tab-link.active {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border);
}

.count-pill {
  font-size: 11px;
  background: var(--border);
  color: var(--text);
  padding: 1px 6px;
  border-radius: 99px;
}

.btn-upload-trigger {
  height: 34px;
  padding: 0 14px;
  border-radius: 6px;
  background: var(--text);
  color: var(--bg);
  border: none;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.15s;
}

.btn-upload-trigger:hover {
  opacity: 0.9;
}

.btn-upload-trigger svg {
  width: 14px;
  height: 14px;
}

/* Main Page Wrapper */
.page-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 18px 64px;
}

/* Slim Inline Upload Strip — Compact, does NOT take over the screen */
.upload-bar {
  background: var(--surface);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 20px;
  transition: border-color 0.15s, background 0.15s;
}

.upload-bar.dragover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.06);
}

.upload-bar-idle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  flex-wrap: wrap;
}

.upload-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.upload-mini-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  flex-shrink: 0;
}

.upload-mini-icon svg {
  width: 16px;
  height: 16px;
}

.upload-bar-title {
  font-weight: 600;
  font-size: 13.5px;
}

.upload-bar-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.upload-bar-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* Compact drawer only visible when a file is chosen */
.upload-staged {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.staged-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}

@media (max-width: 820px) {
  .staged-row {
    grid-template-columns: 1fr 1fr;
  }
}

.input-sm {
  height: 34px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 10px;
  color: var(--text);
  outline: none;
  width: 100%;
}

.input-sm:focus {
  border-color: var(--accent);
}

.btn-go {
  height: 34px;
  padding: 0 16px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  border: none;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-go:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-go:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Slim Progress Line */
.upload-progress {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.prog-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 5px;
}

.prog-bar {
  height: 5px;
  background: var(--bg);
  border-radius: 99px;
  overflow: hidden;
}

.prog-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.12s linear;
}

/* Compact Result Banner */
.upload-done {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.done-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Feed Subheader */
.feed-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.feed-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-group {
  display: flex;
  gap: 4px;
}

.sort-btn {
  height: 28px;
  padding: 0 10px;
  border-radius: 5px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.sort-btn:hover {
  color: var(--text);
}

.sort-btn.active {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

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

.v-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s;
}

.v-card:hover {
  border-color: var(--border-light);
}

.v-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
  overflow: hidden;
}

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

.v-time {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
}

.v-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.v-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.v-title:hover {
  color: var(--accent);
}

.v-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-muted);
}

.v-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.btn-card {
  flex: 1;
  height: 28px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.12s;
}

.btn-card:hover {
  color: var(--text);
  border-color: var(--border-light);
}

.btn-card-dl {
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.28);
  background: rgba(16, 185, 129, 0.08);
}

.btn-card-dl:hover {
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
}

/* Watch View — Streamable + Gofile Clean Layout */
.watch-container {
  max-width: 980px;
  margin: 0 auto;
}

.watch-top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}

.player-frame {
  width: 100%;
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.player-frame video {
  width: 100%;
  max-height: 74vh;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
  outline: none;
}

/* Action & Download Bar directly below video */
.watch-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.watch-main-info h1 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}

.watch-sub-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.watch-cta-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-dl-main {
  height: 36px;
  padding: 0 16px;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  border: none;
  transition: background 0.15s;
}

.btn-dl-main:hover {
  background: var(--green-hover);
}

.btn-act {
  height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.btn-act:hover {
  border-color: var(--border-light);
}

.btn-act-danger {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.08);
}

/* Collapsible Links / Embed Drawer & Comments Grid */
.watch-details-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 14px;
  margin-top: 14px;
}

@media (max-width: 820px) {
  .watch-details-grid {
    grid-template-columns: 1fr;
  }
}

.panel-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.panel-heading {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field-row {
  margin-bottom: 10px;
}

.field-row:last-child {
  margin-bottom: 0;
}

.field-lbl {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.copy-row {
  display: flex;
  gap: 6px;
}

.copy-row input {
  flex: 1;
  height: 30px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0 8px;
  font-size: 12px;
  color: var(--text-dim);
  outline: none;
  min-width: 0;
}

.copy-row button {
  height: 30px;
  padding: 0 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}

.copy-row button:hover {
  border-color: var(--border-light);
  color: #fff;
}

.comment-row {
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.comment-row:last-child {
  border-bottom: none;
}

.comment-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.comment-meta strong {
  color: var(--text);
}

/* Toast */
.toast-wrap {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  color: var(--text);
  padding: 9px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.hidden {
  display: none !important;
}
