@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-base:        #070b14;
  --bg-base-2:      #0d1322;
  --bg-card:        rgba(14, 20, 35, 0.78);
  --bg-surface:     rgba(18, 26, 44, 0.86);
  --bg-elevated:    rgba(22, 32, 56, 0.92);
  --bg-soft:        rgba(255,255,255,0.045);

  --border:         rgba(255,255,255,0.08);
  --border-light:   rgba(255,255,255,0.14);

  --accent:         #ff8a3d;
  --accent-2:       #ff4f9b;
  --accent-3:       #8a54ff;
  --accent-4:       #49a0ff;
  --accent-5:       #ffd978;

  --blue-400:       #8fc4ff;
  --blue-500:       #6fa8ff;
  --blue-600:       #4e8cff;
  --blue-700:       #356de6;

  --text-primary:   #f5f7ff;
  --text-secondary: #c4cce0;
  --text-muted:     #8692ad;

  --success:        #22c55e;
  --danger:         #ff4d7d;
  --warning:        #f59e0b;
  --purple:         #a855f7;
  --pink:           #ec4899;

  --radius:         18px;
  --radius-sm:      13px;
  --radius-lg:      28px;

  --transition:     0.24s cubic-bezier(.2,.8,.2,1);

  --shadow:
    0 20px 48px rgba(0,0,0,0.34),
    0 8px 20px rgba(0,0,0,0.18);

  --shadow-glow:
    0 0 0 1px rgba(255,255,255,0.03),
    0 12px 34px rgba(255,79,155,0.11),
    0 10px 30px rgba(73,160,255,0.08);

  --font-display:   'Syne', sans-serif;
  --font-body:      'Inter', sans-serif;
  --bottom-nav:     70px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overscroll-behavior: none;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background:
    radial-gradient(circle at 0% 0%, rgba(255,138,61,0.16), transparent 24%),
    radial-gradient(circle at 100% 0%, rgba(255,79,155,0.16), transparent 26%),
    radial-gradient(circle at 100% 100%, rgba(138,84,255,0.15), transparent 26%),
    radial-gradient(circle at 0% 100%, rgba(73,160,255,0.14), transparent 24%),
    linear-gradient(90deg, #040915 0%, #091122 18%, #0b1528 40%, #091327 62%, #07101f 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.03), transparent 20%),
    radial-gradient(circle at center, rgba(255,255,255,0.025), transparent 55%);
  z-index: -1;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      transparent 0%,
      rgba(255,255,255,0.018) 18%,
      transparent 34%,
      rgba(255,255,255,0.012) 50%,
      transparent 66%,
      rgba(255,255,255,0.016) 84%,
      transparent 100%
    );
  opacity: .65;
  mix-blend-mode: screen;
  z-index: -1;
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.025);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255,138,61,0.70), rgba(255,79,155,0.70), rgba(138,84,255,0.70), rgba(73,160,255,0.70));
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255,138,61,0.88), rgba(255,79,155,0.88), rgba(138,84,255,0.88), rgba(73,160,255,0.88));
}

/* ============ TYPOGRAPHY ============ */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
}

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

/* ============ LAYOUT ============ */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 252px;
  min-height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 0 0 18px 0;
  background:
    linear-gradient(180deg, rgba(9,15,29,0.88), rgba(6,11,22,0.90));
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border-right: 1px solid rgba(255,255,255,0.06);
  box-shadow:
    14px 0 40px rgba(0,0,0,0.20),
    inset -1px 0 0 rgba(255,255,255,0.02);
}

.main-content {
  flex: 1;
  min-height: 100vh;
  margin-left: 252px;
  position: relative;
}

/* ============ SIDEBAR ============ */
.sidebar-logo {
  padding: 24px 22px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 10px;
  background:
    linear-gradient(135deg, rgba(255,138,61,0.09), rgba(255,79,155,0.07), rgba(138,84,255,0.06));
}

.logo-text {
  font-family: var(--font-display);
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, #ff9348 0%, #ff5ea7 38%, #8d63ff 72%, #69b5ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 24px rgba(255,94,167,0.10);
}

.logo-sub {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-section-label {
  padding: 14px 20px 8px;
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 12px;
  padding: 12px 14px;
  border-radius: 16px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
}

.nav-item svg {
  flex-shrink: 0;
  transition: transform var(--transition), color var(--transition);
}

.nav-item:hover {
  background: rgba(255,255,255,0.055);
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.08);
  transform: translateX(2px);
}

.nav-item:hover svg {
  transform: scale(1.05);
}

