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

:root {
  --primary: #2B5278;
  --primary-dark: #1E3A5F;
  --bg-dark: #0F1923;
  --bg-light: #F0F2F5;
  --text-dark: #FFFFFF;
  --text-light: #000000;
  --card-dark: #1a2836;
  --card-light: #FFFFFF;
  --border-dark: #2B5278;
  --border-light: #E0E0E0;
  --gray: #8696A0;
  --success: #00D26A;
  --danger: #FF4444;
}

[data-theme="dark"] {
  --bg: var(--bg-dark);
  --text: var(--text-dark);
  --card: var(--card-dark);
  --border: var(--border-dark);
}

[data-theme="light"] {
  --bg: var(--bg-light);
  --text: var(--text-light);
  --card: var(--card-light);
  --border: var(--border-light);
}

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

html, body {
  font-family: 'Tajawal', sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  min-height: 100dvh;
  overflow-x: hidden;
}

body {
  padding-bottom: calc(70px + env(safe-area-inset-bottom));
}

/* ===== SKELETON LOADING ===== */
.skeleton {
  background: linear-gradient(90deg, var(--card) 25%, var(--border) 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 8px;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-circle {
  border-radius: 50%;
}

.skeleton-text {
  height: 16px;
  margin: 8px 0;
}

.skeleton-text.short { width: 60%; }
.skeleton-text.medium { width: 80%; }
.skeleton-text.long { width: 100%; }

.skeleton-card {
  padding: 16px;
  margin-bottom: 12px;
}

/* ===== COMMON COMPONENTS ===== */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  border: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

.input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}

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

.input-group {
  margin-bottom: 16px;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--gray);
}

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

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  background: var(--bg);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.header .logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

.header-icons {
  display: flex;
  gap: 16px;
}

.header-icon {
  font-size: 24px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
  position: relative;
}

.header-icon:hover {
  opacity: 1;
}

.header-icon .badge {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--danger);
  color: white;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  display: flex;
  justify-content: space-around;
  padding: 12px 0;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  z-index: 1000;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--gray);
  font-size: 12px;
  transition: color 0.2s;
  position: relative;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item span:first-child {
  font-size: 24px;
}

.nav-item .nav-badge {
  position: absolute;
  top: -5px;
  right: 50%;
  transform: translateX(50%);
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--danger);
  color: white;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ===== LOGIN PAGE ===== */
.login-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-logo {
  font-size: 48px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.login-subtitle {
  color: var(--gray);
  margin-bottom: 40px;
}

.login-box {
  width: 100%;
  max-width: 400px;
}

.tabs {
  display: flex;
  margin-bottom: 24px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.tab {
  flex: 1;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  background: var(--card);
  transition: all 0.2s;
}

.tab.active {
  background: var(--primary);
  color: white;
}

/* ===== STORIES ===== */
.stories-container {
  padding: 16px;
  overflow-x: auto;
  display: flex;
  gap: 16px;
  scrollbar-width: none;
}

.stories-container::-webkit-scrollbar {
  display: none;
}

.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 70px;
  cursor: pointer;
}

.story-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: var(--card);
  border: 3px solid var(--primary);
  position: relative;
}

.story-avatar.no-story {
  border-color: var(--border);
}

.story-avatar .add-story {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 2px solid var(--bg);
}

.story-name {
  font-size: 12px;
  color: var(--gray);
  text-align: center;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== FEED TABS ===== */
.feed-tabs {
  display: flex;
  padding: 0 16px;
  gap: 8px;
  margin-bottom: 16px;
}

.feed-tab {
  padding: 8px 20px;
  border-radius: 20px;
  background: var(--card);
  color: var(--gray);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--border);
}

