:root {
  --bg: #07070b;
  --surface: #12131c;
  --surface-2: #1b1d2b;
  --surface-3: #25283b;
  --border: rgba(255, 255, 255, 0.1);
  --text: #f7f8fc;
  --muted: #9ba0b5;
  --pink: #fe2c55;
  --cyan: #25f4ee;
  --nav-h: 62px;
  --sidebar-w: 248px;
}

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

html, body {
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  overflow: hidden;
  user-select: none;
}

input, textarea, button {
  font-family: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* App Shell */
.app-shell {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
}

/* Desktop Left Sidebar */
.desktop-sidebar {
  width: var(--sidebar-w);
  height: 100%;
  background: rgba(12, 13, 20, 0.96);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  gap: 8px;
  z-index: 30;
  flex-shrink: 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 18px;
  cursor: pointer;
}

.brand-badge {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--cyan), #7b61ff 50%, var(--pink));
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 18px;
  color: #fff;
  box-shadow: 0 4px 18px rgba(254, 44, 85, 0.35);
}

.brand-name {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.4px;
  background: linear-gradient(90deg, #fff, #dfe4ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.side-nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.16s ease;
  text-align: left;
  width: 100%;
}

.side-nav-btn:hover {
  background: var(--surface);
  color: var(--text);
}

.side-nav-btn.active {
  background: rgba(254, 44, 85, 0.14);
  color: #fff;
}

.side-nav-btn.active .nav-icon {
  color: var(--pink);
}

.nav-icon {
  font-size: 19px;
  width: 24px;
  text-align: center;
}

.side-upload-cta {
  margin-top: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--pink), #ff5376);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(254, 44, 85, 0.32);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.side-upload-cta:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.sidebar-spacer {
  flex: 1;
}

