/* The New World CSS Stylesheet */

/* Base imports and reset */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Enhanced Color palette */
  --primary-bg: #0a0a0a;
  --secondary-bg: #141414;
  --card-bg: linear-gradient(145deg, #1c1c1c 0%, #1e1e1e 100%);
  --card-bg-solid: #1c1c1c;
  --card-bg-elevated: linear-gradient(145deg, #212121 0%, #242424 100%);
  --card-bg-elevated-solid: #212121;
  --navbar-bg: rgba(3, 3, 3, 0.92);
  --navbar-border: rgba(255, 255, 255, 0.08);
  --auth-panel-bg: linear-gradient(155deg, rgba(12, 12, 12, 0.96) 0%, rgba(6, 6, 6, 0.88) 100%);
  --auth-panel-border: rgba(255, 255, 255, 0.12);
  --auth-panel-shadow: 0 38px 60px -22px rgba(0, 0, 0, 0.65);
  --auth-panel-glow: rgba(59, 130, 246, 0.28);
  --auth-input-bg: rgba(15, 15, 15, 0.85);
  --auth-input-border: rgba(255, 255, 255, 0.12);
  --auth-input-placeholder: rgba(226, 232, 240, 0.5);
  --auth-input-focus-bg: rgba(8, 8, 8, 0.95);
  --auth-toggle-color: rgba(255, 255, 255, 0.7);
  --hover-bg: rgba(255, 255, 255, 0.05);
  --hover-bg-light: rgba(255, 255, 255, 0.03);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-light: rgba(255, 255, 255, 0.12);
  --text-primary: #ffffff;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --text-subtle: #6b7280;
  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;
  --accent-blue-dark: #1d4ed8;
  --accent-blue-light: #60a5fa;
  --success-green: #10b981;
  --success-green-hover: #059669;
  --error-red: #ef4444;
  --error-red-hover: #dc2626;
  --warning-orange: #f59e0b;
  --warning-orange-hover: #d97706;
  --purple-accent: #8b5cf6;
  --purple-accent-hover: #7c3aed;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  
  /* Border radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Animation curves */
  --ease-out-cubic: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-in-out-cubic: cubic-bezier(0.65, 0, 0.35, 1);
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  margin-left: 0.35rem;
  border-radius: 50%;
  background: var(--accent-blue, #3b82f6);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.no-users-message {
  color: var(--text-secondary, #d1d5db);
  text-align: center;
  padding: var(--space-md, 1rem);
}

/* Light Theme */
.theme-light {
  --primary-bg: #ffffff;
  --secondary-bg: #f8fafc;
  --tertiary-bg: #f1f5f9;
  --card-bg: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  --card-bg-solid: #ffffff;
  --card-bg-elevated: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
  --card-bg-elevated-solid: #f8fafc;
  --navbar-bg: rgba(255, 255, 255, 0.95);
  --navbar-border: rgba(0, 0, 0, 0.06);
  --auth-panel-bg: linear-gradient(160deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.92) 100%);
  --auth-panel-border: rgba(15, 23, 42, 0.12);
  --auth-panel-shadow: 0 32px 60px -24px rgba(15, 23, 42, 0.28);
  --auth-panel-glow: rgba(59, 130, 246, 0.18);
  --auth-input-bg: rgba(255, 255, 255, 0.92);
  --auth-input-border: rgba(15, 23, 42, 0.12);
  --auth-input-placeholder: rgba(71, 85, 105, 0.65);
  --auth-input-focus-bg: rgba(255, 255, 255, 1);
  --auth-toggle-color: rgba(71, 85, 105, 0.85);
  --bg-gradient: radial-gradient(ellipse at top, #f8fafc 0%, #ffffff 100%);
  --hover-bg: rgba(0, 0, 0, 0.08);
  --hover-bg-light: rgba(0, 0, 0, 0.12);
  --border-color: rgba(0, 0, 0, 0.12);
  --border-color-light: rgba(0, 0, 0, 0.18);
  --text-primary: #1f2937;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  --text-subtle: #9ca3af;
}

/* Dark Theme (explicit) */
.theme-dark {
  --primary-bg: #050505;
  --secondary-bg: #080808;
  --tertiary-bg: #0d0d0d;
  --card-bg: linear-gradient(145deg, #0a0a0a 0%, #0d0d0d 100%);
  --card-bg-solid: #0a0a0a;
  --card-bg-elevated: linear-gradient(145deg, #0d0d0d 0%, #111111 100%);
  --card-bg-elevated-solid: #0d0d0d;
  --navbar-bg: rgba(5, 5, 5, 0.92);
  --navbar-border: rgba(255, 255, 255, 0.08);
  --auth-panel-bg: linear-gradient(155deg, rgba(12, 12, 12, 0.96) 0%, rgba(5, 5, 5, 0.88) 100%);
  --auth-panel-border: rgba(255, 255, 255, 0.12);
  --auth-panel-shadow: 0 38px 60px -22px rgba(0, 0, 0, 0.65);
  --auth-panel-glow: rgba(59, 130, 246, 0.28);
  --auth-input-bg: rgba(15, 15, 15, 0.85);
  --auth-input-border: rgba(255, 255, 255, 0.12);
  --auth-input-placeholder: rgba(226, 232, 240, 0.5);
  --auth-input-focus-bg: rgba(8, 8, 8, 0.95);
  --auth-toggle-color: rgba(255, 255, 255, 0.7);
  --bg-gradient: radial-gradient(ellipse at top, #050505 0%, #000000 100%);
  --hover-bg: rgba(255, 255, 255, 0.03);
  --hover-bg-light: rgba(255, 255, 255, 0.06);
  --border-color: rgba(255, 255, 255, 0.05);
  --border-color-light: rgba(255, 255, 255, 0.08);
  --text-primary: #ffffff;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --text-subtle: #6b7280;
}

/* Auto Theme (follows system preference) */
@media (prefers-color-scheme: light) {
  .theme-auto, .theme-auto.auto-light {
    --primary-bg: #ffffff;
    --secondary-bg: #f8fafc;
    --tertiary-bg: #f1f5f9;
    --card-bg: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    --card-bg-solid: #ffffff;
    --card-bg-elevated: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
    --card-bg-elevated-solid: #f8fafc;
  --auth-panel-bg: linear-gradient(160deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.92) 100%);
  --auth-panel-border: rgba(15, 23, 42, 0.12);
  --auth-panel-shadow: 0 32px 60px -24px rgba(15, 23, 42, 0.28);
  --auth-panel-glow: rgba(59, 130, 246, 0.18);
  --auth-input-bg: rgba(255, 255, 255, 0.92);
  --auth-input-border: rgba(15, 23, 42, 0.12);
  --auth-input-placeholder: rgba(71, 85, 105, 0.65);
  --auth-input-focus-bg: rgba(255, 255, 255, 1);
  --auth-toggle-color: rgba(71, 85, 105, 0.85);
  --navbar-bg: rgba(255, 255, 255, 0.95);
  --navbar-border: rgba(0, 0, 0, 0.06);
    --bg-gradient: radial-gradient(ellipse at top, #f8fafc 0%, #ffffff 100%);
    --hover-bg: rgba(0, 0, 0, 0.08);
    --hover-bg-light: rgba(0, 0, 0, 0.12);
    --border-color: rgba(0, 0, 0, 0.12);
    --border-color-light: rgba(0, 0, 0, 0.18);
    --text-primary: #1f2937;
    --text-secondary: #374151;
    --text-muted: #6b7280;
    --text-subtle: #9ca3af;
  }
}

@media (prefers-color-scheme: dark) {
  .theme-auto, .theme-auto.auto-dark {
    --primary-bg: #050505;
    --secondary-bg: #080808;
    --tertiary-bg: #0d0d0d;
    --card-bg: linear-gradient(145deg, #0a0a0a 0%, #0d0d0d 100%);
    --card-bg-solid: #0a0a0a;
    --card-bg-elevated: linear-gradient(145deg, #0d0d0d 0%, #111111 100%);
    --card-bg-elevated-solid: #0d0d0d;
  --auth-panel-bg: linear-gradient(155deg, rgba(12, 12, 12, 0.96) 0%, rgba(5, 5, 5, 0.88) 100%);
  --auth-panel-border: rgba(255, 255, 255, 0.12);
  --auth-panel-shadow: 0 38px 60px -22px rgba(0, 0, 0, 0.65);
  --auth-panel-glow: rgba(59, 130, 246, 0.28);
  --auth-input-bg: rgba(15, 15, 15, 0.85);
  --auth-input-border: rgba(255, 255, 255, 0.12);
  --auth-input-placeholder: rgba(226, 232, 240, 0.5);
  --auth-input-focus-bg: rgba(8, 8, 8, 0.95);
  --auth-toggle-color: rgba(255, 255, 255, 0.7);
  --navbar-bg: rgba(5, 5, 5, 0.92);
  --navbar-border: rgba(255, 255, 255, 0.08);
    --bg-gradient: radial-gradient(ellipse at top, #050505 0%, #000000 100%);
    --hover-bg: rgba(255, 255, 255, 0.03);
    --hover-bg-light: rgba(255, 255, 255, 0.06);
    --border-color: rgba(255, 255, 255, 0.05);
    --border-color-light: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --text-subtle: #6b7280;
  }
}

/* Global reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html {
  transition: background-color 0.3s ease, color 0.3s ease;
}

.hidden {
  display: none !important;
}

body {
  background: var(--primary-bg);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.65;
  font-weight: 400;
  overflow-x: hidden;
  min-height: 100vh;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
  transition: background 0.3s ease, color 0.3s ease;
}

body.moderation-locked {
  overflow: hidden;
}

/* Utility class for content that needs to be below the navigation bar */
.page-content {
  padding-top: 68px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Panel backdrop overlay */
body.panel-open::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

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

/* ===== NAVIGATION BAR ===== */
.bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: var(--navbar-bg);
  backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--navbar-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-xl);
  z-index: 1000;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-lg);
}

.bar ul {
  display: flex;
  list-style: none;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  justify-content: space-between;
}

/* Logo section - groups image and text together */
.bar .logo-section {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.bar .logo-section:hover .logoImg {
  transform: scale(1.05);
  opacity: 0.8;
}

.bar .logo-section:hover .logo {
  color: var(--accent-blue);
  transform: translateY(-1px);
}

.bar .logoImg {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.bar .logoImg:hover {
  transform: scale(1.05);
  opacity: 0.8;
}

.bar .logo,
.bar h1 {
  color: var(--text-primary);
  font-size: 1.375rem;
  font-weight: 600;
  text-decoration: none;
  margin: 0;
  letter-spacing: -0.01em;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.bar .logo:hover,
.bar h1:hover {
  color: var(--accent-blue);
  transform: translateY(-1px);
}

.bar .buttons {
  display: none; /* Hide old navigation buttons */
}

.bar .buttons a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
  position: relative;
  border: 1px solid transparent;
}

.bar .buttons a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.bar .buttons a h1 {
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
}

.bar .buttons #adminPanelButton {
  display: none;
}

#adminPanelButton {
  display: none; /* Hidden by default, shown via JavaScript for admins */
}

#adminPanelButton svg {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0;
}

#moderationHubButton {
  display: none;
}

#supportPanelButton {
  display: none;
}

/* ===== DYNAMIC NAVIGATION CONTROLS ===== */
.nav-controls {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  background: var(--hover-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  backdrop-filter: blur(8px);
}

.nav-icon-btn:hover {
  background: var(--hover-bg-light);
  border-color: var(--border-color-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Search Container */
.nav-search-container {
  position: relative;
}

.nav-search-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 350px;
  background: var(--card-bg-elevated-solid);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xl);
  z-index: 1001;
}

.nav-search-panel.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.search-options {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.search-type-btn {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  background: var(--hover-bg);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.search-type-btn.active,
.search-type-btn:hover {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: white;
}

#navSearchInput {
  width: 100%;
  padding: var(--space-md);
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: var(--space-md);
  transition: all var(--transition-fast);
  box-sizing: border-box;
}

#navSearchInput:focus {
  outline: none;
  border-color: var(--accent-blue);
  background: var(--hover-bg);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#navSearchInput::placeholder {
  color: var(--text-muted);
}

.nav-search-results {
  max-height: 300px;
  overflow-y: auto;
}

.search-result-item {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  border-bottom: 1px solid var(--border-color);
}

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

.search-result-item:hover {
  background: var(--hover-bg);
  transform: translateX(4px);
}

.search-result-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.search-result-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.search-result-content {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.search-loading,
.search-no-results,
.search-error {
  text-align: center;
  padding: var(--space-lg);
  color: var(--text-muted);
  font-size: 14px;
}

.search-error {
  color: var(--danger-color);
}

/* Menu Container */
.nav-menu-container {
  position: relative;
}

.nav-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: var(--card-bg-elevated-solid);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xl);
  z-index: 1001;
}

.nav-menu-panel.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.nav-menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  color: var(--text-primary);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all var(--transition-fast);
  margin-bottom: var(--space-xs);
}

.nav-menu-item:last-child {
  margin-bottom: 0;
}

.nav-menu-item:hover {
  background: var(--hover-bg);
  color: var(--accent-blue);
  transform: translateX(4px);
}

.nav-menu-item.logout:hover {
  background: rgba(218, 54, 51, 0.1);
  color: var(--error-red);
}

.nav-menu-item svg {
  transition: all var(--transition-fast);
}

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

/* ===== LOGIN/SIGNUP PANELS ===== */
.panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 420px;
  max-width: 90vw;
  background: var(--auth-panel-bg);
  padding: clamp(0.6rem, 1.5vw, 1rem) clamp(1rem, 2vw, 1.4rem) clamp(1.6rem, 3vw, 1.8rem);
  border-radius: 26px;
  padding: 2.5rem 2.25rem;
  display: none;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--auth-panel-shadow);
  z-index: 1001;
  backdrop-filter: blur(28px) saturate(180%);
  padding: 0.5rem 0.9rem;
  margin-bottom: 0.15rem;
}

.panel::before,
.panel::after {
  content: '';
  line-height: 1.38;
  pointer-events: none;
  z-index: 0;
}

.panel::before {
  inset: -40% 35% 55% -35%;
  background: radial-gradient(circle at top, var(--auth-panel-glow) 0%, transparent 60%);
}

.panel::after {
  inset: 45% -40% -25% 50%;
  background: radial-gradient(circle at bottom right, rgba(139, 92, 246, 0.22) 0%, transparent 65%);
}

.panel > * {
  position: relative;
  z-index: 1;
}

.panel h1 {
  font-size: 2.1rem;
  font-weight: 700;
  text-align: center;
  margin: 0;
  color: var(--text-primary);
  letter-spacing: -0.025em;
}

/* ===== MODERATION OVERLAY ===== */
.moderation-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20000;
  pointer-events: none;
}

.moderation-overlay.hidden {
  display: none;
}

.moderation-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

.moderation-overlay__panel {
  position: relative;
  max-width: 520px;
  width: min(90vw, 520px);
  background: var(--card-bg-solid);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  padding: var(--space-2xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  text-align: center;
  pointer-events: auto;
  box-shadow: 0 45px 80px -40px rgba(0, 0, 0, 0.65);
}

.moderation-overlay__icon {
  font-size: 2.75rem;
}

.moderation-overlay__title {
  font-size: 1.85rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.moderation-overlay__description {
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.moderation-overlay__meta-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  text-align: left;
}

.moderation-overlay__meta-list .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: block;
}

.moderation-overlay__meta-list .value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.moderation-overlay__countdown {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  color: var(--accent-blue);
  letter-spacing: 0.04em;
}

.moderation-overlay__countdown.active {
  border-top: 1px dashed rgba(148, 163, 184, 0.25);
  padding-top: var(--space-md);
}

.moderation-overlay__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.moderation-overlay__button {
  border: none;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.moderation-overlay__button.primary {
  background: linear-gradient(135deg, var(--accent-blue) 0%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 12px 25px rgba(59, 130, 246, 0.35);
}

.moderation-overlay__button.secondary {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.moderation-overlay__button:active {
  transform: translateY(0);
}

.moderation-overlay__error {
  color: var(--error-red, #f97373);
  font-size: 0.9rem;
  margin: 0;
}

.panel-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
}

.panel-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--purple-accent) 100%);
  box-shadow: 0 18px 36px rgba(59, 130, 246, 0.28);
}

.panel-icon.panel-icon-secondary {
  background: linear-gradient(135deg, var(--purple-accent) 0%, #1d4ed8 100%);
  box-shadow: 0 18px 36px rgba(124, 58, 237, 0.28);
}

.panel-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 18rem;
  margin: 0 auto;
  line-height: 1.6;
}

.panel-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-divider::before,
.panel-divider::after {
  content: '';
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent 0%, rgba(148, 163, 184, 0.25) 50%, transparent 100%);
}

.panel-divider span {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.panel-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.25rem;
}

.panel-toggle-text {
  font-size: 0.92rem;
  color: var(--auth-toggle-color);
}

.panel .status {
  color: var(--error-red);
  font-size: 0.875rem;
  text-align: center;
  margin-bottom: var(--space-md);
  min-height: 1.2rem;
  padding: 0.5rem;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  font-weight: 500;
}

.panel form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  width: 100%;
}

/* Google login button */
.google-login-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-top: 1rem;
}

.google-login-container a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: 1rem 1.25rem;
  background: var(--auth-input-bg);
  color: var(--text-primary);
  border-radius: 14px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--auth-input-border);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.28);
}

.google-login-container a:hover {
  background: var(--auth-input-focus-bg);
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.3);
}

.google-login-container img {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.google-login-container span {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0;
  color: var(--text-primary);
}

/* Input styles */
.inputText {
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--auth-input-bg);
  border: 1px solid var(--auth-input-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 400;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.inputText:focus {
  outline: none;
  border-color: var(--accent-blue);
  background: var(--auth-input-focus-bg);
  box-shadow: 
    0 0 0 3px rgba(59, 130, 246, 0.1),
    0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.inputText::placeholder {
  color: var(--auth-input-placeholder);
  font-weight: 400;
}

.inputSubmit {
  width: 100%;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--accent-blue) 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 4px 12px rgba(59, 130, 246, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.1);
}

.inputSubmit:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-1px);
  box-shadow: 
    0 6px 18px rgba(59, 130, 246, 0.3),
    0 2px 6px rgba(0, 0, 0, 0.1);
}

.inputSubmit:active {
  transform: translateY(-1px);
  box-shadow: 
    0 4px 12px rgba(59, 130, 246, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.1);
}

.otherInput {
  background: none;
  border: none;
  color: var(--auth-toggle-color);
  text-decoration: none;
  cursor: pointer;
  font-size: 1rem;
  text-align: center;
  padding: 0.65rem 1rem;
  margin-top: 0.15rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
  position: relative;
}

.otherInput:hover {
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.08);
  transform: translateY(-1px);
}

.otherInput::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--accent-blue);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
}

.panel-toggle .otherInput {
  font-weight: 600;
}

.otherInput:hover::after {
  width: 100%;
}

/* ===== POST CREATION PANEL ===== */
.postPanel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  max-width: 90vw;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  display: none;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  z-index: 1001;
}

.postPanel h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.postPanel form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.postPanel .titleInput {
  padding: var(--space-md);
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.postPanel .titleInput:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.1);
}

.postPanel .bodyInput {
  min-height: 120px;
  padding: var(--space-md);
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  resize: vertical;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.postPanel .bodyInput:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.1);
}

.postPanel .imageUploading {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.postPanel .imageUploading button {
  padding: var(--space-md);
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.postPanel .imageUploading button:hover {
  background: var(--accent-blue-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.postPanel .postPanelButton {
  padding: var(--space-md);
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.postPanel .postPanelButton.secondary {
  background: var(--secondary-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.postPanel .postPanelButton:not(.secondary):hover {
  background: var(--accent-blue-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.postPanel .postPanelButton.secondary:hover {
  background: var(--hover-bg);
  box-shadow: var(--shadow-sm);
}

.gifControls {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-md) 0;
}

.gifPreview {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-secondary);
}

.gifPreview img {
  max-height: 80px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.postPanel #postPreview {
  padding: var(--space-md);
  background: var(--secondary-bg);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.875rem;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* ===== POSTS ===== */
.post {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);

.dm-attachment-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.35rem 0.35rem 0.1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.dm-attachment-preview[hidden] {
  display: none;
}

.dm-attachment-item {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dm-attachment-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dm-attachment-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.dm-attachment-remove:hover,
.dm-attachment-remove:focus-visible {
  background: rgba(244, 33, 46, 0.8);
}

.dm-attachment-status {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.2rem 0.35rem;
}

.message-content {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.message-attachments {
  display: grid;
  gap: 0.35rem;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.message-attachment {
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
}

.message-attachment img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
  margin-bottom: var(--space-xl);
  padding: var(--space-xl);
  width: 100%;
  max-width: 600px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.post:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.post .deleteButton {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: var(--space-xs);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.post .deleteButton:hover {
  color: var(--error-red);
  background: rgba(244, 33, 46, 0.1);
}

.post .postDetails,
.post .postCommentDetails {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.post .postDetails .pfp,
.post .postCommentDetails .pfp {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all var(--transition-fast);
}

.post .postDetails .pfp:hover {
  transform: scale(1.02);
  border-color: var(--accent-blue);
}

.post .postDetails .usernameTitle,
.post .postCommentDetails .usernameTitle {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  letter-spacing: -0.01em;
}

.post .postDetails .usernameTitle:hover {
  color: var(--accent-blue);
  transform: translateX(2px);
}

.post .postDetails .postTitle,
.post .postCommentDetails .postTitle {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  line-height: 1.4;
}

.post .postBody,
.postCommentBody {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  white-space: pre-wrap;
  word-wrap: break-word;
  letter-spacing: -0.01em;
}

.post .postBody a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.post .postBody a:hover {
  color: var(--accent-blue-hover);
  text-decoration: underline;
}

/* Post images */
.post-image-responsive {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: var(--space-sm) 0;
  display: block;
}

.post .buttonsDiv {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: var(--space-lg);
}

.post .buttonsDiv .postButton {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-lg);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.post .buttonsDiv .postButton:hover {
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
  background: rgba(29, 155, 240, 0.1);
}

.post .divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-md) 0;
}

.post .divider h2 {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ===== COMMENTS ===== */
.commentSection {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-color);
}

.comment {
  background: var(--secondary-bg);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
  position: relative;
}

.comment:hover {
  border-color: var(--border-color-light);
  background: var(--card-bg);
}

.commentButtons {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-color);
  margin-top: var(--space-md);
}

.commentButtons .postButton {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  position: relative;
}

.commentButtons .postButton:hover {
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

.commentButtons .postButton:nth-child(2):hover {
  color: var(--success-green);
  background: rgba(16, 185, 129, 0.1);
}

.comment .deleteButton {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: var(--error-red);
  border: none;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  opacity: 0;
  transform: scale(0.8);
}

.comment:hover .deleteButton {
  opacity: 1;
  transform: scale(1);
}

.comment .deleteButton:hover {
  background: var(--error-red-hover);
  transform: scale(1.02);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.commentSection .commentInputDiv {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.commentSection .commentTextBox {
  flex: 1;
  padding: var(--space-md);
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  resize: none;
  min-height: 40px;
}

.commentSection .commentTextBox:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.1);
}

.commentSection .commentButton {
  padding: var(--space-sm) var(--space-lg);
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  align-self: flex-end;
  margin-top: var(--space-xs);
}

.commentSection .commentButton:hover {
  background: var(--accent-blue-hover);
}

.commentGifControls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  color: var(--text-secondary);
  width: 100%;
}

.commentGifControls.has-selection {
  color: var(--text-primary);
}

.commentGifButton {
  padding: var(--space-xs) var(--space-md);
  background: var(--secondary-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.commentGifButton:hover {
  background: var(--hover-bg);
  box-shadow: var(--shadow-sm);
}

.commentGifPreview {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
}

.commentGifPreview img {
  max-height: 72px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.commentGifRemove {
  padding: var(--space-xs) var(--space-sm);
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.commentGifRemove:hover {
  color: var(--error-red);
  border-color: var(--error-red);
}

/* ===== NOTIFICATIONS PANEL ===== */
.notificationsPanel {
  position: fixed;
  top: 70px;
  right: var(--space-xl);
  width: 360px;
  max-height: 500px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  overflow: hidden;
  display: none;
}

.notificationsPanelHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-color);
  background: var(--card-bg-elevated);
}

.notificationsPanelHeader h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.closeNotificationsBtn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--space-xs);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.closeNotificationsBtn:hover {
  color: var(--text-primary);
  background: var(--hover-bg);
}

.notificationsList {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 400px;
  overflow-y: auto;
}

.notificationsList li {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-fast);
  cursor: pointer;
}

.notificationsList li:hover {
  background: var(--hover-bg-light);
}

.notificationsList li:last-child {
  border-bottom: none;
}

.notificationsList li .notificationContent {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
}

.notificationsList li .notificationTime {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: var(--space-xs);
}

/* ===== PROFILE PANEL ===== */
.profilePanel {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  width: 100%;
  max-width: 600px;
}

.profilePanel .profileInfo {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.profilePanel .profileInfo img {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 3px solid var(--border-color);
}

.profilePanel .profileInfo .profileUser {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.profilePanel .profileInfo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  display: inline;
}

.profilePanel .profileInfo .profileUser h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  display: inline;
}

.profilePanel .profileInfo .profileUser #accountnumber {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-muted);
}

.profilePanel .profileInfo a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
}

.profilePanel .profileInfo a:hover {
  color: var(--accent-blue);
  text-decoration: underline;
}

.profilePanel .profileBio {
  margin-bottom: var(--space-xl);
}

.profilePanel .profileBio p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-wrap: break-word;
}

.profilePanel .profileStats {
  display: flex;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
  align-items: center;
}

.profilePanel .profileStats h1 {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 0;
}

.profilePanel .profileStats a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
}

.profilePanel .profileStats a:hover {
  color: var(--accent-blue);
  text-decoration: underline;
}

.profilePanel .profileStats .profileEditButton,
.profileFollowButton {
  margin-left: auto;
  padding: var(--space-sm) var(--space-lg);
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.profilePanel .profileStats .profileEditButton:hover,
.profileFollowButton:hover {
  background: var(--accent-blue-hover);
}

.profilePanel .selectionDiv {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: var(--space-lg);
}

.profilePanel .profileButton {
  flex: 1;
  padding: var(--space-md);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}

.profilePanel .profileButton:hover,
.profilePanel .profileButton.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent-blue);
}

.profilePosts {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  width: 100%;
  max-width: 600px;
  align-self: center;
}

#profileReposts {
  display: none;
}

/* ===== FOLLOWING/FOLLOWERS ===== */
.followingPanel {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  transition: all var(--transition-fast);
}

.followingPanel:hover {
  border-color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}

.followingPanel .pfp {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--border-color);
}

.followingPanel h1 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.followingPanel h1:hover {
  color: var(--accent-blue);
}

.followingPanel .followingButton {
  margin-left: auto;
  padding: var(--space-sm) var(--space-md);
  background: none;
  border: 1px solid var(--accent-blue);
  color: var(--accent-blue);
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.followingPanel .followingButton:hover {
  background: var(--accent-blue);
  color: white;
}

/* Clickable profile elements */
.clickable-profile {
  cursor: pointer;
  transition: all var(--transition-fast);
}

.clickable-profile:hover {
  color: var(--accent-blue);
  transform: translateX(2px);
}

/* Remove follower button */
.removeFollowerButton {
  margin-left: auto;
  padding: var(--space-sm) var(--space-md);
  background: none;
  border: 1px solid var(--danger-color);
  color: var(--danger-color);
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.875rem;
}

.removeFollowerButton:hover {
  background: var(--danger-color);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(218, 54, 51, 0.3);
}

/* ===== HOME PANEL ===== */
.homePanel {
  position: relative;
  top: 68px;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
  min-height: calc(100vh - 68px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 120px;
}

/* Ensure all child elements in homePanel are properly sized */
.homePanel > * {
  width: 100%;
  max-width: 600px;
}

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

/* Removed duplicate notifications panel styles - using the improved version above */

#notificationsPanel::-webkit-scrollbar {
  display: none;
}

#notificationsPanel li {
  list-style: none;
  padding: var(--space-md);
  background: var(--secondary-bg);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  font-size: 0.875rem;
  color: var(--text-primary);
}

#notificationsPanel li button {
  background: none;
  border: none;
  color: var(--accent-blue);
  cursor: pointer;
  text-decoration: underline;
  font-size: inherit;
}

/* ===== ADMIN PANEL ===== */
.adminPanel {
  position: relative;
  top: 60px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: var(--space-lg);
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

.adminDiv {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
  width: 100%;
}

.adminDiv .textAndButton {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.adminDiv .adminTextBox {
  padding: var(--space-sm);
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
}

.adminDiv .adminButton {
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.adminDiv .adminButton:hover {
  background: var(--hover-bg);
  border-color: var(--border-color-light);
}

.adminDiv .buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

.adminDiv .spaceDiv {
  width: 100%;
  height: 1px;
  background: var(--border-color);
  margin: var(--space-lg) 0;
}

/* ===== MODERN ADMIN PANEL ===== */
.modernAdminPanel {
  min-height: 100vh;
  background: radial-gradient(circle at top, #161616 0%, #0d0d0d 45%, #050505 100%);
  color: var(--text-primary);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Hide the main navigation bar on admin panel */
.modernAdminPanel ~ .bar {
  display: none;
}

body:has(.modernAdminPanel) .bar {
  display: none;
}

.adminHeader {
  background: rgba(8, 8, 8, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.adminHeaderLeft {
  display: flex;
  align-items: center;
  gap: 20px;
}

.backHomeBtn {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.backHomeBtn:hover {
  background: var(--hover-bg);
  border-color: var(--border-color-light);
  transform: translateY(-1px);
}

.adminHeader h1 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.adminUserInfo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
}

.roleBadge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.roleBadge.admin {
  background: linear-gradient(45deg, #f85149, #ff6b6b);
  color: white;
}

.roleBadge.headAdmin {
  background: linear-gradient(45deg, #ffd700, #ffed4e);
  color: #000;
}

.roleBadge.moderator {
  background: linear-gradient(45deg, #22c55e, #16a34a);
  color: #0f172a;
}

.roleBadge.user {
  background: rgba(148, 163, 184, 0.25);
  color: var(--text-primary);
}

.adminTabs {
  background: rgba(12, 12, 12, 0.82);
  padding: 0 30px;
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===== MODERATION HUB ===== */
.moderationContent {
  display: flex;
  gap: var(--space-2xl);
  padding: var(--space-2xl);
  align-items: flex-start;
}

.moderationSearch {
  width: min(360px, 30vw);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.moderationSearchResults {
  background: rgba(10, 10, 10, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  min-height: 320px;
  max-height: 60vh;
  overflow-y: auto;
}

.moderationSearchResults .resultItem {
  background: rgba(18, 18, 18, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: var(--space-md);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.moderationSearchResults .resultItem:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.moderationSearchResults .resultTitle {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

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

.moderationDetails {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

.moderationFeedback {
  padding: var(--space-md) var(--space-lg);
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-secondary);
  font-weight: 500;
}

.moderationFeedback.success {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.15);
  color: #bbf7d0;
}

.moderationFeedback.error {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
}

.moderation-card {
  background: rgba(16, 16, 16, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  box-shadow: var(--shadow-lg);
}

.moderation-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  justify-content: space-between;
}

.moderation-card__description {
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge-warning {
  background: linear-gradient(135deg, #facc15, #eab308);
  color: #1f1f1f;
}

.badge-ban {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.moderationActionBtn {
  align-self: flex-start;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent-blue), #2563eb);
  color: white;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.4);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.moderationActionBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(37, 99, 235, 0.45);
}

.moderationActionBtn.danger {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.4);
}

.moderationActionBtn.danger:hover {
  box-shadow: 0 18px 32px rgba(220, 38, 38, 0.48);
}

.moderationActionBtn.disabled,
.moderationActionBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.moderationHint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.moderation-user-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.moderation-user-main {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.moderation-username {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.moderation-user-meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.moderation-user-status {
  display: grid;
  gap: var(--space-sm);
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  font-size: 0.95rem;
}

.moderation-user-notes {
  margin-top: var(--space-sm);
}

.moderationEmpty {
  color: var(--text-secondary);
  text-align: center;
  font-style: italic;
}

.moderation-actions {
  display: grid;
  gap: var(--space-2xl);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.moderation-history {
  display: grid;
  gap: var(--space-2xl);
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.historyList {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-height: 260px;
  overflow-y: auto;
}

.historyItem {
  background: rgba(14, 14, 14, 0.85);
  border-radius: 12px;
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.historyItem .historyHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.historyItem .historyReason {
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

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

.historyActions {
  margin-top: var(--space-sm);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
}

.historyLiftBtn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.historyLiftBtn:hover {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.28);
}

.historyRemoveBtn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-primary);
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.historyRemoveBtn:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.3);
}

.moderationDetails textarea {
  width: 100%;
  min-height: 100px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: var(--text-primary);
  padding: var(--space-md);
  resize: vertical;
  font-size: 1rem;
}

.moderationDetails textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.banDuration {
  display: grid;
  gap: var(--space-sm);
  grid-template-columns: 1fr;
  text-align: left;
}

.banDuration label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.banDuration select,
.banDuration input {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 0.75rem;
  font-size: 1rem;
}

.banDuration input.hidden {
  display: none;
}

.adminTab {
  padding: 15px 25px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  position: relative;
}

.adminTab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.adminTab.active {
  color: var(--text-primary);
  border-bottom-color: var(--text-primary);
  background: var(--hover-bg);
}

.adminContent {
  padding: 30px;
  max-width: 1400px;
  margin: 0 auto;
}

.adminTabContent {
  display: none;
}

.adminTabContent.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

@keyframes modalSlideIn {
  from { 
    opacity: 0; 
    transform: scale(0.95) translateY(-20px); 
  }
  to { 
    opacity: 1; 
    transform: scale(1) translateY(0); 
  }
}

@keyframes modalSlideOut {
  from { 
    opacity: 1; 
    transform: scale(1) translateY(0); 
  }
  to { 
    opacity: 0; 
    transform: scale(0.95) translateY(-20px); 
  }
}

.modal.modal-show .modalContent {
  animation: modalSlideIn 0.3s ease-out forwards;
}

.modal:not(.modal-show) .modalContent {
  animation: modalSlideOut 0.3s ease-in forwards;
}

.adminSearch {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.adminSearch input {
  flex: 1;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
}

.adminSearch input:focus {
  outline: none;
  border-color: var(--border-color-light);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.adminSearch button {
  padding: 12px 20px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  white-space: nowrap;
}

.adminSearch button:hover {
  transform: scale(1.05);
  background: var(--hover-bg);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.adminActions {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.ticketFilters {
  align-items: flex-end;
}

.ticketFilters .filterControl {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
}

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

.ticketFilters select {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.ticketFilters select:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.actionBtn {
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.actionBtn:hover {
  transform: translateY(-2px);
}

.actionBtn:not(.secondary):not(.danger):not(.grant):not(.revoke) {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.actionBtn.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.actionBtn.danger {
  background: linear-gradient(45deg, #da3633, #f85149);
  color: white;
}

.actionBtn.grant {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.actionBtn.revoke {
  background: linear-gradient(45deg, #f85149, #ff6b6b);
  color: white;
}

.resultsContainer {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
}

.resultItem {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.3s ease;
}

.resultItem:hover {
  background: rgba(255, 255, 255, 0.05);
}

.resultItem:last-child {
  border-bottom: none;
}

.resultHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.resultTitle {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1.1rem;
}

.resultActions {
  display: flex;
  gap: 10px;
}

.resultActions button {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.editBtn {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.deleteBtn {
  background: #da3633;
  color: white;
}

.resultDetails {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.resultField {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fieldLabel {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fieldValue {
  color: var(--text-muted);
  word-break: break-all;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 9999;
  animation: fadeIn 0.3s ease;
  justify-content: center;
  align-items: center;
}

.modal[style*="block"] {
  display: flex !important;
}

.modalContent {
  position: relative;
  background: linear-gradient(135deg, #21262d, #30363d);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  min-width: 500px;
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  transform: scale(0.95);
  animation: modalSlideIn 0.3s ease forwards;
}

.modalHeader {
  padding: 20px 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
}

.modalHeader h3 {
  margin: 0;
  color: var(--text-primary);
}

.closeBtn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.closeBtn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.modalBody {
  padding: 25px;
  max-height: 60vh;
  overflow-y: auto;
}

.modalFooter {
  padding: 20px 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  background: rgba(255, 255, 255, 0.02);
}

.modalFooter .actionBtn {
  min-width: 120px;
  font-weight: 600;
}

.editForm {
  display: grid;
  gap: 20px;
}

.formGroup {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.formGroup label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.formGroup input,
.formGroup textarea,
.formGroup select {
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.formGroup input:focus,
.formGroup textarea:focus,
.formGroup select:focus {
  outline: none;
  border-color: var(--border-color-light);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

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

.formGroup select {
  cursor: pointer;
}

.permissionsSection {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 25px;
}

.permissionsSection h3 {
  margin-top: 0;
  color: var(--text-primary);
  text-align: center;
}

.permissionControls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 25px;
}

.permissionGroup {
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.permissionGroup h4 {
  margin-top: 0;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.permissionGroup input {
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--text-primary);
  margin-bottom: 15px;
}

/* ===== MESSAGING ===== */
body.dm-page {
  background: radial-gradient(150% 140% at 50% -20%, rgba(59, 130, 246, 0.18) 0%, rgba(10, 10, 10, 0.95) 55%)
    var(--primary-bg);
  min-height: 100vh;
  overflow: hidden;
}

.dm {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(720px, 100%);
  height: calc(100vh - 68px);
  margin: 68px auto 0;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  backdrop-filter: blur(16px);
}

.dmTop {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: clamp(1rem, 2vw, 1.5rem);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0) 100%);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(12px);
}

.dmTop-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.dmTop-back:hover,
.dmTop-back:focus-visible {
  color: var(--accent-blue);
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.08);
}

.dmTop-back span {
  font-size: 1.25rem;
  line-height: 1;
}

.dmTop #profileImage {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.dmTop #profileImage:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: var(--accent-blue);
}

.dmTop-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.dmTop-details h1 {
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

#profileMeta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.dmTop-action {
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.dmTop-action:hover,
.dmTop-action:focus-visible {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.08);
}

#messagePanel {
  position: relative;
  top: 0;
  margin: 0;
  width: 100%;
  max-width: none;
  flex: 1;
  min-height: 0;
  padding: clamp(0.65rem, 1.6vw, 1.05rem) clamp(1.1rem, 2.2vw, 1.55rem);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.015) 0%, rgba(255, 255, 255, 0) 65%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  overflow-y: auto;
  scroll-behavior: smooth;
  scroll-padding-bottom: 6rem;
}

#messagePanel::-webkit-scrollbar {
  width: 6px;
}

#messagePanel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-full);
}

.inputContainer {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  gap: var(--space-md);
  padding: clamp(1rem, 2vw, 1.4rem);
  background: rgba(10, 10, 10, 0.86);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  margin-top: auto;
  z-index: 4;
}

.composerIconButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.composerIconButton svg {
  width: 22px;
  height: 22px;
}

.composerIconButton:hover,
.composerIconButton:focus-visible,
.composerIconButton.active {
  border-color: rgba(59, 130, 246, 0.65);
  color: var(--accent-blue-light);
  background: rgba(59, 130, 246, 0.12);
}

.composerIconButton:disabled,
.composerIconButton.disabled {
  cursor: not-allowed;
  opacity: 0.55;
  filter: grayscale(0.25);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
}

.composerInputWrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.3rem;
  min-width: 0;
}

#messageInput {
  flex: 1;
  padding: 0.85rem 1.1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.5;
  resize: none;
  min-height: 48px;
  max-height: 200px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

#messageInput::placeholder {
  color: var(--text-muted);
}

#messageInput:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.65);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
  background: rgba(59, 130, 246, 0.08);
}

.dm-gif-preview {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem 0.4rem 0.4rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  max-width: 100%;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.dm-gif-preview[hidden] {
  display: none;
}

.dm-gif-preview img {
  max-height: 140px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.remove-gif {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: all var(--transition-fast);
}

.remove-gif:hover,
.remove-gif:focus-visible {
  background: rgba(244, 67, 54, 0.85);
  border-color: rgba(244, 67, 54, 0.95);
}

#sendButton {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius-full);
  border: none;
  background: var(--accent-blue);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

#sendButton svg {
  width: 1.25rem;
  height: 1.25rem;
}

#sendButton span {
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

#sendButton:hover,
#sendButton:focus-visible {
  background: var(--accent-blue-hover);
  box-shadow: 0 16px 30px rgba(59, 130, 246, 0.28);
  transform: translateY(-1px);
}

#sendButton:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.22);
}

@media (max-width: 900px) {
  .dm {
    width: min(680px, 100%);
  }
}

@media (max-width: 768px) {
  body.dm-page {
    background: var(--primary-bg);
  }

  .dm {
    margin: 68px 0 0;
    height: calc(100vh - 68px);
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  .dmTop {
    border-radius: 0;
  }

  .dmTop-action {
    display: none;
  }

  .inputContainer {
    padding-bottom: calc(clamp(1rem, 2vw, 1.4rem) + env(safe-area-inset-bottom));
  }
}

@media (max-width: 540px) {
  .dmTop-back {
    width: 38px;
    height: 38px;
  }

  #messagePanel {
    padding: 1rem var(--space-md) var(--space-lg);
  }

  #messageInput {
    font-size: 0.92rem;
  }

  #sendButton span {
    display: none;
  }

  #sendButton {
    padding: 0.85rem;
    border-radius: var(--radius-lg);
  }

  .message {
    max-width: 85%;
    font-size: 0.95rem;
    padding: 0.45rem 0.8rem;
  }
}


.message {
  padding: 0.52rem 0.9rem;
  margin-bottom: 0;
  border-radius: var(--radius-xl);
  max-width: min(72%, 460px);
  word-break: break-word;
  white-space: pre-wrap;
  font-size: 0.98rem;
  line-height: 1.4;
  position: relative;
  width: fit-content;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
}

.message.sent {
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-blue-hover) 100%);
  color: #fff;
  align-self: flex-end;
  margin-left: auto;
  border-bottom-right-radius: var(--radius-md);
  text-align: left;
}

.message.received {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  align-self: flex-start;
  margin-right: auto;
  border-bottom-left-radius: var(--radius-md);
  text-align: left;
}

/* Message spacing */
.message + .message {
  margin-top: 0.15rem;
}

.message.sent + .message.sent,
.message.received + .message.received {
  margin-top: 0.08rem;
}

.message.sent + .message.received,
.message.received + .message.sent {
  margin-top: 0.25rem;
}

.dm .message .message-content {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-start;
}

.dm .message.sent .message-content {
  align-items: flex-end;
}

.dm .message .message-text {
  display: inline-block;
  font-size: 0.98rem;
  line-height: 1.4;
  word-break: break-word;
}

.dm .message .message-gif img {
  display: block;
  width: 100%;
  height: auto;
  max-width: min(280px, 70vw);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.25);
}

.dm .message .message-gif {
  display: flex;
  justify-content: flex-start;
}

.dm .message.sent .message-gif {
  justify-content: flex-end;
}

/* Message deletion styles */
.message.sent {
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  position: relative;
}

.message.sent:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.message.sent:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* Delete confirmation modal */
.delete-confirmation-modal {
  animation: fadeIn 0.2s ease;
}

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

.delete-confirmation-modal > div {
  animation: slideIn 0.3s ease;
}

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

/* Loading state for messages being deleted */
.message.deleting {
  opacity: 0.5;
  pointer-events: none;
  filter: grayscale(50%);
}

/* Visual feedback for long press */
.message.long-pressing {
  opacity: 0.7;
  transform: scale(0.98);
  box-shadow: 0 0 0 2px var(--accent-blue);
}

/* DM Users */
.dmUser {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-md);
  transition: all var(--transition-fast);
}

.dmUser:hover {
  border-color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}

.dmUser .dmUserImage {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--border-color);
}

.dmUser .dmUserName {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.dmUser .dmUserName:hover {
  color: var(--accent-blue);
}

.dmUser .openDMButton {
  margin-left: auto;
  padding: var(--space-sm) var(--space-lg);
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dmUser .openDMButton:hover {
  background: var(--accent-blue-hover);
  transform: scale(1.02);
}

.dmUser .closeDMButton {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.125rem;
  cursor: pointer;
  padding: var(--space-xs);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.dmUser .closeDMButton:hover {
  color: var(--error-red);
  background: rgba(244, 33, 46, 0.1);
}

/* ===== SEARCH ===== */
.searchBar {
  position: relative;
  top: 80px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto var(--space-lg);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  display: flex;
  gap: var(--space-md);
}

.searchBar input {
  flex: 1;
  padding: var(--space-md);
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
}

.searchBar input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.1);
}

.searchBar button {
  padding: var(--space-md) var(--space-lg);
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.searchBar button:hover {
  background: var(--accent-blue-hover);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(29, 155, 240, 0.7);
  }
  70% {
    transform: scale(1.02);
    box-shadow: 0 0 0 10px rgba(29, 155, 240, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(29, 155, 240, 0);
  }
}

.searchPanel {
  position: relative;
  top: 80px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: var(--space-lg);
  min-height: calc(100vh - 160px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Search results user styling to match search bar width */
.searchPanel .dmUser {
  width: 100%;
  max-width: 552px; /* 600px - 48px padding (24px each side) */
  margin: 0 0 var(--space-md) 0;
}

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

.notFound {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.125rem;
  margin-top: var(--space-2xl);
}

/* ===== SETTINGS ===== */
.settingsPanel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  max-width: 90vw;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  z-index: 1001;
  box-shadow: var(--shadow-xl);
}

.settingsTitle {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xl);
}

.settingsPanel form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.settingsPanel .settingsInputs {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.settingsPanel .settingsInputs label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
}

.settingsPanel .settingsInputs input {
  padding: var(--space-sm);
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
}

.settingsPanel .settingsInputs button {
  padding: var(--space-sm) var(--space-md);
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.settingsPanel .settingsInputs button:hover {
  background: var(--accent-blue-hover);
}

/* ===== DONATION PANEL ===== */
.donationPanel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  max-width: 90vw;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  z-index: 1001;
  box-shadow: var(--shadow-xl);
  text-align: center;
}

.donationPanel h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
}

.donationPanel p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  line-height: 1.6;
}

.donationPanel form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.donationPanel .inputs {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  justify-content: center;
}

.donationPanel .inputs label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
}

.donationPanel .inputs input {
  width: 100px;
  padding: var(--space-sm);
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 1rem;
  text-align: center;
}

.donationPanel .inputs button {
  padding: var(--space-md) var(--space-xl);
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.donationPanel .inputs button:hover {
  background: var(--accent-blue-hover);
  transform: scale(1.02);
}

.donationPanel .stripeLogo {
  width: 60px;
  height: 25px;
  margin-top: var(--space-md);
  opacity: 0.7;
}

.donate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.125rem;
  margin-top: var(--space-2xl);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  :root {
    --space-xs: 0.125rem;
    --space-sm: 0.25rem;
    --space-md: 0.5rem;
    --space-lg: 1rem;
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
  }
  
  body {
    font-size: 14px;
  }

  .bar {
    height: 50px;
    padding: 0 var(--space-md);
  }

  .bar .logo {
    display: none;
  }

  .bar .buttons {
    gap: var(--space-sm);
  }

  .bar .buttons a {
    padding: var(--space-xs) var(--space-sm);
  }

  .bar .buttons a h1 {
    font-size: 0.875rem;
  }

  .homePanel {
    top: 50px;
    padding: var(--space-md);
    min-height: calc(100vh - 50px);
  }

  .post {
    padding: var(--space-md);
  }

  .panel {
    width: 92vw;
    padding: var(--space-xl) var(--space-lg);
    gap: var(--space-lg);
    border-radius: 22px;
  }

  .moderation-overlay__panel {
    width: min(92vw, 500px);
    padding: var(--space-xl);
  }

  .panel form {
    gap: var(--space-md);
  }

  .panel-heading h1 {
    font-size: 1.9rem;
  }

  .moderation-overlay__title {
    font-size: 1.6rem;
  }

  .moderation-overlay__description {
    font-size: 0.95rem;
  }

  .moderationContent {
    flex-direction: column;
  }

  .moderationSearch {
    width: 100%;
  }

  .moderationSearchResults {
    max-height: none;
  }

  .panel-subtitle {
    font-size: 0.9rem;
  }

  .postPanel {
    width: 90vw;
    padding: var(--space-lg);
  }

  .profilePanel {
    padding: var(--space-lg);
  }

  .profilePanel .profileInfo {
    flex-direction: column;
    text-align: center;
    gap: var(--space-md);
  }

  .profilePanel .profileStats {
    flex-wrap: wrap;
    gap: var(--space-md);
  }

  #notificationsPanel {
    display: none;
  }

  .searchBar {
    width: 90vw;
    margin-left: auto;
    margin-right: auto;
  }

  .searchPanel {
    width: 90vw;
    margin-left: auto;
    margin-right: auto;
    padding: var(--space-md);
  }

  #messagePanel,
  .dmTop,
  .inputContainer {
    width: 90vw;
  }

  .settingsPanel,
  .donationPanel {
    width: 90vw;
    padding: var(--space-lg);
  }

  .message {
    max-width: 85%;
  }

  .buttonsDiv {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .profileButton {
    font-size: 0.875rem;
    padding: var(--space-sm);
  }
}

@media (max-width: 480px) {
  .bar .buttons a h1 {
    font-size: 0.75rem;
  }

  .panel {
    padding: var(--space-lg);
    gap: var(--space-md);
  .adminSearch {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .adminSearch button {
    width: 100%;
  }
  }

  .panel-icon {
    width: 52px;
    height: 52px;
    font-size: 1.45rem;
  }

  .panel-heading h1 {
    font-size: 1.7rem;
  }

  .panel-subtitle {
    font-size: 0.85rem;
  }

  .post .postDetails .pfp,
  .post .postCommentDetails .pfp {
    width: 40px;
    height: 40px;
  }

  .followingPanel .pfp,
  .dmUser .dmUserImage {
    width: 40px;
    height: 40px;
  }

  .profilePanel .profileInfo img {
    width: 90px;
    height: 90px;
  }
}

/* ===== DARK MODE ENHANCEMENT ===== */
@media (prefers-color-scheme: dark) {
  /* Already optimized for dark mode */
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for accessibility */
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border-color: #666666;
    --text-secondary: #cccccc;
    --text-muted: #999999;
  }
}

/* Individual Post Page Styles */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--card-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  margin-bottom: var(--space-lg);
}

.back-btn:hover {
  background: var(--hover-bg);
  border-color: var(--border-color-light);
  color: var(--text-primary);
  text-decoration: none;
}

.back-btn:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

#postContainer {
  width: 100%;
  max-width: 600px;
  margin: 0;
  padding: 0;
}

#postContainer .post {
  margin-bottom: 0;
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 600px;
}

.error-message {
  text-align: center;
  color: var(--error-red);
  font-size: 1.125rem;
  font-weight: 500;
  padding: var(--space-2xl);
  background: var(--card-bg);
  border: 1px solid var(--error-red);
  border-radius: var(--radius-lg);
  margin: var(--space-lg) 0;
}

/* Long press visual feedback */
.post {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.post:active {
  transform: scale(0.995);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.14);
}

/* Print styles */
@media print {
  .bar,
  .buttonsDiv,
  #notificationsPanel,
  .back-btn {
    display: none !important;
  }
  
  .post {
    border: 1px solid #000;
    break-inside: avoid;
  }
}

/* ===== GIF PICKER OVERLAY ===== */
body.gif-picker-open {
  overflow: hidden;
}

.gif-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: var(--space-lg);
}

.gif-picker-modal {
  width: min(720px, 100%);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  max-height: 90vh;
  overflow: hidden;
}

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

.gif-picker-title {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.gif-picker-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition-fast);
}

.gif-picker-close:hover {
  color: var(--text-primary);
}

.gif-picker-search {
  display: flex;
  gap: var(--space-sm);
}

.gif-picker-search input {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--secondary-bg);
  color: var(--text-primary);
}

.gif-picker-search-btn,
.gif-picker-trending-btn {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.gif-picker-search-btn {
  background: var(--accent-blue);
  color: white;
}

.gif-picker-trending-btn {
  background: var(--secondary-bg);
  color: var(--text-primary);
}

.gif-picker-search-btn:hover,
.gif-picker-trending-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.gif-picker-status {
  min-height: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.gif-picker-status[data-tone="error"] {
  color: var(--error-red);
}

.gif-picker-status[data-tone="success"] {
  color: var(--success-green);
}

.gif-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-md);
  overflow-y: auto;
  padding-right: var(--space-sm);
}

.gif-picker-item {
  border: none;
  background: var(--secondary-bg);
  border-radius: var(--radius-lg);
  padding: var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.gif-picker-item img {
  max-width: 100%;
  border-radius: var(--radius-md);
  pointer-events: none;
}

.gif-picker-item:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: var(--shadow-md);
}

.gif-picker-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-secondary);
  padding: var(--space-xl);
}

@media (max-width: 640px) {
  .gif-picker-modal {
    padding: var(--space-lg);
  }

  .gif-picker-search {
    flex-direction: column;
  }

  .gif-picker-search-btn,
  .gif-picker-trending-btn {
    width: 100%;
  }
}

/* ===== MODERN SETTINGS PAGE STYLES ===== */
.settingsContainer {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-xl);
  min-height: calc(100vh - 68px);
  margin-top: 68px;
}

.settingsHeader {
  text-align: center;
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border-color);
}

.settingsHeader h1 {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--purple-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

.settingsHeader p {
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 400;
}

.settingsSection {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.settingsSection:hover {
  border-color: var(--border-color-light);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.sectionTitle {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.settingItem {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.settingToggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  user-select: none;
}

.settingToggle input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
}

.toggleSlider {
  position: relative;
  width: 48px;
  height: 26px;
  background: var(--border-color);
  border-radius: 999px;
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
}

.toggleSlider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: var(--card-bg);
  border-radius: 50%;
  transition: transform var(--transition-fast), background var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.settingToggle input:checked + .toggleSlider {
  background: var(--accent-blue);
  box-shadow: 0 0 0 4px rgba(29, 155, 240, 0.15);
}

.settingToggle input:checked + .toggleSlider::after {
  transform: translateX(22px);
}

.settingToggle input:focus-visible + .toggleSlider {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.toggleLabel {
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.settingToggle.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.settingToggle.disabled .toggleLabel {
  color: var(--text-muted);
}

.settingToggle input:disabled + .toggleSlider {
  cursor: not-allowed;
  background: var(--border-color);
}

.settingToggle input:disabled + .toggleSlider::after {
  background: var(--hover-bg);
}

/* Theme Selector Styles */
.themeSelector {
  display: flex;
  gap: var(--space-lg);
  margin-top: var(--space-md);
}

.themeOption {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: var(--text-primary);
}

.themeOption:hover {
  border-color: var(--accent-color);
  background: var(--accent-color-subtle);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.themeOption.active {
  border-color: var(--accent-color);
  background: var(--accent-color-subtle);
  box-shadow: var(--shadow-lg);
}

.themePreview {
  width: 60px;
  height: 40px;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color-light);
}

.themePreview.light {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.themePreview.dark {
  background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
}

.themePreview.auto {
  background: linear-gradient(135deg, #ffffff 0%, #ffffff 50%, #1a1a1a 50%, #0f0f0f 100%);
}

.themeOption span {
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
}

@media (max-width: 768px) {
  .themeSelector {
    flex-direction: column;
    gap: var(--space-md);
  }
  
  .themeOption {
    flex-direction: row;
    justify-content: flex-start;
    padding: var(--space-md);
  }
  
  .themePreview {
    width: 40px;
    height: 30px;
  }
}

.settingItem:hover {
  background: var(--hover-bg);
  border-color: var(--border-color);
}

.settingItem:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-lg);
}

.settingItemLeft {
  flex-shrink: 0;
}

.settingIcon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--card-bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border: 1px solid var(--border-color);
}

.settingItemRight {
  flex: 1;
}

.settingItemRight h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
  line-height: 1.4;
}

.settingItemRight p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: var(--space-md);
}

.settingButton {
  background: var(--card-bg-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.settingButton:hover {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.settingButton:active {
  transform: translateY(0);
}

/* Profile Picture Styles */
.profilePictureContainer {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profilePictureContainer:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.currentProfilePicture {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-full);
}

.profilePictureOverlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: var(--radius-full);
}

.profilePictureContainer:hover .profilePictureOverlay {
  opacity: 1;
}

.profilePictureOverlay span {
  color: white;
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
}

/* Danger Zone Styles */
.dangerZone {
  border-color: rgba(239, 68, 68, 0.2);
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.05) 0%, rgba(220, 38, 38, 0.03) 100%);
}

.dangerZone:hover {
  border-color: rgba(239, 68, 68, 0.3);
  box-shadow: 0 10px 25px rgba(239, 68, 68, 0.1);
}

.dangerIcon {
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
  border-color: rgba(239, 68, 68, 0.2);
}

.dangerButton {
  background: var(--error-red);
  border-color: var(--error-red);
  color: white;
}

.dangerButton:hover {
  background: var(--error-red-hover);
  border-color: var(--error-red-hover);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Modern Modal Styles */
.modernModal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modernModal.show {
  opacity: 1;
  visibility: visible;
}

.modalContent {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-xl);
}

.modernModal.show .modalContent {
  transform: scale(1) translateY(0);
}

.modalHeader {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.modalHeader h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.modalHeader p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.modalForm {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.formGroup {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.formLabel {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.formInput {
  background: var(--card-bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.formInput:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.formInput::placeholder {
  color: var(--text-subtle);
}

.formTextarea {
  background: var(--card-bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  color: var(--text-primary);
  font-size: 1rem;
  resize: vertical;
  min-height: 100px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
}

.formTextarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.characterCount {
  font-size: 0.8rem;
  color: var(--text-subtle);
  text-align: right;
}

.characterCount.warning {
  color: var(--warning-orange);
}

.characterCount.error {
  color: var(--error-red);
}

.modalActions {
  display: flex;
  gap: var(--space-md);
  justify-content: flex-end;
  margin-top: var(--space-lg);
}

.modalButton {
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.modalButton.primary {
  background: var(--accent-blue);
  color: white;
  border-color: var(--accent-blue);
}

.modalButton.primary:hover {
  background: var(--accent-blue-hover);
  border-color: var(--accent-blue-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.modalButton.secondary {
  background: var(--card-bg-elevated);
  color: var(--text-secondary);
  border-color: var(--border-color);
}

.modalButton.secondary:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

.modalButton.danger {
  background: var(--error-red);
  color: white;
  border-color: var(--error-red);
}

.modalButton.danger:hover {
  background: var(--error-red-hover);
  border-color: var(--error-red-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.modalButton:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Confirmation Modal Styles */
.confirmationModal .modalContent {
  max-width: 400px;
}

.confirmationInput {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

.confirmationInput:focus {
  border-color: var(--error-red);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  .settingsContainer {
    padding: var(--space-md);
    margin-top: 60px;
  }
  
  .settingItem {
    flex-direction: column;
    text-align: center;
    gap: var(--space-md);
  }
  
  .profilePictureContainer {
    width: 60px;
    height: 60px;
  }
  
  .modalContent {
    padding: var(--space-lg);
    max-width: 95%;
  }
  
  .modalActions {
    flex-direction: column;
  }
  
  .modalButton {
    width: 100%;
    justify-content: center;
  }
}

/* Poll Styles */
.poll-container {
  margin: 15px 0;
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--card-bg-solid);
  transition: all 0.2s ease;
}

.poll-question {
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.4;
}

.poll-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.poll-option {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  position: relative;
  background: var(--secondary-bg);
  transition: all 0.2s ease;
  overflow: hidden;
}

.poll-option:hover:not(.poll-option-voted) {
  border-color: var(--accent-blue);
  background: var(--hover-bg);
}

.poll-option-voted {
  border-color: var(--accent-blue);
  background: var(--card-bg-elevated-solid);
}

.poll-progress {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--accent-blue);
  opacity: 0.2;
  transition: width 0.3s ease;
  z-index: 1;
}

.poll-option-voted .poll-progress {
  opacity: 0.3;
}

.poll-option-content {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.poll-option-text {
  color: var(--text-primary);
  font-weight: 500;
  flex: 1;
}

.poll-option-stats {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-left: 10px;
}

.poll-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Poll creation styles */
.poll-option {
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  width: 100%;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.poll-option:focus {
  outline: none;
  border-color: var(--accent-blue);
}

#pollQuestion {
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  width: 100%;
  font-family: inherit;
  margin-bottom: 10px;
}

#pollQuestion:focus {
  outline: none;
  border-color: var(--accent-blue);
}

#pollDuration {
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}

#pollDuration:focus {
  outline: none;
  border-color: var(--accent-blue);
}

/* Enhanced Post Edit Interface */
.post-edit-container {
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-md) !important;
  padding: 12px !important;
  margin: 8px 0 !important;
}

.post-edit-container textarea {
  width: 100% !important;
  min-height: 80px !important;
  padding: 8px !important;
  margin: 0 0 8px 0 !important;
  background: var(--bg-primary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-primary) !important;
  font-family: inherit !important;
  font-size: 0.9rem !important;
  resize: vertical !important;
  box-sizing: border-box !important;
}

.post-edit-container textarea:focus {
  outline: none !important;
  border-color: var(--accent-blue) !important;
}

#editPreview {
  min-height: 40px !important;
  margin: 8px 0 !important;
  padding: 8px !important;
  background: var(--bg-primary) !important;
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--border-color) !important;
}

#editPreview .preview-label {
  color: var(--text-muted) !important;
  font-size: 0.75rem !important;
  margin-bottom: var(--space-xs) !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

#editPollSection {
  background: var(--bg-primary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-sm) !important;
  padding: 10px !important;
  margin: 8px 0 !important;
}

#editPollSection h3 {
  margin: 0 0 8px 0 !important;
  color: var(--text-primary) !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
}

#editPollSection input[type="text"] {
  width: 100% !important;
  padding: 6px !important;
  margin-bottom: 6px !important;
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-primary) !important;
  font-size: 0.9rem !important;
  box-sizing: border-box !important;
}

#editPollSection input[type="text"]:focus {
  outline: none !important;
  border-color: var(--accent-blue) !important;
}

#editPollSection select {
  padding: var(--space-xs) !important;
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-primary) !important;
  font-size: 0.9rem !important;
}

#editPollSection select:focus {
  outline: none !important;
  border-color: var(--accent-blue) !important;
}

.post-edit-container .button-group {
  display: flex !important;
  gap: 6px !important;
  margin: 10px 0 !important;
  flex-wrap: wrap !important;
}

.post-edit-container button {
  padding: 6px 10px !important;
  border: none !important;
  border-radius: var(--radius-sm) !important;
  cursor: pointer !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  transition: all var(--transition-fast) !important;
}

.post-edit-container .save-btn {
  background: var(--accent-green) !important;
  color: white !important;
}

.post-edit-container .save-btn:hover {
  background: #1e7e34 !important;
}

.post-edit-container .cancel-btn {
  background: var(--text-muted) !important;
  color: white !important;
}

.post-edit-container .cancel-btn:hover {
  background: #545b62 !important;
}

.post-edit-container .poll-btn {
  background: var(--accent-green) !important;
  color: white !important;
}

.post-edit-container .poll-btn:hover {
  background: #1e7e34 !important;
}

.post-edit-container .poll-btn.remove {
  background: #dc3545 !important;
}

.post-edit-container .poll-btn.remove:hover {
  background: #c82333 !important;
}

.post-edit-container .upload-btn {
  background: var(--accent-blue) !important;
  color: white !important;
}

.post-edit-container .upload-btn:hover {
  background: #0056b3 !important;
}

.post-edit-container .poll-option-btn {
  padding: var(--space-xs) !important;
  font-size: 0.8rem !important;
}

.post-edit-container .add-option-btn {
  background: var(--accent-blue) !important;
  color: white !important;
}

.post-edit-container .add-option-btn:hover {
  background: #0056b3 !important;
}

.post-edit-container .remove-option-btn {
  background: #dc3545 !important;
  color: white !important;
}

.post-edit-container .remove-option-btn:hover {
  background: #c82333 !important;
}

.post-edit-container .upload-result {
  margin-top: 4px !important;
  font-size: 0.8rem !important;
}

.post-edit-container .checkbox-label {
  display: flex !important;
  align-items: center !important;
  color: var(--text-primary) !important;
  font-size: 0.9rem !important;
  margin: 6px 0 !important;
}

.post-edit-container .checkbox-label input {
  margin-right: 6px !important;
}

.post-edit-container .duration-label {
  color: var(--text-primary) !important;
  font-size: 0.9rem !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 6px 0 !important;
}

/* What is The New World page styles */
.about-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
  padding: calc(68px + var(--space-2xl)) 0 var(--space-2xl) 0;
}

.about-logo {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-lg);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.2);
}

.about-title {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-blue), var(--purple-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  line-height: 1.2;
}

.about-content {
  max-width: 700px;
  margin: 0 auto var(--space-2xl);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.about-description {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 var(--space-2xl);
  text-align: justify;
}

.contact-section {
  border-top: 1px solid var(--border-color);
  padding-top: var(--space-xl);
}

.contact-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 var(--space-md);
}

.contact-description {
  color: var(--text-secondary);
  margin: 0 0 var(--space-lg);
  line-height: 1.6;
}

.contact-info {
  text-align: center;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-dark));
  color: white;
  text-decoration: none;
  border-radius: var(--radius-lg);
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.contact-email:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.4);
}

.about-actions {
  text-align: center;
}

.action-btn {
  padding: var(--space-md) var(--space-xl);
  background: var(--card-bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}

.action-btn:hover {
  background: var(--hover-bg);
  transform: translateY(-1px);
  border-color: var(--border-color-light);
}

.action-btn.primary {
  background: linear-gradient(135deg, var(--card-bg-elevated-solid), var(--secondary-bg));
}

@media (max-width: 768px) {
  .about-title {
    font-size: 2rem;
  }
  
  .about-content {
    margin: 0 var(--space-md) var(--space-2xl);
    padding: var(--space-xl);
  }
  
  .about-description {
    font-size: 1rem;
    text-align: left;
  }
}

/* 404 Not Found Page Styles */
.not-found-wrapper {
  position: relative;
  min-height: calc(100vh - 68px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(68px + var(--space-xl)) var(--space-xl) var(--space-xl);
  overflow: hidden;
  margin-top: 0;
}

.not-found-content {
  text-align: center;
  max-width: 600px;
  position: relative;
  z-index: 2;
}

/* Animated 404 Error Code */
.error-code {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

.error-code span {
  font-size: 8rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent-blue), var(--purple-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 4px 32px rgba(59, 130, 246, 0.3);
  animation: bounce 2s ease-in-out infinite;
}

.error-code .zero {
  animation-delay: 0.2s;
  transform: rotate(-5deg);
}

.error-code .four:last-child {
  animation-delay: 0.4s;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  40% {
    transform: translateY(-10px) rotate(2deg);
  }
  60% {
    transform: translateY(-5px) rotate(-1deg);
  }
}

/* Logo and Message Section */
.not-found-message {
  margin-bottom: var(--space-2xl);
}

.not-found-logo {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.2);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.2);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 12px 48px rgba(59, 130, 246, 0.4);
  }
}

.not-found-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--space-lg);
  line-height: 1.2;
}

.not-found-description {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 var(--space-2xl);
}

/* Action Buttons */
.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

.not-found-actions .action-btn {
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-lg);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  border: none;
  opacity: 0;
  transform: translateY(20px);
}

.not-found-actions .action-btn.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.not-found-actions .action-btn.primary {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-dark));
  color: white;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.not-found-actions .action-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.4);
}

.not-found-actions .action-btn.secondary {
  background: var(--card-bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.not-found-actions .action-btn.secondary:hover {
  background: var(--hover-bg);
  border-color: var(--border-color-light);
  transform: translateY(-1px);
}

.not-found-actions .action-btn.tertiary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.not-found-actions .action-btn.tertiary:hover {
  background: var(--hover-bg-light);
  color: var(--text-secondary);
  border-color: var(--border-color-light);
}

/* Fun Fact Section */
.fun-fact {
  padding: var(--space-lg);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
}

.fun-fact-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Animated Background Elements */
.bg-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.floating-element {
  position: absolute;
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(1) {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.floating-element:nth-child(2) {
  top: 60%;
  right: 15%;
  animation-delay: 2s;
  width: 150px;
  height: 150px;
}

.floating-element:nth-child(3) {
  bottom: 20%;
  left: 20%;
  animation-delay: 4s;
  width: 80px;
  height: 80px;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 0.6;
  }
}

/* Responsive Design for 404 Page */
@media (max-width: 768px) {
  .error-code span {
    font-size: 5rem;
  }
  
  .not-found-title {
    font-size: 2rem;
  }
  
  .not-found-description {
    font-size: 1rem;
  }
  
  .not-found-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .not-found-actions .action-btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
  
  .floating-element {
    display: none;
  }
  
  .not-found-wrapper {
    padding: calc(68px + var(--space-lg)) var(--space-lg) var(--space-lg);
  }
}

@media (max-width: 480px) {
  .error-code {
    gap: var(--space-sm);
  }
  
  .error-code span {
    font-size: 4rem;
  }
  
  .not-found-wrapper {
    padding: calc(68px + var(--space-md)) var(--space-md) var(--space-md);
  }
  
  .about-header {
    padding: calc(68px + var(--space-xl)) 0 var(--space-xl) 0;
  }
}

/* Support Ticket System Styles */

/* Support Page Styles */
.support-wrapper {
  padding-top: calc(68px + var(--space-xl));
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.support-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.support-logo {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.2);
}

.support-title {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-blue), var(--purple-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 var(--space-sm);
}

.support-subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin: 0;
}

/* Support Navigation */
.support-nav {
  display: flex;
  background: var(--card-bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xs);
  margin-bottom: var(--space-2xl);
  gap: var(--space-xs);
}

.support-tab {
  flex: 1;
  padding: var(--space-md) var(--space-lg);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.support-tab:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

.support-tab.active {
  background: var(--accent-blue);
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Support Content */
.support-content {
  display: none;
}

.support-content.active {
  display: block;
}

/* Create Ticket Panel */
.create-ticket-panel {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  max-width: 700px;
  margin: 0 auto;
}

.create-ticket-panel h2 {
  margin: 0 0 var(--space-xl);
  color: var(--text-primary);
  font-size: 1.5rem;
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: var(--space-md);
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
  resize: vertical;
  font-family: inherit;
}

.help-text {
  display: block;
  margin-top: var(--space-xs);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.form-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.btn {
  padding: var(--space-md) var(--space-xl);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}

.btn.primary {
  background: var(--accent-blue);
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn.primary:hover {
  background: var(--accent-blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

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

.btn.secondary:hover {
  background: var(--hover-bg);
  border-color: var(--border-color-light);
}

.btn.small {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.875rem;
}

.btn.large {
  padding: var(--space-lg) var(--space-2xl);
  font-size: 1.125rem;
}

/* Tickets List */
.tickets-panel {
  max-width: 1000px;
  margin: 0 auto;
}

.tickets-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
}

.tickets-header h2 {
  margin: 0;
  color: var(--text-primary);
}

.tickets-filters select {
  padding: var(--space-sm) var(--space-md);
  background: var(--card-bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
}

.tickets-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.ticket-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  cursor: pointer;
  transition: all 0.2s ease;
}

.ticket-item:hover {
  border-color: var(--accent-blue);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-md);
}

.ticket-info h3 {
  margin: 0 0 var(--space-sm);
  color: var(--text-primary);
  font-size: 1.25rem;
}

.ticket-meta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.ticket-id,
.ticket-type {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.ticket-status {
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-open {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success-green);
}

.status-in-progress {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning-orange);
}

.status-closed {
  background: rgba(107, 114, 128, 0.2);
  color: var(--text-muted);
}

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

.ticket-preview {
  color: var(--text-secondary);
  line-height: 1.5;
}

.no-tickets {
  text-align: center;
  color: var(--text-muted);
  padding: var(--space-2xl);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

/* Ticket Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--card-bg-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-content.large {
  max-width: 1200px;
}

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

.modal-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.25rem;
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.close-modal:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

.modal-body {
  padding: var(--space-xl);
  overflow-y: auto;
  flex: 1;
}

/* Ticket Details */
.ticket-detail-row {
  display: flex;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-color);
}

.ticket-detail-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.ticket-detail-row strong {
  color: var(--text-primary);
  margin-right: var(--space-md);
  min-width: 100px;
}

/* Messages */
.ticket-messages {
  max-height: 400px;
  overflow-y: auto;
  margin: var(--space-xl) 0;
  padding: var(--space-lg);
  background: var(--secondary-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.message {
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  max-width: 80%;
}

.message.user {
  background: var(--accent-blue);
  color: white;
  margin-left: auto;
}

.message.staff {
  background: var(--card-bg-elevated);
  border: 1px solid var(--border-color);
}

.message.internal {
  background: var(--warning-orange);
  color: white;
  opacity: 0.9;
}

.message-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
  font-size: 0.875rem;
  opacity: 0.8;
}

.message-content {
  line-height: 1.5;
}

.internal-badge {
  background: rgba(0, 0, 0, 0.3);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

/* Reply Section */
.reply-section {
  border-top: 1px solid var(--border-color);
  padding-top: var(--space-lg);
}

.reply-section h4 {
  margin: 0 0 var(--space-md);
  color: var(--text-primary);
}

.reply-section textarea {
  width: 100%;
  margin-bottom: var(--space-md);
}

/* Support Panel Styles */
.support-panel-wrapper {
  padding-top: calc(68px + var(--space-xl));
  max-width: 1400px;
  margin: 0 auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.support-panel-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.support-panel-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.support-panel-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--space-sm);
}

.support-panel-subtitle {
  color: var(--text-secondary);
  margin: 0;
}

.support-panel-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.filters {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.stats {
  display: flex;
  gap: var(--space-xl);
}

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

.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-blue);
}

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

/* Tickets Grid */
.tickets-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.tickets-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.tickets-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
}

.tickets-section-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.category-count {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.tickets-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: var(--space-lg);
}

.tickets-section-empty {
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.ticket-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all 0.2s ease;
}

.ticket-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.ticket-card-header {
  margin-bottom: var(--space-md);
}

.ticket-card-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-sm);
}

.ticket-card-title h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.125rem;
  line-height: 1.3;
}

.ticket-card-badges {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.badge {
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.type-bug_report {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error-red);
}

.type-user_report {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning-orange);
}

.type-ban_appeal {
  background: rgba(16, 185, 129, 0.2);
  color: rgba(16, 185, 129, 1);
}

.priority-low {
  background: rgba(107, 114, 128, 0.2);
  color: var(--text-muted);
}

.priority-medium {
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent-blue);
}

.priority-high {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error-red);
}

.ticket-card-info {
  margin-bottom: var(--space-md);
  font-size: 0.875rem;
}

.ticket-card-info > div {
  margin-bottom: var(--space-xs);
  color: var(--text-secondary);
}

.ticket-card-preview {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.4;
  margin-bottom: var(--space-md);
}

.ticket-card-actions {
  border-top: 1px solid var(--border-color);
  padding-top: var(--space-md);
}

/* Ticket Management Modal */
.ticket-management-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  height: 70vh;
}

.ticket-management-info {
  border-right: 1px solid var(--border-color);
  padding-right: var(--space-xl);
}

.ticket-controls {
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-color);
}

.ticket-controls h4 {
  margin: 0 0 var(--space-lg);
  color: var(--text-primary);
}

.control-group {
  margin-bottom: var(--space-lg);
}

.control-group label {
  display: block;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
  font-weight: 500;
}

.control-actions {
  margin-top: var(--space-xl);
}

.ticket-management-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.ticket-messages-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-bottom: var(--space-lg);
}

.ticket-messages-panel h4 {
  margin: 0 0 var(--space-md);
  color: var(--text-primary);
}

.ticket-messages-panel .ticket-messages {
  flex: 1;
  margin: 0;
}

.reply-options {
  margin-bottom: var(--space-md);
}

.reply-options label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Donation Styles */
.donation-wrapper {
  padding-top: calc(68px + var(--space-xl));
  max-width: 800px;
  margin: 0 auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.donation-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.donation-logo {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.2);
}

.donation-title {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-blue), var(--purple-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 var(--space-sm);
}

.donation-subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin: 0;
}

.donation-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.donation-info {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.donation-info h2 {
  margin: 0 0 var(--space-lg);
  color: var(--text-primary);
}

.donation-info ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.donation-info li {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
}

.donation-info li:before {
  content: '✓';
  color: var(--success-green);
  font-weight: bold;
  margin-right: var(--space-md);
}

.donation-info li:last-child {
  border-bottom: none;
}

.donation-form-panel {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.donation-form-panel h3 {
  margin: 0 0 var(--space-lg);
  color: var(--text-primary);
}

.donation-description {
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

.stripe-info {
  margin-top: var(--space-xl);
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-color);
}

.stripe-logo {
  height: 32px;
  opacity: 0.7;
  margin-bottom: var(--space-sm);
}

.security-note {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0;
}

.back-actions {
  text-align: center;
}

/* Success/Error States */
.donation-success,
.donation-canceled {
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
}

.success-icon,
.canceled-icon {
  font-size: 4rem;
  margin-bottom: var(--space-lg);
}

.donation-success h1,
.donation-canceled h1 {
  color: var(--text-primary);
  margin: 0 0 var(--space-lg);
}

.donation-success p,
.donation-canceled p {
  color: var(--text-secondary);
  margin: 0 0 var(--space-xl);
  font-size: 1.125rem;
}

.canceled-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

/* Loading States */
.loading-spinner,
.no-tickets-panel {
  text-align: center;
  color: var(--text-muted);
  padding: var(--space-2xl);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

/* Responsive Design */
@media (max-width: 768px) {
  .support-nav {
    flex-direction: column;
  }
  
  .support-tab {
    text-align: center;
  }
  
  .donation-content {
    grid-template-columns: 1fr;
  }
  
  .ticket-management-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  
  .ticket-management-info {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding-right: 0;
    padding-bottom: var(--space-xl);
    margin-bottom: var(--space-xl);
  }

  .tickets-section-grid {
    grid-template-columns: 1fr;
  }
  
  .tickets-grid {
    grid-template-columns: 1fr;
  }
  
  .support-panel-controls {
    flex-direction: column;
    gap: var(--space-lg);
  }
  
  .stats {
    justify-content: center;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .canceled-actions {
    flex-direction: column;
  }
}