/* ===== CSS Variables & Theme ===== */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #22223a;
  --bg-input: #16162a;
  --text-primary: #e8e8f0;
  --text-secondary: #9898b0;
  --text-muted: #6a6a85;
  --accent: #7c3aed;
  --accent-hover: #6d28d9;
  --accent-light: rgba(124, 58, 237, 0.15);
  --gradient: linear-gradient(135deg, #7c3aed, #ec4899);
  --gradient-alt: linear-gradient(135deg, #06b6d4, #3b82f6);
  --border: #2a2a40;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --shadow: 0 4px 20px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --nav-height: 64px;
}

[data-theme="light"] {
  --bg-primary: #f5f5f7;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f0f5;
  --bg-input: #f0f0f5;
  --text-primary: #1a1a2e;
  --text-secondary: #555570;
  --text-muted: #8888a0;
  --border: #e0e0e8;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-hover);
}

img, video {
  max-width: 100%;
  display: block;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  backdrop-filter: blur(20px);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 16px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text-primary);
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  font-size: 1.6rem;
}

.logo-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
  background: var(--accent-light);
  color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switcher {
  display: flex;
  gap: 4px;
  background: var(--bg-primary);
  padding: 3px;
  border-radius: var(--radius-sm);
}

.lang-btn {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s;
}

.lang-btn.active {
  background: var(--accent);
  color: white;
}

.theme-toggle {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

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

/* User Menu */
.user-menu {
  position: relative;
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

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

.avatar-small {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-tiny {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.premium-badge {
  font-size: 0.8rem;
}

.admin-badge {
  font-size: 0.75rem;
  background: var(--warning);
  color: #000;
  padding: 2px 8px;
  border-radius: 50px;
  font-weight: 600;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s;
  z-index: 1001;
}

.user-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--text-primary);
  transition: background 0.2s;
}

.user-dropdown a:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.user-dropdown hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 4px 0;
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 16px;
  z-index: 999;
  box-shadow: var(--shadow);
}

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

.mobile-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.mobile-link:hover {
  background: var(--accent-light);
}

.mobile-menu hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 8px 0;
}

.mobile-lang {
  display: flex;
  gap: 8px;
  padding: 8px;
}

/* ===== Main Content ===== */
.main-content {
  margin-top: var(--nav-height);
  min-height: calc(100vh - var(--nav-height) - 60px);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

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

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  color: white;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
}

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

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

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
}

/* ===== Feed Container ===== */
.feed-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 20px;
}

/* ===== Filter Tabs ===== */
.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  padding: 4px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: fit-content;
}

.filter-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-tab:hover {
  color: var(--text-primary);
}

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

/* ===== Content Wrapper ===== */
.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}

/* ===== Feed ===== */
.feed {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ===== Meme Card ===== */
.meme-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.meme-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.meme-card-header {
  padding: 16px 20px 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.meme-title a {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.3;
}

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

.meme-meta {
  display: flex;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.meme-meta i {
  margin-right: 4px;
}

.meme-media-link {
  display: block;
}

.meme-media {
  position: relative;
  width: 100%;
  background: var(--bg-primary);
  max-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.meme-img, .meme-video {
  width: 100%;
  object-fit: contain;
  max-height: 600px;
}

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

.meme-media:hover .play-overlay {
  opacity: 1;
}

.play-overlay i {
  font-size: 3rem;
  color: white;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.meme-card-actions {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.action-btn:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.action-btn.active,
.like-btn.liked {
  color: var(--accent);
}

.bookmark-btn.active {
  color: var(--warning);
}

.meme-card-tags {
  padding: 0 16px 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag-small {
  font-size: 0.75rem;
  color: var(--accent);
  background: var(--accent-light);
  padding: 2px 8px;
  border-radius: 50px;
}

/* ===== Sidebar ===== */
.sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
}

.sidebar-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 20px;
  margin-bottom: 20px;
}

.sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.sidebar-title i {
  color: var(--accent);
}

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

.top-comment-card {
  padding: 12px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.top-comment-card:hover {
  background: var(--bg-card-hover);
}

.top-comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.top-comment-user {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.top-comment-likes {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--accent);
}

.top-comment-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.top-comment-meme {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sidebar-cta {
  background: var(--gradient);
  border: none;
  color: white;
  text-align: center;
}

.sidebar-cta h3 {
  color: white;
  margin-bottom: 8px;
}

.sidebar-cta p {
  opacity: 0.9;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.sidebar-cta .btn {
  background: white;
  color: var(--accent);
}

/* ===== Feed Loader ===== */
.feed-loader {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

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

/* ===== Auth Pages ===== */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-height));
  padding: 20px;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 12px;
}

.auth-header h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--text-muted);
}

.auth-form .form-group {
  margin-bottom: 16px;
}

.auth-form label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
}

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

.auth-form .btn {
  margin-top: 8px;
}

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

.demo-creds {
  margin-top: 20px;
  text-align: center;
  padding: 12px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
}

.demo-creds code {
  background: var(--accent-light);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* ===== Alert ===== */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ===== Profile Page ===== */
.profile-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 32px 20px;
}

.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

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

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--accent);
}

.profile-info h1 {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-email {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.profile-joined {
  color: var(--text-muted);
  font-size: 0.85rem;
}

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

.stat-card {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.stat-card i {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 8px;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

.profile-settings {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.profile-settings h3 {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-form {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.settings-form .form-group {
  flex: 1;
}

.settings-form select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
}

/* ===== Bookmarks Page ===== */
.bookmarks-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px;
}

.page-title {
  font-size: 1.6rem;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-title i {
  color: var(--accent);
}

.bookmarks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.bookmark-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s;
  text-decoration: none;
}

.bookmark-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.bookmark-media {
  height: 200px;
  overflow: hidden;
  background: var(--bg-primary);
}

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

.bookmark-info {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bookmark-info h3 {
  font-size: 0.9rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.bookmark-info span {
  color: var(--text-muted);
  font-size: 0.8rem;
  flex-shrink: 0;
  margin-left: 8px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 4rem;
  opacity: 0.3;
  display: block;
  margin-bottom: 16px;
}

.empty-state p {
  margin-bottom: 24px;
  font-size: 1.1rem;
}

/* ===== Upload Page ===== */
.upload-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 32px 20px;
}

.upload-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.upload-card h1 {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.upload-form .form-group {
  margin-bottom: 20px;
}

.upload-form label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.file-upload-area:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.file-upload-area i {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 12px;
}

.file-upload-area p {
  color: var(--text-muted);
}

.file-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-preview {
  margin-top: 16px;
  text-align: center;
}

.file-preview.hidden {
  display: none;
}

/* ===== Meme Detail ===== */
.meme-detail-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 20px;
}

.meme-detail {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.meme-detail-header {
  padding: 24px 24px 16px;
}

.meme-detail-title {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.meme-detail-meta {
  display: flex;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.meme-detail-media {
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.meme-detail-img,
.meme-detail-video {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.meme-detail-actions {
  display: flex;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.meme-tags {
  padding: 0 24px 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  background: var(--accent-light);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ===== Comments ===== */
.comments-section {
  padding: 24px;
  border-top: 1px solid var(--border);
}

.comments-section h2 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-form {
  margin-bottom: 24px;
}

.comment-input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.comment-input {
  flex: 1;
  padding: 10px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
}

.comment-input:focus {
  outline: none;
  border-color: var(--accent);
}

.login-prompt {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
}

.comment-body {
  flex: 1;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.comment-author {
  font-weight: 600;
  font-size: 0.9rem;
}

.comment-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.comment-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

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

.comment-likes {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.back-link {
  margin-top: 24px;
}

/* ===== Error Pages ===== */
.error-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-height));
  padding: 20px;
}

.error-card {
  text-align: center;
  padding: 60px 40px;
}

.error-icon {
  font-size: 5rem;
  display: block;
  margin-bottom: 16px;
}

.error-card h1 {
  font-size: 4rem;
  font-weight: 900;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.error-card p {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 1.1rem;
}

/* ===== Premium Page ===== */
.premium-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-height));
  padding: 20px;
}

.premium-card {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  max-width: 500px;
}

.premium-icon {
  font-size: 4rem;
  display: block;
  margin-bottom: 16px;
}

.premium-card h1 {
  margin-bottom: 12px;
}

.premium-card p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.premium-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.premium-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.premium-feature i {
  color: var(--accent);
  width: 20px;
}

/* ===== Footer ===== */
.footer {
  padding: 20px;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

.footer-content p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .nav-links,
  .nav-actions .btn,
  .nav-actions .lang-switcher {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .nav-actions {
    gap: 8px;
  }

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

  .filter-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .auth-card {
    padding: 24px;
  }

  .profile-header {
    flex-direction: column;
    text-align: center;
  }

  .profile-actions {
    flex-direction: column;
  }

  .profile-stats {
    grid-template-columns: 1fr 1fr;
  }

  .settings-form {
    flex-direction: column;
  }

  .meme-detail-header {
    padding: 16px;
  }

  .meme-detail-actions {
    padding: 12px 16px;
  }

  .comments-section {
    padding: 16px;
  }

  .comment-input-wrapper {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .bookmarks-grid {
    grid-template-columns: 1fr;
  }

  .meme-card-actions {
    padding: 8px;
  }

  .action-btn {
    padding: 8px 10px;
    font-size: 0.8rem;
  }
}

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

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.meme-card {
  animation: fadeInUp 0.4s ease-out;
}

/* ===== Skeleton loading ===== */
.skeleton {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.skeleton-media {
  height: 300px;
  background: linear-gradient(90deg, var(--bg-primary) 0%, var(--bg-card-hover) 50%, var(--bg-primary) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-text {
  height: 16px;
  margin: 12px 16px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--bg-primary) 0%, var(--bg-card-hover) 50%, var(--bg-primary) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

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