.nav-item.active {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255,138,61,0.14), rgba(255,79,155,0.14), rgba(138,84,255,0.14), rgba(73,160,255,0.10));
  border-color: rgba(255,255,255,0.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 10px 24px rgba(255,79,155,0.10);
}

.sidebar-user {
  margin-top: auto;
  padding: 14px 12px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  cursor: pointer;
  transition: all var(--transition);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}

.sidebar-user-card:hover {
  background: rgba(255,255,255,0.06);
  box-shadow: 0 12px 24px rgba(255,79,155,0.08);
  border-color: rgba(255,255,255,0.08);
}

.sidebar-avatar {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.12);
}

.sidebar-user-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-user-handle {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============ BOTTOM NAV ============ */
.bottom-nav {
  display: none;
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: 10px;
  height: var(--bottom-nav);
  z-index: 200;
  padding: 0 8px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  background: rgba(12,18,34,0.76);
  backdrop-filter: blur(24px) saturate(155%);
  -webkit-backdrop-filter: blur(24px) saturate(155%);
  box-shadow: var(--shadow);
}

.bottom-nav-inner {
  max-width: 560px;
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 14px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  transition: all var(--transition);
}

.bnav-item:hover {
  color: var(--text-secondary);
}

.bnav-item.active {
  color: #ffd193;
}

.bnav-post-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, #ff9348 0%, #ff5ea7 42%, #8d63ff 76%, #69b5ff 100%);
  color: #fff;
  box-shadow:
    0 12px 28px rgba(255,79,155,0.22),
    0 6px 14px rgba(138,84,255,0.16);
}

/* ============ CARD ============ */
.card,
.stat-card,
.auth-card,
.modal {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.card {
  padding: 20px;
}

.card-sm {
  padding: 14px;
}

/* ============ BUTTON ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: none;
  border-radius: 15px;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  transition: all var(--transition);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #ff9348 0%, #ff5ea7 42%, #8d63ff 76%, #69b5ff 100%);
  box-shadow:
    0 12px 24px rgba(255,79,155,0.20),
    0 6px 14px rgba(138,84,255,0.16);
}

.btn-primary:hover {
  box-shadow:
    0 16px 30px rgba(255,79,155,0.24),
    0 8px 18px rgba(138,84,255,0.18);
}

.btn-outline {
  color: var(--text-secondary);
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.08);
}

.btn-outline:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
}

.btn-ghost {
  color: var(--text-secondary);
  background: transparent;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}

.btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #ff6a88, #ff477e);
  box-shadow: 0 10px 20px rgba(255,71,126,0.18);
}

.btn-follow {
  padding: 8px 16px;
  font-size: 13px;
  color: #ffe0ee;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,79,155,0.18);
}

.btn-follow:hover,
.btn-follow.following {
  color: #fff;
  background: linear-gradient(135deg, #ff9348, #ff5ea7, #8d63ff);
  border-color: transparent;
}

.btn-follow.following:hover {
  background: linear-gradient(135deg, #ff6a88, #ff477e);
}

.btn-sm {
  padding: 7px 12px;
  font-size: 12px;
}

.btn-lg {
  padding: 13px 28px;
  font-size: 16px;
}

.btn-full {
  width: 100%;
}

/* ============ FORM ============ */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-input,
.form-textarea,
.form-select,
.search-input {
  width: 100%;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  border-radius: 15px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  transition: all var(--transition);
}

.form-input,
.form-textarea,
.form-select {
  padding: 11px 14px;
}

.form-input::placeholder,
.form-textarea::placeholder,
.search-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus,
.search-input:focus {
  border-color: rgba(255,79,155,0.24);
  box-shadow:
    0 0 0 4px rgba(255,79,155,0.08),
    0 10px 24px rgba(255,79,155,0.08);
  background: rgba(255,255,255,0.06);
}

.form-textarea {
  min-height: 110px;
  resize: vertical;
}

.form-error,
.form-success {
  margin-bottom: 14px;
  padding: 11px 14px;
  font-size: 13px;
  border-radius: 14px;
  border: 1px solid transparent;
}

.form-error {
  color: #fecdd3;
  background: rgba(255,71,126,0.12);
  border-color: rgba(255,71,126,0.18);
}

.form-success {
  color: #bbf7d0;
  background: rgba(34,197,94,0.12);
  border-color: rgba(34,197,94,0.18);
}

/* ============ AVATAR ============ */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.avatar-xs { width: 28px; height: 28px; }
.avatar-sm { width: 36px; height: 36px; }
.avatar-md { width: 44px; height: 44px; }
.avatar-lg { width: 64px; height: 64px; }
.avatar-xl { width: 96px; height: 96px; }
.avatar-xxl {
  width: 120px;
  height: 120px;
  border: 4px solid rgba(255,255,255,0.12);
  box-shadow:
    0 14px 30px rgba(255,79,155,0.12),
    0 6px 18px rgba(138,84,255,0.09);
}

/* ============ BADGE CHIP ============ */
.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid currentColor;
  opacity: 0.95;
}