.sidebar-user-card {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mini-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.mini-user-row:hover {
  background: var(--surface);
}

.mini-user-row img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.mini-user-meta {
  overflow: hidden;
  flex: 1;
}

.mini-user-name {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-user-handle {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.login-pill-btn {
  width: 100%;
  padding: 11px 14px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  transition: background 0.15s;
}

.login-pill-btn:hover {
  background: var(--surface-3);
}

.cloud-badge {
  font-size: 11px;
  color: var(--muted);
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cloud-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

/* Main Viewport */
.main-stage {
  flex: 1;
  height: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Top Feed Bar */
.feed-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px;
  z-index: 25;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.feed-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
  background: rgba(14, 15, 24, 0.55);
  backdrop-filter: blur(12px);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.feed-tab {
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.68);
  transition: all 0.16s ease;
}

.feed-tab.active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.sound-toggle-btn {
  position: absolute;
  right: 16px;
  top: 13px;
  pointer-events: auto;
  background: rgba(16, 18, 28, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* TikTok Vertical Scroll Feed */
.feed-scroller {
  width: 100%;
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.feed-scroller::-webkit-scrollbar {
  display: none;
}

.feed-slide {
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #040407;
}

.media-frame {
  position: relative;
  height: 100%;
  width: 100%;
  max-width: 500px;
  background: #0b0c13;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.9);
}

@media (min-width: 900px) {
  .feed-slide {
    padding: 14px 0;
  }
  .media-frame {
    height: calc(100% - 8px);
    max-width: min(460px, 56vh);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
  }
}

.post-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #08090f;
}

.post-photo-wrap {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.post-photo-bg {
  position: absolute;
  inset: -24px;
  width: calc(100% + 48px);
  height: calc(100% + 48px);
  object-fit: cover;
  filter: blur(26px) brightness(0.45);
  transform: scale(1.08);
}

.post-photo-main {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 2;
}

.post-card-canvas {
  width: 100%;
  height: 100%;
  padding: 40px 28px 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 25px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.3px;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.45);
  user-select: text;
}

.theme-neon-sunset {
  background: linear-gradient(145deg, #ff2a5f 0%, #7928ca 52%, #181a38 100%);
}
.theme-cyber-ocean {
  background: linear-gradient(145deg, #00c6ff 0%, #0072ff 50%, #101935 100%);
}
.theme-aurora {
  background: linear-gradient(145deg, #10b981 0%, #0ea5e9 52%, #1e1b4b 100%);
}
.theme-gold-fire {
  background: linear-gradient(145deg, #f97316 0%, #ec4899 55%, #2e1065 100%);
}
.theme-midnight {
  background: radial-gradient(circle at top right, #4f46e5, #0f172a 70%);
}

/* Pause Indicator & Double Tap Heart */
.play-indicator {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 8;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.play-indicator.visible {
  opacity: 1;
}

.play-indicator span {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  font-size: 28px;
}

.floating-heart {
  position: absolute;
  font-size: 86px;
  pointer-events: none;
  z-index: 20;
  transform: translate(-50%, -50%) scale(0.4);
  animation: heartBurst 0.78s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
  filter: drop-shadow(0 8px 24px rgba(254, 44, 85, 0.65));
}

@keyframes heartBurst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(-12deg); }
  25% { opacity: 1; transform: translate(-50%, -50%) scale(1.15) rotate(6deg); }
  65% { opacity: 1; transform: translate(-50%, -68%) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translate(-50%, -115%) scale(1.25) rotate(8deg); }
}

/* Bottom Meta & Right Action Rail inside Media Frame */
.slide-gradient-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 52%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.36) 52%, transparent 100%);
  pointer-events: none;
  z-index: 5;
}

.post-info-overlay {
  position: absolute;
  left: 14px;
  right: 78px;
  bottom: 18px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75);
}

@media (max-width: 899px) {
  .post-info-overlay {
    bottom: calc(var(--nav-h) + 16px);
  }
}

.post-author-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-author-handle {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
}

.post-author-handle:hover {
  text-decoration: underline;
}

.post-kind-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(4px);
}

.post-caption {
  font-size: 14px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.94);
  word-break: break-word;
  user-select: text;
}

.post-music-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 500;
}

/* Right Action Rail */
.action-rail {
  position: absolute;
  right: 10px;
  bottom: 22px;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

@media (max-width: 899px) {
  .action-rail {
    bottom: calc(var(--nav-h) + 20px);
  }
}

.rail-avatar-box {
  position: relative;
  margin-bottom: 6px;
}

.rail-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  cursor: pointer;
  background: var(--surface-2);
}

.rail-follow-plus {
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.rail-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.rail-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(20, 22, 34, 0.55);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  font-size: 22px;
  transition: transform 0.16s cubic-bezier(0.2, 0.9, 0.3, 1.4), background 0.16s;
}

.rail-btn:active .rail-icon-circle {
  transform: scale(1.25);
}

.rail-btn.liked .rail-icon-circle {
  color: var(--pink);
  background: rgba(254, 44, 85, 0.18);
}

.rail-count {
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.video-progress-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.22);
  z-index: 15;
}

@media (max-width: 899px) {
  .video-progress-bar {
    bottom: var(--nav-h);
  }
}

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

/* Desktop Floating Up / Down Controls */
.desktop-arrows {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 20;
}

.arrow-circle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 18px;
  color: #fff;
  transition: background 0.15s, transform 0.15s;
}

.arrow-circle-btn:hover {
  background: var(--surface-3);
  transform: scale(1.06);
}

/* Empty Feed State */
.empty-feed-state {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
  gap: 14px;
}

/* Profile Page View */
.profile-view {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 28px 20px 100px;
  background: var(--bg);
}

.profile-container {
  max-width: 820px;
  margin: 0 auto;
}

.profile-top-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 16px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
}

.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar-lg {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.16);
  background: var(--surface-2);
}

.avatar-edit-chip {
  position: absolute;
  right: 0;
  bottom: 2px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 15px;
  border: 2px solid var(--bg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.profile-main-info {
  flex: 1;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-display-name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.profile-username {
  font-size: 15px;
  color: var(--muted);
  margin-top: -6px;
}

.profile-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.btn-primary {
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--pink);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  transition: opacity 0.15s;
}

.btn-primary:hover {
  opacity: 0.9;
}

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

.btn-secondary {
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.15s;
}

.btn-secondary:hover {
  background: var(--surface-3);
}

.profile-stats-row {
  display: flex;
  gap: 22px;
  margin-top: 4px;
}

.stat-item strong {
  font-size: 17px;
  font-weight: 800;
  margin-right: 5px;
}

.stat-item span {
  font-size: 13px;
  color: var(--muted);
}

.profile-bio {
  font-size: 14px;
  line-height: 1.45;
  color: #e2e5f2;
  white-space: pre-wrap;
  user-select: text;
}

/* Profile Grid Tabs */
.profile-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-top: 6px;
}

.profile-tab {
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}

.profile-tab.active {
  color: #fff;
  border-bottom-color: var(--pink);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

@media (max-width: 560px) {
  .posts-grid {
    gap: 4px;
  }
}

.grid-tile {
  aspect-ratio: 3 / 4;
  background: var(--surface);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.grid-tile video,
.grid-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.22s ease;
}

.grid-tile:hover video,
.grid-tile:hover img {
  transform: scale(1.04);
}

.grid-card-preview {
  width: 100%;
  height: 100%;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.grid-badge-top {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(4px);
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 11px;
}

.grid-meta-bottom {
  position: absolute;
  inset: auto 0 0 0;
  padding: 20px 8px 7px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
}

/* Mobile Bottom Nav */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--nav-h);
  background: rgba(10, 11, 17, 0.94);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  z-index: 40;
  align-items: center;
  justify-content: space-around;
}

.mob-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.mob-nav-item.active {
  color: #fff;
}

.mob-nav-item .mob-icon {
  font-size: 20px;
}

.mob-plus-btn {
  width: 46px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--cyan) 0%, #fff 20%, #fff 80%, var(--pink) 100%);
  color: #000;
  font-size: 21px;
  font-weight: 900;
  display: grid;
  place-items: center;
}

@media (max-width: 899px) {
  .desktop-sidebar,
  .desktop-arrows {
    display: none;
  }
  .mobile-bottom-nav {
    display: flex;
  }
}

/* Modals & Drawers */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(8px);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.hidden {
  display: none !important;
}

.modal-card {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 800;
}

.close-x {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 17px;
}

.auth-switch-tabs,
.upload-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg);
  padding: 4px;
  border-radius: 12px;
  gap: 4px;
}

.upload-mode-tabs {
  grid-template-columns: 1fr 1fr 1fr;
}

.seg-btn {
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.seg-btn.active {
  background: var(--surface-2);
  color: #fff;
}

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

.field-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.text-input {
  width: 100%;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: #fff;
  font-size: 14px;
  outline: none;
}

.text-input:focus {
  border-color: var(--pink);
}

textarea.text-input {
  resize: vertical;
  min-height: 76px;
}

/* Avatar Picker Grid */
.avatar-picker-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.avatar-current-preview {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-current-preview img {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--pink);
}

.preset-avatars-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.preset-avatar-item {
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  border: 2.5px solid transparent;
  padding: 2px;
  cursor: pointer;
  transition: transform 0.14s, border-color 0.14s;
}

.preset-avatar-item:hover {
  transform: scale(1.07);
}

.preset-avatar-item.selected {
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(37, 244, 238, 0.45);
}

.preset-avatar-item img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
}

/* Upload Dropzone */
.dropzone-box {
  border: 2px dashed rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 24px 16px;
  text-align: center;
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.dropzone-box:hover {
  border-color: var(--pink);
  background: rgba(254, 44, 85, 0.06);
}

.upload-preview-stage {
  width: 100%;
  max-height: 270px;
  border-radius: 14px;
  overflow: hidden;
  background: #050508;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.upload-preview-stage video,
.upload-preview-stage img {
  max-height: 270px;
  max-width: 100%;
  object-fit: contain;
}

.theme-swatches {
  display: flex;
  gap: 8px;
}

.theme-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
}

.theme-swatch.active {
  border-color: #fff;
  transform: scale(1.1);
}

.progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-inner {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  transition: width 0.15s ease;
}

/* Comments Drawer */
.comments-sheet {
  width: 100%;
  max-width: 460px;
  height: 72vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.comments-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.comment-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.comment-item img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
}

.comment-body-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.comment-author {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}

.comment-text {
  font-size: 14px;
  line-height: 1.4;
  user-select: text;
}

.comment-form {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* Toast */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: rgba(20, 22, 34, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}
