/* ================================================
   VidShare — Redesigned Stylesheet
   Dark theme · Red accent · SuperDesign UI
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
  --bg:        #0a0a0f;
  --surface:   #111118;
  --surface2:  #1a1a24;
  --surface3:  #22222e;
  --border:    rgba(255,255,255,0.06);
  --border2:   rgba(255,255,255,0.10);
  --accent:    #e53935;
  --accent2:   #ff6b35;
  --accent-glow: rgba(229,57,53,0.15);
  --text:      #f0f0f8;
  --muted:     #6b6b88;
  --muted2:    #9090aa;
  --success:   #22c55e;
  --warning:   #f59e0b;
  --radius:    10px;
  --radius-sm: 6px;
  --nav-h:     64px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; }
button { cursor: pointer; font-family: inherit; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: var(--nav-h);
  background: rgba(10,10,15,0.95);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  gap: 16px;
}

.logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 4px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: color .2s, background .2s;
  display: block;
}

.nav-links a:hover { color: var(--text); background: var(--surface2); }
.nav-links a.active { color: var(--accent); background: var(--accent-glow); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  gap: 8px;
  width: 230px;
  transition: border-color .2s, width .3s;
}

.search-bar:focus-within {
  border-color: var(--accent);
  width: 270px;
}

.search-bar input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  width: 100%;
}

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

.btn-upload {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s, transform .15s, box-shadow .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: .3px;
}

.btn-upload:hover {
  opacity: .9;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(229,57,53,.35);
}

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border2);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary:hover { background: var(--surface3); border-color: var(--border2); }

.user-menu { display: flex; align-items: center; gap: 8px; }

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 5px 14px 5px 5px;
  font-size: 13px;
  font-weight: 500;
  transition: border-color .2s;
}

.user-pill:hover { border-color: var(--accent); }

.user-avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.nav-logout {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: color .2s;
}

.nav-logout:hover { color: var(--accent); }
.nav-login { font-size: 13px; color: var(--muted2); padding: 6px 10px; transition: color .2s; }
.nav-login:hover { color: var(--text); }

.stats-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.stat {
  flex: 1;
  padding: 16px 24px;
  text-align: center;
  border-right: 1px solid var(--border);
  transition: background .2s;
}

.stat:last-child { border-right: none; }
.stat:hover { background: var(--surface2); }

.stat-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 4px;
}

.ad-wrap { max-width: 1400px; margin: 0 auto; padding: 16px 28px; }

.ad-inner {
  height: 90px;
  background: var(--surface);
  border: 1px dashed rgba(255,255,255,0.06);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 28px 52px;
}

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

.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 2.5px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 22px;
  background: linear-gradient(var(--accent), var(--accent2));
  border-radius: 2px;
  flex-shrink: 0;
}

.see-all {
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: .5px;
  text-transform: uppercase;
  transition: opacity .2s;
}

.see-all:hover { opacity: .7; }

.cats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.cat-pill {
  padding: 7px 18px;
  border-radius: 30px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  background: var(--surface2);
  color: var(--muted2);
  letter-spacing: .3px;
}

.cat-pill:hover { border-color: rgba(229,57,53,.4); color: var(--text); }
.cat-pill.active { background: var(--accent); border-color: var(--accent); color: white; box-shadow: 0 4px 14px rgba(229,57,53,.3); }

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.video-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform .25s, border-color .25s, box-shadow .25s;
  animation: fadeUp .4s ease both;
}

.video-card:hover {
  transform: translateY(-5px);
  border-color: rgba(229,57,53,.3);
  box-shadow: 0 16px 40px rgba(229,57,53,.12);
}

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

.card-thumb {
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
  background: var(--surface2);
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}

.video-card:hover .card-thumb img,
.video-card:hover .card-thumb-inner { transform: scale(1.05); }

.card-thumb-inner {
  width: 100%;
  height: 100%;
  transition: transform .35s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .25s;
}

.video-card:hover .card-overlay { background: rgba(0,0,0,.4); }

.card-play {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(.75);
  transition: opacity .25s, transform .25s;
  box-shadow: 0 4px 20px rgba(229,57,53,.5);
}

.video-card:hover .card-play { opacity: 1; transform: scale(1); }

.card-host {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,.75);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted2);
  backdrop-filter: blur(4px);
}

.card-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,.82);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
}

.card-info { padding: 12px 14px 14px; }

.card-info h3 {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

.g1 { background: linear-gradient(135deg, #1a0520, #0d0d2b); }
.g2 { background: linear-gradient(135deg, #0d1a20, #20100d); }
.g3 { background: linear-gradient(135deg, #1a1020, #0d200d); }
.g4 { background: linear-gradient(135deg, #200d0d, #0d0d20); }
.g5 { background: linear-gradient(135deg, #0d201a, #1a0d20); }
.g6 { background: linear-gradient(135deg, #201a0d, #0d1a20); }
.g7 { background: linear-gradient(135deg, #1a0d1a, #0d200d); }
.g8 { background: linear-gradient(135deg, #0d0d1a, #1a1a0d); }

.trending-hero {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 36px;
  cursor: pointer;
  height: 340px;
}

.trending-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}

.trending-hero:hover .trending-hero-img { transform: scale(1.03); }

.trending-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.9) 0%, rgba(0,0,0,.3) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px 32px;
}

.trending-rank {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 8px;
}

.trending-hero h2 {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 12px;
  max-width: 600px;
}

.trending-hero-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: rgba(255,255,255,.7);
}

.trending-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 30px;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.trending-badge.rising { background: var(--accent2); }

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

.trending-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}

.trending-item:hover {
  border-color: rgba(229,57,53,.3);
  background: var(--surface2);
  transform: translateX(4px);
}

.trending-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  color: var(--muted);
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.trending-item.top3 .trending-num { color: var(--accent); }

.trending-thumb {
  width: 120px;
  height: 68px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface2);
}

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

.trending-info { flex: 1; min-width: 0; }

.trending-info h4 {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trending-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
}

.trending-growth {
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
  flex-shrink: 0;
}

.watch-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 28px 52px;
}

.watch-main { min-width: 0; }

.player-wrap {
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  margin-bottom: 20px;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
}

.player-wrap iframe,
.player-wrap video {
  width: 100%;
  height: 500px;
  border-radius: 0;
  border: none;
  display: block;
}

.video-info-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.video-info-box h1 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 14px;
}

.video-meta-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.video-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  align-items: center;
}

.video-stats a { color: var(--accent); }
.video-stats a:hover { text-decoration: underline; }

.host-badge {
  background: var(--surface3);
  border: 1px solid var(--border2);
  color: var(--muted2);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 1px;
}

.video-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: all .2s;
}

.action-btn:hover { background: var(--surface3); border-color: var(--accent); color: var(--accent); }
.action-btn.liked { background: var(--accent-glow); border-color: var(--accent); color: var(--accent); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.tag {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted2);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 30px;
  transition: all .2s;
}

.tag:hover { border-color: var(--accent); color: var(--accent); }

.video-category {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.video-category a { color: var(--accent); }

.sidebar-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.sidebar-item {
  display: flex;
  gap: 10px;
  cursor: pointer;
  padding: 10px;
  border-radius: var(--radius-sm);
  transition: background .2s;
  margin-bottom: 4px;
}

.sidebar-item:hover { background: var(--surface2); }

.sidebar-thumb {
  width: 120px;
  height: 68px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface2);
}

.sidebar-thumb-inner {
  width: 100%;
  height: 100%;
  border-radius: 6px;
}

.sidebar-thumb img { width: 120px; height: 68px; object-fit: cover; border-radius: 6px; }

.sidebar-info { min-width: 0; }

.sidebar-info h4 {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-info span { font-size: 11px; color: var(--muted); }

.submit-page-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 36px 28px 60px;
}

.submit-page-wrap .section-title { margin-bottom: 24px; display: flex; }

.host-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  font-size: 12px;
  color: var(--muted);
}

.host-tag {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: .5px;
}

.submit-form-full { display: flex; flex-direction: column; gap: 20px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted2);
}

.form-input {
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  width: 100%;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder { color: var(--muted); }

select.form-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b6b88' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }

textarea.form-input { resize: vertical; min-height: 80px; line-height: 1.55; }

.form-group small { font-size: 11px; color: var(--muted); }

.auth-wrap {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.auth-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 40px 36px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
}

.auth-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
  letter-spacing: 5px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  margin-bottom: 24px;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 6px;
}

.auth-sub {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 28px;
}

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

.auth-switch {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 20px;
}

.auth-switch a { color: var(--accent); font-weight: 500; }

.profile-cover {
  width: 100%;
  height: 200px;
  background:
    radial-gradient(ellipse at 20% 60%, rgba(229,57,53,.28) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 30%, rgba(255,107,53,.18) 0%, transparent 50%),
    linear-gradient(135deg, #0d0508 0%, #0a0a1f 50%, #0d0508 100%);
  position: relative;
  overflow: hidden;
}

.profile-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(229,57,53,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(229,57,53,.07) 1px, transparent 1px);
  background-size: 40px 40px;
}

.profile-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(10,10,15,.85) 0%, transparent 60%);
}

.profile-cover-line {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 30%, var(--accent2) 60%, transparent 100%);
  opacity: .6;
  z-index: 3;
}

.profile-header-bar {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: flex-end;
  gap: 24px;
  margin-top: -60px;
  position: relative;
  z-index: 2;
  margin-bottom: 28px;
}

.profile-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 38px;
  color: white;
  border: 4px solid var(--bg);
  flex-shrink: 0;
  letter-spacing: 2px;
}

.profile-info { flex: 1; padding-bottom: 10px; }

.profile-name {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 4px;
}

.profile-handle {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.profile-bio {
  font-size: 14px;
  color: var(--muted2);
  max-width: 500px;
  line-height: 1.55;
}

.profile-stats-row {
  display: flex;
  gap: 28px;
  margin-top: 14px;
}

.profile-stat { text-align: center; }
.profile-stat strong { display: block; font-size: 20px; font-weight: 700; color: var(--text); }
.profile-stat span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }

.profile-actions { display: flex; gap: 10px; align-items: flex-end; padding-bottom: 10px; flex-shrink: 0; }

.profile-tabs {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.profile-tab {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color .2s, border-color .2s;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.profile-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.profile-tab:hover { color: var(--text); }

.video-card { position: relative; }
.video-card:hover .fav-btn { opacity: 1 !important; }
.fav-btn.saved { opacity: 1 !important; }
.fav-btn.saved svg { fill: #f59e0b !important; }

.cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.cat-card { text-decoration: none; border-radius: 12px; overflow: hidden; transition: transform .2s; }
.cat-card:hover { transform: translateY(-4px); }

.cat-card-inner {
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 110px;
  justify-content: flex-end;
  position: relative;
}

.cat-card-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.25);
  transition: background .2s;
}

.cat-card:hover .cat-card-inner::after { background: rgba(0,0,0,.1); }

.cat-card-inner h3 {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  position: relative;
  z-index: 1;
}

.cat-card-inner span {
  font-size: 12px;
  color: rgba(255,255,255,.55);
  position: relative;
  z-index: 1;
}

.search-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 20px 28px;
}

.search-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.search-query-text {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px;
  letter-spacing: 2px;
}

.search-query-text span { color: var(--accent); }

.search-count { font-size: 13px; color: var(--muted); }

.filter-bar {
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  padding: 12px 28px;
}

.filter-bar-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }

.filter-select {
  background: var(--surface3);
  border: 1px solid var(--border2);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  padding: 6px 28px 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%236b6b88' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color .2s;
}

.filter-select:focus { border-color: var(--accent); }

.settings-layout {
  max-width: 800px;
  margin: 0 auto;
  padding: 36px 28px 60px;
}

.settings-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
}

.settings-card-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted2);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.settings-card .form-group { margin-bottom: 16px; }
.settings-card .form-group:last-child { margin-bottom: 0; }

.submit-banner {
  background: linear-gradient(135deg, rgba(229,57,53,.08) 0%, rgba(255,107,53,.08) 100%);
  border-top: 1px solid rgba(229,57,53,.15);
  padding: 40px 28px;
  margin-top: 20px;
}

.submit-box {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.submit-box h3 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.submit-box p { font-size: 14px; color: var(--muted2); }

.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted2);
  font-size: 13px;
  font-weight: 500;
  transition: all .2s;
}

.page-btn:hover { border-color: var(--accent); color: var(--text); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: white; box-shadow: 0 4px 14px rgba(229,57,53,.3); }

.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success { background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.25); color: #86efac; }
.alert-error   { background: rgba(229,57,53,.1);  border: 1px solid rgba(229,57,53,.25);  color: #fca5a5; }

.alert-duplicate {
  background: rgba(251,191,36,.08);
  border: 1px solid rgba(251,191,36,.35);
  color: var(--text);
  align-items: flex-start;
  padding: 16px 20px;
  gap: 14px;
  flex-direction: row;
}
.alert-duplicate .dup-icon { font-size: 22px; line-height: 1; flex-shrink: 0; margin-top: 2px; }
.alert-duplicate .dup-body { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.alert-duplicate .dup-body strong { color: #fde68a; font-size: 14px; }
.alert-duplicate .dup-title { color: var(--muted); font-size: 13px; margin: 0; font-style: italic; }
.alert-duplicate .dup-goto {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 7px 16px;
  background: rgba(251,191,36,.15);
  border: 1px solid rgba(251,191,36,.4);
  color: #fde68a;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s, border-color .2s;
  width: fit-content;
}
.alert-duplicate .dup-goto:hover {
  background: rgba(251,191,36,.28);
  border-color: rgba(251,191,36,.65);
  color: #fff;
}

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

.empty-state p { margin-bottom: 16px; font-size: 15px; }
.empty-state a { color: var(--accent); }

footer {
  border-top: 1px solid var(--border);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
  background: var(--surface);
}

footer a { color: var(--muted); transition: color .2s; margin-left: 18px; }
footer a:hover { color: var(--accent); }

.uploads-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.uploads-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.uploads-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.uploads-table tr:last-child td { border-bottom: none; }
.uploads-table tr:hover td { background: var(--surface2); }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 30px;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.status-live     { background: rgba(34,197,94,.12); color: #86efac; }
.status-processing { background: rgba(245,158,11,.12); color: #fcd34d; }
.status-removed  { background: rgba(229,57,53,.12); color: #fca5a5; }

.fav-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.fav-tab {
  padding: 7px 18px;
  border-radius: 30px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  background: var(--surface2);
  color: var(--muted2);
}

.fav-tab.active { background: var(--accent); border-color: var(--accent); color: white; }

.fav-card {
  display: flex;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  transition: border-color .2s, transform .2s;
  position: relative;
}

.fav-card:hover { border-color: rgba(229,57,53,.3); transform: translateX(4px); }

.fav-card-thumb {
  width: 160px;
  height: 90px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface2);
}

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

.fav-card-info { flex: 1; min-width: 0; }
.fav-card-info h4 { font-size: 15px; font-weight: 500; margin-bottom: 6px; line-height: 1.4; }
.fav-card-info span { font-size: 12px; color: var(--muted); }

.fav-card-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  transition: color .2s;
  line-height: 1;
}

.fav-card-remove:hover { color: var(--accent); }

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

/* ═══════════════════════════════════════════
   PLAYLISTS - FIXED LAYOUT
═══════════════════════════════════════════ */