/* ============ VIDEO CARD ============ */
.video-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.video-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.025), rgba(255,255,255,0.015)),
    var(--bg-card);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.video-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 12px;
}

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

.video-user-name {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
}

.verified-icon {
  color: #ffd193;
}

.video-time {
  font-size: 12px;
  color: var(--text-muted);
}

.video-container {
  width: 100%;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255,138,61,0.10), rgba(255,79,155,0.10), rgba(138,84,255,0.10), rgba(73,160,255,0.08));
  aspect-ratio: 9 / 16;
  max-height: 74vh;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.video-player {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.18) 38%, transparent 64%);
}

.video-info {
  position: absolute;
  left: 0;
  right: 72px;
  bottom: 0;
  padding: 16px 16px 18px;
  pointer-events: none;
}

.video-title {
  margin-bottom: 6px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 4px 14px rgba(0,0,0,0.34);
}

.video-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-chip {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #ffeaf4;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.video-actions-side {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 14px 10px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 11px;
  transition: all var(--transition);
  text-shadow: 0 2px 10px rgba(0,0,0,0.25);
}

.action-btn:hover {
  transform: scale(1.10);
}

.action-btn.liked { color: #ff4d8d; }
.action-btn.saved { color: #ffb020; }
.action-btn.reposted { color: #22c55e; }

/* ============ SWIPE VIDEO FEED ============ */
.swipe-feed {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
}

.swipe-slide {
  height: 100vh;
  position: relative;
  overflow: hidden;
  background: transparent;
  scroll-snap-align: start;
}

/* ============ POST CARD ============ */
.post-card {
  padding: 16px;
  background: rgba(12,18,34,0.62);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background var(--transition);
}

.post-card:hover {
  background: rgba(14,22,40,0.72);
}

.post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.post-content {
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.7;
  word-break: break-word;
}

.post-image {
  width: 100%;
  max-height: 320px;
  margin-top: 12px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow);
}

.post-actions {
  display: flex;
  gap: 18px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.post-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  transition: all var(--transition);
}

.post-action-btn:hover {
  color: var(--text-secondary);
}

.post-action-btn.liked {
  color: var(--danger);
}

.post-action-btn.reposted {
  color: var(--success);
}

/* ============ PROFILE ============ */
.profile-banner {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,138,61,0.22), transparent 28%),
    radial-gradient(circle at 80% 30%, rgba(255,79,155,0.22), transparent 28%),
    radial-gradient(circle at 55% 80%, rgba(138,84,255,0.20), transparent 28%),
    linear-gradient(135deg, #111a2d 0%, #131d33 50%, #11172b 100%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.profile-header {
  padding: 0 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
}

.profile-avatar-wrap {
  width: fit-content;
  position: relative;
  margin-top: -48px;
  margin-bottom: 12px;
}

.profile-stats {
  display: flex;
  gap: 24px;
  margin: 14px 0;
}

.profile-stat {
  text-align: center;
  cursor: pointer;
}

.profile-stat-num {
  display: block;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
}

.profile-stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

.profile-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}

.profile-tab {
  flex: 1;
  padding: 13px 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}

.profile-tab:hover {
  color: var(--text-secondary);
  background: rgba(255,255,255,0.03);
}

.profile-tab.active {
  color: #ffd8a8;
  border-bottom-color: #ff5ea7;
  box-shadow: inset 0 -1px 0 rgba(255,79,155,0.14);
}

/* ============ VIDEO GRID ============ */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
}

.video-thumb {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 9 / 16;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}

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

.video-thumb:hover img {
  transform: scale(1.06);
}

.video-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.62), transparent 55%);
  pointer-events: none;
}