.feed-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ===== VIDEO CARDS ===== */
.video-feed {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.video-card {
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.video-thumbnail {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  overflow: hidden;
}

.video-thumbnail img,
.video-thumbnail video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumbnail .play-btn {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
}

.video-duration {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.video-info {
  padding: 12px;
}

.video-header {
  display: flex;
  gap: 12px;
}

.video-channel-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.video-details {
  flex: 1;
}

.video-title {
  font-weight: 500;
  margin-bottom: 4px;
  line-height: 1.3;
}

.video-meta {
  color: var(--gray);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.video-actions {
  display: flex;
  justify-content: space-around;
  padding: 12px;
  border-top: 1px solid var(--border);
}

.video-action {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gray);
  cursor: pointer;
  font-size: 14px;
  transition: color 0.2s;
}

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

.video-action:hover {
  color: var(--primary);
}

/* ===== MESSAGES LIST ===== */
.messages-header {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.messages-title {
  font-size: 24px;
  font-weight: 700;
}

.new-chat-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

.message-filters {
  display: flex;
  padding: 0 16px;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.message-filter {
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--card);
  color: var(--gray);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
}

.message-filter.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.conversations-list {
  padding: 0 16px;
}

.conversation-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--card);
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  color: inherit;
}

.conversation-item:hover {
  background: var(--border);
}

.conversation-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  position: relative;
}

.conversation-avatar.online::after {
  content: '';
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background: #4CAF50;
  border-radius: 50%;
  border: 2px solid var(--card);
}

.conversation-item.pinned {
  background: rgba(43, 82, 120, 0.1);
}

.pin-icon {
  font-size: 12px;
}

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

.conversation-name {
  font-weight: 500;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.conversation-name .muted-icon {
  font-size: 14px;
  opacity: 0.6;
}

.conversation-last {
  color: var(--gray);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.conversation-time {
  color: var(--gray);
  font-size: 12px;
}

.conversation-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== CHAT PAGE ===== */
.chat-page {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  height: 100vh;
  padding-bottom: 0;
  overflow: hidden;
}

.chat-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top));
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.back-btn {
  font-size: 24px;
  cursor: pointer;
}

.chat-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.chat-user-info {
  flex: 1;
}

.chat-user-name {
  font-weight: 500;
}

.chat-user-status {
  font-size: 13px;
  color: var(--success);
}

.chat-user-status.typing {
  color: var(--primary);
}

.chat-header-actions {
  display: flex;
  gap: 16px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  padding-top: calc(70px + env(safe-area-inset-top));
  padding-bottom: calc(80px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  height: 100vh;
  -webkit-overflow-scrolling: touch;
  gap: 8px;
}

.message-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  position: relative;
}

.message-bubble.sent {
  align-self: flex-start;
  background: var(--primary);
  color: white;
  border-bottom-left-radius: 4px;
}

.message-bubble.received {
  align-self: flex-end;
  background: var(--card);
  border: 1px solid var(--border);
  border-bottom-right-radius: 4px;
}

.message-bubble.deleted {
  opacity: 0.6;
  font-style: italic;
}

.message-reply {
  background: rgba(0,0,0,0.1);
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  border-right: 3px solid var(--primary);
  cursor: pointer;
}

.message-reply-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--primary);
}

.message-reply-content {
  font-size: 13px;
  opacity: 0.8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-content {
  word-break: break-word;
}

.message-content img {
  max-width: 100%;
  border-radius: 8px;
  margin-top: 8px;
  cursor: pointer;
}

.message-content video {
  max-width: 100%;
  border-radius: 8px;
  margin-top: 8px;
}

.message-content audio {
  width: 100%;
  margin-top: 8px;
}

.message-content .link-preview {
  background: rgba(0,0,0,0.1);
  border-radius: 8px;
  padding: 12px;
  margin-top: 8px;
}

.message-content .link-preview img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  margin: 0 0 8px 0;
}

.message-content .link-preview-title {
  font-weight: 500;
  margin-bottom: 4px;
}

.message-content .link-preview-desc {
  font-size: 13px;
  opacity: 0.8;
}

.message-time {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.message-time .expires-icon {
  font-size: 12px;
}

.message-bubble.sent .message-time {
  color: rgba(255,255,255,0.8);
}

.message-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.reaction-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 12px;
  background: rgba(0,0,0,0.1);
  font-size: 14px;
  cursor: pointer;
}

.reaction-badge .count {
  font-size: 12px;
}

/* ===== CHAT INPUT ===== */
.chat-input-area {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 16px;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

.reply-preview {
  display: none;
  padding: 8px 12px;
  background: var(--bg);
  border-right: 3px solid var(--primary);
  margin-bottom: 8px;
  border-radius: 8px;
  position: relative;
}

.reply-preview.show {
  display: block;
}

.reply-preview-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--primary);
}

.reply-preview-content {
  font-size: 13px;
  color: var(--gray);
}

.reply-preview-close {
  position: absolute;
  top: 8px;
  left: 8px;
  cursor: pointer;
  font-size: 16px;
}

.chat-input-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chat-input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  outline: none;
  min-height: 44px;
  max-height: 120px;
  resize: none;
}

.chat-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.attach-btn {
  background: var(--card);
  border: 1px solid var(--border);
}

.send-btn {
  background: var(--primary);
  color: white;
}

.record-btn {
  background: var(--card);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.record-btn.recording {
  background: var(--danger);
  color: white;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.recording-indicator {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  border-radius: 24px;
  flex: 1;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.recording-indicator.show {
  display: flex;
}

.recording-indicator .rec-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  animation: blink 1s infinite;
  flex-shrink: 0;
}

.recording-indicator .rec-dot.paused {
  animation: none;
  opacity: 0.5;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.recording-indicator .rec-time {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  font-family: monospace;
  text-align: center;
}

.recording-indicator .rec-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.recording-indicator .rec-cancel-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.recording-indicator .rec-cancel-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.recording-indicator .rec-pause-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.recording-indicator .rec-pause-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.recording-indicator .rec-stop-btn {
  background: white;
  color: #e74c3c;
}

.recording-indicator .rec-stop-btn:hover {
  transform: scale(1.1);
}

.recording-indicator .rec-send-btn {
  background: #00D26A;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 210, 106, 0.4);
}

.recording-indicator .rec-send-btn:hover {
  background: #00b359;
  transform: scale(1.1);
}

/* ===== MESSAGE CONTEXT MENU ===== */
.message-menu {
  position: fixed;
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  z-index: 2000;
  min-width: 180px;
  overflow: hidden;
  display: none;
}

.message-menu.show {
  display: block;
}

.message-menu-item {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.message-menu-item:hover {
  background: var(--border);
}

.message-menu-item.danger {
  color: var(--danger);
}

/* ===== REACTIONS PICKER ===== */
.reactions-picker {
  position: fixed;
  background: var(--card);
  border-radius: 24px;
  padding: 8px 12px;
  display: none;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  z-index: 2000;
}

.reactions-picker.show {
  display: flex;
}

.reactions-picker .reaction {
  font-size: 28px;
  cursor: pointer;
  transition: transform 0.2s;
}

.reactions-picker .reaction:hover {
  transform: scale(1.2);
}

/* ===== TYPING INDICATOR ===== */
.typing-indicator {
  padding: 10px 14px;
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--border);
  align-self: flex-end;
  display: none;
}

.typing-indicator.show {
  display: flex;
  gap: 4px;
}

.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray);
  animation: typing 1s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}

/* ===== EXPLORE PAGE ===== */
.search-box {
  padding: 16px;
}

.search-input {
  width: 100%;
  padding: 14px 20px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
}

.categories {
  display: flex;
  padding: 0 16px;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 20px;
  scrollbar-width: none;
}

.categories::-webkit-scrollbar {
  display: none;
}

.category-tag {
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--card);
  color: var(--gray);
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.category-tag.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.explore-section {
  padding: 0 16px;
  margin-bottom: 24px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

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

.video-grid-item {
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
}

.video-grid-thumb {
  aspect-ratio: 16/9;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  overflow: hidden;
}

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

.video-grid-info {
  padding: 10px;
}

.video-grid-title {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-grid-meta {
  font-size: 12px;
  color: var(--gray);
}

.channels-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.channel-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
  cursor: pointer;
}

.channel-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.channel-info {
  flex: 1;
}

.channel-name {
  font-weight: 500;
  margin-bottom: 2px;
}

.channel-followers {
  font-size: 13px;
  color: var(--gray);
}

.follow-btn {
  padding: 8px 20px;
  border-radius: 20px;
  background: var(--primary);
  color: white;
  border: none;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}

.follow-btn.following {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}

/* ===== PROFILE PAGE ===== */
.profile-cover {
  height: 150px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.profile-info {
  padding: 0 16px;
  margin-top: -50px;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--card);
  border: 4px solid var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 50px;
  margin-bottom: 12px;
  cursor: pointer;
  position: relative;
}

.profile-avatar .edit-avatar {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

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

.profile-name.editable {
  cursor: pointer;
}

.profile-username {
  color: var(--gray);
  margin-bottom: 12px;
}

.profile-bio {
  margin-bottom: 16px;
  line-height: 1.5;
}

.profile-bio.editable {
  cursor: pointer;
}

.profile-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
}

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

.profile-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.profile-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.profile-tab {
  flex: 1;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  color: var(--gray);
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.profile-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.profile-videos-title {
  font-size: 18px;
  font-weight: 700;
  padding: 0 16px;
  margin-bottom: 16px;
}

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

.profile-video-item {
  aspect-ratio: 1;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  cursor: pointer;
  overflow: hidden;
}

.profile-video-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== NOTIFICATIONS PAGE ===== */
.notifications-list {
  padding: 0 16px;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--card);
  border-radius: 12px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
}

.notification-item.unread {
  background: rgba(43, 82, 120, 0.1);
  border-color: var(--primary);
}

.notification-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.notification-content {
  flex: 1;
}

.notification-text {
  margin-bottom: 4px;
}

.notification-text strong {
  font-weight: 500;
}

.notification-time {
  font-size: 12px;
  color: var(--gray);
}

/* ===== SETTINGS PAGE ===== */
.settings-section {
  padding: 16px;
  margin-bottom: 8px;
}

.settings-title {
  font-size: 14px;
  color: var(--gray);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.settings-list {
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.settings-item:last-child {
  border-bottom: none;
}

.settings-item-label {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.settings-item-arrow {
  color: var(--gray);
}

.toggle-switch {
  width: 50px;
  height: 28px;
  border-radius: 14px;
  background: var(--border);
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-switch.active {
  background: var(--primary);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  top: 2px;
  left: 2px;
  transition: transform 0.2s;
}

.toggle-switch.active::after {
  transform: translateX(22px);
}

.logout-btn {
  width: calc(100% - 32px);
  margin: 24px 16px;
  padding: 16px;
  border-radius: 12px;
  background: var(--danger);
  color: white;
  border: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

/* ===== CHANNEL PAGE ===== */
.channel-header {
  padding: 24px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.channel-header-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin: 0 auto 12px;
}

.channel-header-name {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.channel-header-desc {
  color: var(--gray);
  margin-bottom: 12px;
}

.channel-header-stats {
  font-size: 14px;
  color: var(--gray);
  margin-bottom: 16px;
}

.channel-posts {
  padding: 16px;
}

.channel-post {
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}

.channel-post-content {
  margin-bottom: 12px;
  line-height: 1.6;
}

.channel-post-time {
  font-size: 12px;
  color: var(--gray);
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card);
  color: var(--text);
  padding: 12px 24px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s;
  border: 1px solid var(--border);
}

.toast.show {
  opacity: 1;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  padding: 16px;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--card);
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}

.modal-close {
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: 24px;
  cursor: pointer;
}

/* ===== USERS LIST ===== */
.users-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.user-item:hover {
  background: var(--border);
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.user-info h4 {
  font-weight: 500;
  margin-bottom: 2px;
}

.user-info p {
  font-size: 13px;
  color: var(--gray);
}

/* ===== EMPTY STATE ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.empty-title {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
}

.empty-text {
  color: var(--gray);
}

/* ===== FILE INPUT ===== */
.file-input {
  display: none;
}

/* ===== VIDEO PLAYER MODAL ===== */
.video-player-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 2000;
  display: none;
  flex-direction: column;
}

.video-player-modal.show {
  display: flex;
}

.video-player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
}

.video-player-close {
  font-size: 28px;
  cursor: pointer;
  color: white;
}

.video-player-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.video-player-content video {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
}

.video-player-info {
  padding: 16px;
  color: white;
}

.video-player-title {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
}

.video-player-meta {
  color: var(--gray);
  font-size: 14px;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 768px) {
  .video-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

/* ===== UPLOAD MODAL ===== */
.upload-progress {
  margin-top: 16px;
}

.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  transition: width 0.3s;
}

.progress-text {
  text-align: center;
  margin-top: 8px;
  font-size: 14px;
  color: var(--gray);
}

/* ===== EMOJI PICKER ===== */
.emoji-picker {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.emoji-picker span {
  font-size: 24px;
  cursor: pointer;
  text-align: center;
  padding: 4px;
  border-radius: 8px;
  transition: background 0.2s;
}

.emoji-picker span:hover {
  background: var(--border);
}

/* ===== USER CARD (Bottom Sheet) ===== */
.user-card-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 2500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.user-card-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.user-card {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  border-radius: 24px 24px 0 0;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  z-index: 2501;
  max-height: 85vh;
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom);
}

.user-card-overlay.show .user-card {
  transform: translateY(0);
}

.user-card-handle {
  width: 40px;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  margin: 12px auto;
}

.user-card-header {
  text-align: center;
  padding: 16px;
}

.user-card-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin: 0 auto 12px;
  overflow: hidden;
}

.user-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-card-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.user-card-bio {
  color: var(--gray);
  font-size: 14px;
  margin-bottom: 16px;
}

.user-card-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 16px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.user-card-stat {
  text-align: center;
}

.user-card-stat-value {
  font-size: 18px;
  font-weight: 700;
}

.user-card-stat-label {
  font-size: 12px;
  color: var(--gray);
}

.user-card-videos {
  padding: 16px;
}

.user-card-videos-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--gray);
}

.user-card-videos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.user-card-video-item {
  aspect-ratio: 1;
  background: var(--bg-dark);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.user-card-video-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.user-card-actions .btn {
  padding: 14px;
}

.user-card-secondary-actions {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 16px;
  border-top: 1px solid var(--border);
}

.user-card-secondary-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--gray);
  cursor: pointer;
  font-size: 12px;
}

.user-card-secondary-btn span:first-child {
  font-size: 20px;
}

.user-card-secondary-btn.danger {
  color: var(--danger);
}

.user-card-secondary-btn.success {
  color: #00D26A;
}

/* ===== CHANNEL POST IMPROVEMENTS ===== */
.channel-post {
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}

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

.channel-post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.channel-post-info {
  flex: 1;
}

.channel-post-name {
  font-weight: 500;
}

.channel-post-time {
  font-size: 12px;
  color: var(--gray);
}

.channel-post-content {
  margin-bottom: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.channel-post-content img,
.channel-post-content video {
  max-width: 100%;
  border-radius: 8px;
  margin-top: 8px;
}

.channel-post-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--gray);
  font-size: 13px;
}

.channel-post-stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.channel-post-actions {
  display: flex;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: 12px;
}

.channel-post-action {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--gray);
  transition: color 0.2s;
  font-size: 14px;
}

.channel-post-action:hover {
  color: var(--primary);
}

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

/* Comments Section */
.channel-post-comments {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.comment-item {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.comment-content {
  flex: 1;
  background: var(--bg);
  padding: 10px 12px;
  border-radius: 12px;
}

.comment-name {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
}

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

.comment-time {
  font-size: 11px;
  color: var(--gray);
  margin-top: 4px;
}

.comment-input-wrapper {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.comment-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
}

.comment-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ===== MESSAGE IMPROVEMENTS ===== */
.message-bubble {
  animation: messageSlideIn 0.3s ease;
}

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

.message-bubble.sent {
  position: relative;
}

.message-status {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}

.message-status.read {
  color: #4FC3F7;
}

/* Image Preview Before Send */
.image-preview-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.95);
  z-index: 9999;
  display: none;
  flex-direction: column;
}

.image-preview-container.show {
  display: flex !important;
}

.image-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.image-preview-close {
  font-size: 28px;
  color: white;
  cursor: pointer;
}

.image-preview-content {
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
}

.image-preview-content img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  object-fit: contain;
}

.image-preview-footer {
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex !important;
  gap: 12px;
  align-items: center;
  background: rgba(0,0,0,0.9);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.image-preview-caption {
  flex: 1;
  padding: 12px 16px;
  border-radius: 24px;
  border: none;
  background: rgba(255,255,255,0.1);
  color: white;
  font-family: inherit;
  font-size: 16px;
  outline: none;
}

.image-preview-send {
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  border-radius: 50%;
  background: #00D26A;
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,210,106,0.4);
}

.image-preview-send:active {
  transform: scale(0.95);
  background: #00b359;
}

/* ===== PAGE TRANSITIONS ===== */
body {
  animation: pageLoad 0.3s ease;
}

@keyframes pageLoad {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ===== IMPROVED SETTINGS ===== */
.settings-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--card);
  border-radius: 12px 12px 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
}

.settings-toggle-all {
  font-size: 12px;
  color: var(--primary);
  cursor: pointer;
}

.blocked-user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.blocked-user-item:last-child {
  border-bottom: none;
}

.blocked-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.blocked-user-info {
  flex: 1;
}

.blocked-user-name {
  font-weight: 500;
}

.blocked-user-username {
  font-size: 13px;
  color: var(--gray);
}

.unblock-btn {
  padding: 6px 14px;
  border-radius: 16px;
  background: var(--danger);
  color: white;
  border: none;
  font-size: 13px;
  cursor: pointer;
}

/* ===== FORWARD MESSAGE MODAL ===== */
.forward-modal-list {
  max-height: 400px;
  overflow-y: auto;
}

.forward-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 8px;
}

.forward-item:hover {
  background: var(--border);
}

.forward-item.selected {
  background: rgba(43, 82, 120, 0.2);
}

.forward-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.forward-item.selected .forward-checkbox {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ===== LOADING STATES ===== */
.btn.loading {
  position: relative;
  color: transparent !important;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid white;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== CHANNEL SHARE ===== */
.channel-share-link {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.channel-share-input {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

.channel-share-btn {
  padding: 12px 20px;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
}

/* ===== NOTIFICATION BADGE ANIMATION ===== */
.nav-badge, .conversation-badge {
  animation: badgePop 0.3s ease;
}

@keyframes badgePop {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Edited message badge */
.edited-badge {
  font-size: 11px;
  color: var(--gray);
  font-style: italic;
}

/* Search results */
.search-result-item {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.search-result-item:hover {
  background: var(--border);
}

.search-result-name {
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 4px;
}

.search-result-content {
  color: var(--gray);
  font-size: 13px;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-time {
  font-size: 11px;
  color: var(--gray);
}

/* Video comments section */
.video-comments-section {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  max-height: 60vh;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 1001;
  display: flex;
  flex-direction: column;
}

.video-comments-section.show {
  transform: translateY(0);
}

.comments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.comments-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.comments-header span {
  font-size: 20px;
  cursor: pointer;
}

.comments-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}

.comment-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.comment-content {
  flex: 1;
}

.comment-name {
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 4px;
}

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

.comment-time {
  font-size: 12px;
  color: var(--gray);
  margin-top: 4px;
}

.comments-input {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.comments-input input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}

.comments-input button {
  padding: 10px 20px;
  border-radius: 20px;
  background: var(--primary);
  color: white;
  border: none;
  font-family: inherit;
  cursor: pointer;
}

.video-action.bookmarked span:first-child {
  color: var(--primary);
}