.pl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.pl-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .15s, transform .15s;
}

.pl-card:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
}

.pl-card > a {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-decoration: none;
  color: inherit;
  min-height: 0;
}

.pl-cover {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  height: 140px;
  min-height: 140px;
  max-height: 140px;
  background: var(--surface2);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

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

.pl-cover-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pl-cover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pl-cover-count {
  color: white;
  font-size: 13px;
  font-weight: 700;
  background: rgba(0,0,0,.6);
  padding: 4px 10px;
  border-radius: 20px;
}

.pl-info {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 80px;
}

.pl-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  line-height: 1.3;
}

.pl-meta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.pl-actions {
  display: flex;
  gap: 8px;
  padding: 0 14px 14px;
  margin-top: auto;
}

.pl-btn {
  flex: 1;
  padding: 7px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  border: 1px solid var(--border2);
  background: var(--surface2);
  color: var(--muted2);
  transition: all .15s;
  text-decoration: none;
  text-align: center;
  display: block;
}

.pl-btn:hover {
  color: var(--text);
  background: var(--surface3);
}

.pl-btn.danger:hover {
  color: #ef4444;
  border-color: #ef4444;
  background: rgba(239,68,68,.08);
}

.pl-detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}

.pl-detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

.pl-detail-title {
  font-size: 16px;
  font-weight: 700;
  flex: 1;
}

.pl-detail-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.pl-back {
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
}

.pl-back:hover {
  text-decoration: underline;
}

.pl-create-form {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}

.pl-create-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted2);
  margin-bottom: 14px;
}

@media (max-width: 1024px) {
  .watch-layout { grid-template-columns: 1fr; }
  .watch-sidebar { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .sidebar-title { grid-column: 1/-1; }
}

@media (max-width: 768px) {
  nav { padding: 0 16px; gap: 10px; }
  .nav-links { display: none; }
  .search-bar { width: 160px; }
  .search-bar:focus-within { width: 200px; }
  .section { padding: 20px 16px 36px; }
  .ad-wrap { padding: 12px 16px; }
  .watch-layout { padding: 16px 16px 36px; }
  .stats-bar { display: none; }
  .video-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .submit-box { flex-direction: column; text-align: center; }
  .profile-header-bar { flex-direction: column; align-items: flex-start; }
  footer { flex-direction: column; text-align: center; }
  .filter-bar-inner { gap: 8px; }
  .trending-hero { height: 220px; }
  .trending-hero h2 { font-size: 18px; }
  .watch-sidebar { display: flex; flex-direction: column; }
  .pl-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

@media (max-width: 480px) {
  .video-grid { grid-template-columns: 1fr; }
  .auth-box { padding: 28px 20px; }
  .player-wrap iframe, .player-wrap video { height: 220px; }
  .pl-grid { grid-template-columns: 1fr; }
}