.video-thumb-views {
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

/* ============ SEARCH ============ */
.search-bar {
  position: relative;
}

.search-bar svg {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-input {
  padding: 12px 14px 12px 42px;
  border-radius: 999px;
}

/* ============ NOTIFICATION ============ */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: all var(--transition);
}

.notif-item.unread {
  background: linear-gradient(135deg, rgba(255,138,61,0.07), rgba(255,79,155,0.07), rgba(138,84,255,0.06));
}

.notif-item:hover {
  background: rgba(255,255,255,0.04);
}

.notif-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(5,8,15,0.54);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@media (min-width: 768px) {
  .modal-overlay {
    align-items: center;
  }
}

.modal {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  animation: slideUp .26s cubic-bezier(.4,0,.2,1);
}

@media (min-width: 768px) {
  .modal {
    border-radius: var(--radius-lg);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(34px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
}

/* ============ COMMENT ============ */
.comment-item {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.comment-body {
  flex: 1;
}

.comment-author {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
}

.comment-text {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.comment-actions {
  display: flex;
  gap: 12px;
  margin-top: 7px;
}

.comment-action {
  display: flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  transition: color var(--transition);
}

.comment-action:hover {
  color: #ffd193;
}

/* ============ AUTH PAGES ============ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,138,61,0.14), transparent 28%),
    radial-gradient(circle at 80% 20%, rgba(255,79,155,0.15), transparent 28%),
    radial-gradient(circle at 50% 85%, rgba(138,84,255,0.14), transparent 28%),
    linear-gradient(135deg, #070b14 0%, #10172a 48%, #111528 100%);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 36px 32px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo-text {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, #ff9348 0%, #ff5ea7 40%, #8d63ff 75%, #69b5ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-tagline {
  font-size: 13px;
  color: var(--text-muted);
}

.auth-title {
  margin-bottom: 20px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
}

.auth-divider {
  margin: 16px 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-link {
  color: #ffd193;
  font-weight: 700;
}

.auth-link:hover {
  color: #ffe2bd;
}

/* ============ UPLOAD ============ */
.upload-zone {
  padding: 52px 24px;
  text-align: center;
  cursor: pointer;
  border-radius: 22px;
  border: 2px dashed rgba(255,79,155,0.22);
  background:
    linear-gradient(135deg, rgba(255,138,61,0.07), rgba(255,79,155,0.08), rgba(138,84,255,0.07)),
    rgba(255,255,255,0.03);
  transition: all var(--transition);
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: rgba(255,79,155,0.34);
  box-shadow:
    0 14px 28px rgba(255,79,155,0.11),
    0 8px 20px rgba(138,84,255,0.08);
}

.upload-icon {
  margin-bottom: 12px;
  color: var(--text-muted);
}

.upload-label {
  color: var(--text-secondary);
  font-weight: 700;
}

.upload-hint {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.progress-bar {
  height: 6px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff9348, #ff5ea7, #8d63ff, #69b5ff);
  transition: width .3s;
}

/* ============ TOAST ============ */
.toast-container {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bottom-nav) + 18px);
  z-index: 9999;
  width: calc(100% - 32px);
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  transform: translateX(-50%);
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  color: var(--text-primary);
  font-size: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(14,20,35,0.86);
  box-shadow: var(--shadow);
  animation: toastIn .22s ease;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger); }
.toast.info    { border-left: 3px solid #ff5ea7; }

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

/* ============ MAINTENANCE ============ */
.maintenance-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
  text-align: center;
  padding: 32px;
  background:
    radial-gradient(circle at center, rgba(255,79,155,0.10), transparent 28%),
    linear-gradient(135deg, #070b14 0%, #10172a 48%, #111528 100%);
}

/* ============ ADMIN ============ */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(12,18,34,0.80);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.admin-sidebar {
  width: 220px;
  min-height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  padding-top: 60px;
  background: rgba(12,18,34,0.82);
  border-right: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.admin-content {
  margin-left: 220px;
  padding: 24px;
}

.stat-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-card-num {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
}

.stat-card-label {
  font-size: 13px;
  color: var(--text-muted);
}

.stat-card-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffd9af;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,138,61,0.10), rgba(255,79,155,0.10), rgba(138,84,255,0.10));
  border: 1px solid rgba(255,255,255,0.06);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .main-content {
    margin-left: 0;
    padding-bottom: calc(var(--bottom-nav) + 12px);
  }

  .bottom-nav {
    display: flex;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .auth-card {
    padding: 26px 18px;
  }

  .swipe-feed .video-container,
  .video-container {
    max-height: 100vh;
  }

  .profile-banner {
    height: 150px;
  }
}

@media (max-width: 520px) {
  .video-grid {
    gap: 3px;
    padding: 3px;
  }

  .modal {
    padding: 18px;
  }

  .post-card,
  .video-header,
  .video-info {
    padding-left: 14px;
    padding-right: 14px;
  }
}

@media (min-width: 1200px) {
  .sidebar {
    width: 268px;
  }

  .main-content {
    margin-left: 268px;
  }
}

/* ============ UTILITIES ============ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }

.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

.p-3 { padding: 12px; }
.p-4 { padding: 16px; }

.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-blue { color: var(--blue-400); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

.rounded-full { border-radius: 9999px; }
.w-full { width: 100%; }
.hidden { display: none; }
.relative { position: relative; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }