:root {
  --color-primary: #667eea;
  --color-primary-dark: #5a6fd8;
  --color-background: #f8f9fa;
  --color-surface: #ffffff;
  --color-text: #333333;
  --color-text-secondary: #666666;
  --color-border: #e9ecef;
  --color-shadow: rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--color-background);
  color: var(--color-text);
  line-height: 1.6;
}

/* Auth Styles */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--color-primary) 0%, #764ba2 100%);
  padding: 1rem;
}

.auth-card {
  background: var(--color-surface);
  padding: 2.5rem;
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 420px;
}

.auth-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  text-align: center;
}

.auth-header p {
  color: var(--color-text-secondary);
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.auth-form h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--color-text);
  text-align: center;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--color-text);
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: 0.75rem;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
  padding: 0.875rem 1.75rem;
  border: none;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: all 0.2s;
}

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

.btn--primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn--secondary {
  background: #6c757d;
  color: white;
}

.btn--secondary:hover {
  background: #5a6268;
}

.btn--full-width {
  width: 100%;
}

.auth-switch {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--color-text-secondary);
}

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

/* Alert Messages */
.alert {
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error,
.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.alert-info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.alert::before {
  font-size: 1.2rem;
  font-weight: bold;
}

.alert-success::before {
  content: "✓";
}

.alert-error::before,
.alert-danger::before {
  content: "✕";
}

.alert-warning::before {
  content: "⚠";
}

.alert-info::before {
  content: "ℹ";
}

/* Main Layout */
.main-container {
  display: flex;
  height: 100vh;
  background: var(--color-background);
}

.sidebar {
  width: 300px;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
}

.sidebar-header {
  padding: 2rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.logo {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
  margin: 0;
  text-align: center;
}

.sidebar-nav {
  flex: 1;
  padding: 1.5rem 1rem;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  margin-bottom: 0.5rem;
  border-radius: 1rem;
  text-decoration: none;
  color: var(--color-text-secondary);
  font-weight: 500;
  transition: all 0.2s;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(102, 126, 234, 0.1);
  color: var(--color-primary);
  transform: translateX(4px);
}

.nav-icon:not([data-lucide]) {
  margin-right: 1rem;
  font-size: 1.3rem;
  width: 24px;
  text-align: center;
}

.nav-text {
  font-size: 1rem;
}

.sidebar-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.user-info {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: var(--color-background);
  border-radius: 1rem;
}

.user-avatar,
.chat-avatar,
.profile-avatar,
.scribe-avatar {
  background: linear-gradient(135deg, var(--color-primary), #764ba2);
  color: white;
  border-radius: 22%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  text-transform: uppercase;
}

.user-avatar {
  width: 48px;
  height: 48px;
  margin-right: 1rem;
  font-size: 1rem;
}

.user-details {
  flex: 1;
}

.user-name {
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.user-status {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--color-background);
}

.content-header {
  background: var(--color-surface);
  padding: 2rem;
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.content-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.content-body {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

/* Chat List */
.chat-list,
.scribes-list {
  background: var(--color-surface);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
}

.chat-item {
  display: flex;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-background);
  cursor: pointer;
  transition: background 0.2s;
}

.chat-item:hover {
  background: rgba(102, 126, 234, 0.05);
}

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

.chat-avatar {
  width: 52px;
  height: 52px;
  margin-right: 1.25rem;
  font-size: 1.1rem;
}

.chat-info {
  flex: 1;
}

.chat-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-text);
  margin-bottom: 0.4rem;
}

.chat-last-message {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

.chat-time {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
}

/* Messages */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 140px);
  background: var(--color-surface);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
}

.messages-container {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  background: linear-gradient(to bottom, #f8f9fa, #ffffff);
}

.message {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  max-width: 75%;
  animation: messageFadeIn 0.35s cubic-bezier(0.23, 1, 0.32, 1);
  transition: background 0.3s, box-shadow 0.3s, transform 0.25s;
  will-change: opacity, transform;
}

@keyframes messageFadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }

  60% {
    opacity: 1;
    transform: translateY(-2px) scale(1.01);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.message.message-sending {
  opacity: 0.7;
  filter: blur(0.5px);
  background: #e0e7ff;
  animation: messageFadeIn 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.message.message-failed {
  opacity: 1;
  background: #fff0f0;
  border-left: 4px solid #ef4444;
  animation: shake 0.3s 1;
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-4px);
  }

  40% {
    transform: translateX(4px);
  }

  60% {
    transform: translateX(-2px);
  }

  80% {
    transform: translateX(2px);
  }

  100% {
    transform: translateX(0);
  }
}

/* Modal and sidebar transitions */
.modal-overlay,
.media-viewer-modal,
.group-settings-container,
.sidebar-enhanced-chat,
.sidebar-overlay {
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay[style*="display: flex"],
.media-viewer-modal[style*="display: flex"],
.group-settings-container[style*="display: flex"],
.sidebar-enhanced-chat.show,
.sidebar-overlay.show {
  opacity: 1;
  transform: translateY(0);
}

.modal-overlay,
.media-viewer-modal,
.group-settings-container,
.sidebar-enhanced-chat,
.sidebar-overlay {
  opacity: 0;
  transform: translateY(20px);
}

.sidebar-enhanced-chat.show {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.modal-container,
.group-settings-container {
  transition: box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-container {
  animation: modalPopIn 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes modalPopIn {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.message--own {
  align-items: flex-end;
  margin-left: auto;
}

.message-content {
  background: var(--color-surface);
  padding: 1rem 1.25rem;
  border-radius: 1.5rem;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
  word-wrap: break-word;
  line-height: 1.4;
}

.message--own .message-content {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: white;
}

.message-time {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  margin-top: 0.5rem;
  padding: 0 1rem;
}

/* Message Reactions */
.message-reactions {
  margin-top: 0.5rem;
  padding: 0.25rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.reaction {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 1.5rem;
}

.reaction:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: scale(1.05);
}

.message--own .reaction {
  background: rgba(102, 126, 234, 0.1);
  border-color: rgba(102, 126, 234, 0.3);
}

.message-input-container {
  padding: 1.5rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.message-input-container form {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.message-input-container input {
  flex: 1;
  padding: 1rem 1.25rem;
  border: 2px solid var(--color-border);
  border-radius: 2rem;
  outline: none;
  font-size: 1rem;
  transition: border-color 0.2s;
}

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

/* Message Menu */
.message-menu-container {
  position: relative;
  display: inline-block;
}

.message-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  color: var(--color-text-secondary);
  font-size: 1.2rem;
  transition: background-color 0.2s;
}

.message-menu-btn:hover {
  background: rgba(0, 0, 0, 0.1);
}

.message-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  min-width: 120px;
  display: none;
}

.message-menu>div {
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
  border-bottom: 1px solid var(--color-border);
}

.message-menu>div:last-child {
  border-bottom: none;
}

.message-menu>div:hover {
  background: var(--color-background);
}

.delete-submenu-trigger {
  position: relative;
  cursor: pointer;
}

.delete-submenu-trigger:hover {
  background: var(--color-background);
}

.delete-submenu {
  position: absolute;
  top: 0;
  background: #4a4a4a;
  border: 1px solid #666666;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1001;
  min-width: 120px;
  display: none;
  overflow: hidden;
}

.delete-option {
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid #666666;
  font-size: 0.9rem;
  color: #ffffff;
  background: #5a5a5a;
}

.delete-option:last-child {
  border-bottom: none;
}

.delete-option:hover {
  background: #000000;
  color: #ffffff;
  transform: translateX(2px);
}

/* Profile */
.profile-header {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  background: var(--color-surface);
  padding: 2.5rem;
  border-radius: 1rem;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
}

.profile-avatar {
  width: 100px;
  height: 100px;
  margin-right: 2rem;
  font-size: 2rem;
}

.profile-info h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.profile-info p {
  color: var(--color-text-secondary);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.scribe-compose {
  background: var(--color-surface);
  padding: 2rem;
  border-radius: 1rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
}

.scribe-compose h4 {
  font-size: 1.3rem;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.scribe-compose textarea {
  width: 100%;
  padding: 1.25rem;
  border: 2px solid var(--color-border);
  border-radius: 1rem;
  resize: vertical;
  min-height: 120px;
  margin-bottom: 1rem;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.scribe-compose textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.scribes-list {
  padding: 2rem;
}

.scribes-list h4 {
  font-size: 1.3rem;
  color: var(--color-text);
  margin-bottom: 1.5rem;
}

.scribe-item {
  border-bottom: 1px solid var(--color-background);
  padding: 1.5rem 0;
  margin-bottom: 1rem;
}

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

.scribe-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.scribe-avatar {
  width: 44px;
  height: 44px;
  margin-right: 1rem;
  font-size: 0.9rem;
}

.scribe-info {
  flex: 1;
}

.scribe-author {
  font-weight: 600;
  color: var(--color-text);
  margin-right: 0.75rem;
}

.scribe-username,
.scribe-time {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin-right: 0.75rem;
}

.scribe-content {
  margin-bottom: 1rem;
  line-height: 1.6;
  font-size: 1rem;
  color: var(--color-text);
}

.scribe-actions {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

.scribe-likes {
  cursor: pointer;
  transition: color 0.2s;
}

.scribe-likes:hover {
  color: #e74c3c;
}

/* Users List */
.users-list {
  margin-top: 2rem;
  background: var(--color-surface);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
}

.users-list h3 {
  font-size: 1.2rem;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.user-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-radius: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.user-item:hover {
  background: rgba(102, 126, 234, 0.05);
}

.user-item .user-avatar {
  width: 44px;
  height: 44px;
  font-size: 0.9rem;
}

.empty-state {
  text-align: center;
  color: var(--color-text-secondary);
  padding: 3rem 2rem;
  font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .main-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    order: 2;
  }

  .content {
    order: 1;
  }

  .sidebar-nav {
    display: flex;
    overflow-x: auto;
    padding: 1rem;
  }

  .nav-item {
    flex: 0 0 auto;
    margin-right: 1rem;
    margin-bottom: 0;
  }

  .message {
    max-width: 85%;
  }

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

  .profile-avatar {
    margin-right: 0;
    margin-bottom: 1rem;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 2rem 1.5rem;
  }

  .content-body {
    padding: 1rem;
  }

  .sidebar-footer {
    padding: 1rem;
  }
}

/* Private Account and Block Styles */
.private-account-message {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
  border-radius: 1rem;
  border: 2px solid #e3f2fd;
  margin: 2rem 0;
}

.private-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  display: block;
}

.private-account-message h3 {
  color: #1976d2;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.private-account-message p {
  color: #666;
  font-size: 1rem;
  line-height: 1.6;
}

.profile-status-message {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  margin-bottom: 1rem;
  border: 1px solid;
  font-size: 0.9rem;
}

.profile-status-message.blocked {
  background-color: #fff3cd;
  border-color: #ffeaa7;
  color: #856404;
}

.profile-status-message.pending {
  background-color: #d1ecf1;
  border-color: #bee5eb;
  color: #0c5460;
}

.profile-status-message.declined {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

.status-icon {
  font-size: 1.25rem;
}

.status-text {
  flex: 1;
}

/* Profile action buttons - override base .btn styling */
.profile-actions .btn {
  padding: 0.5rem 1rem !important;
  border-radius: 0.5rem !important;
  font-size: 0.9rem !important;
}

/* Follow button base styling */
.btn-follow {
  padding: 0.5rem 1rem;
  border: 2px solid;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: #f8f9fa;
  color: #495057;
  border-color: #dee2e6;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-follow:hover {
  background: #e9ecef;
  border-color: #adb5bd;
  transform: translateY(-1px);
}

/* Enhanced follow button states */
.btn-follow.following {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  border-color: #28a745;
  color: white;
}

.btn-follow.following:hover {
  background: linear-gradient(135deg, #218838 0%, #1aa085 100%);
  transform: translateY(-1px);
}

.btn-follow.pending {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
  border-color: #17a2b8;
  color: white;
}

.btn-follow.pending:hover {
  background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
  transform: translateY(-1px);
}

/* Block button styling */
.btn--danger {
  padding: 0.5rem 1rem !important;
  border: 2px solid;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  border-color: #dc3545;
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn--danger:hover {
  background: linear-gradient(135deg, #c82333 0%, #a02622 100%);
  transform: translateY(-1px);
}

.btn--small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Privacy toggle button */
.btn--info {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
  border-color: #17a2b8;
  color: white;
}

.btn--info:hover {
  background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
  transform: translateY(-1px);
}

/* Responsive adjustments for new buttons */
@media (max-width: 768px) {
  .profile-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .profile-actions .btn {
    width: 100%;
  }

  .private-account-message {
    padding: 2rem 1rem;
  }

  .private-account-message h3 {
    font-size: 1.25rem;
  }
}

/* Follow Requests Modal */
.follow-request-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  margin-bottom: 0.75rem;
  background: var(--color-surface);
}

.request-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

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

.request-details {
  flex: 1;
}

.request-username {
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.request-name {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.25rem;
}

.request-time {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

.request-actions {
  display: flex;
  gap: 0.5rem;
}

.no-requests {
  text-align: center;
  padding: 2rem;
  color: var(--color-text-secondary);
}

.no-requests p {
  margin: 0;
  font-size: 1.1rem;
}

/* Lucide Icon Styles */
[data-lucide] {
  width: 1em;
  height: 1em;
  vertical-align: middle;
}

.nav-icon[data-lucide] {
  width: 20px !important;
  height: 20px !important;
  margin-right: 1rem;
  flex-shrink: 0;
}

/* Mobile Navigation Icons */
.nav-icon-wrapper .nav-icon[data-lucide] {
  width: 24px !important;
  height: 24px !important;
  margin-right: 0;
}

.action-icon[data-lucide] {
  width: 24px;
  height: 24px;
}

.group-icon[data-lucide] {
  width: 24px;
  height: 24px;
}

.admin-badge[data-lucide] {
  width: 14px;
  height: 14px;
  margin-left: 0.25rem;
  color: #f59e0b;
}

.group-header-icon[data-lucide] {
  width: 40px;
  height: 40px;
}

.online-dot[data-lucide] {
  width: 8px;
  height: 8px;
  color: #10b981;
}

.offline-dot[data-lucide] {
  width: 8px;
  height: 8px;
  color: #6b7280;
}

.system-message-icon[data-lucide] {
  width: 16px;
  height: 16px;
}

.empty-icon[data-lucide] {
  width: 48px;
  height: 48px;
  color: #9ca3af;
}

.group-large-icon[data-lucide] {
  width: 80px;
  height: 80px;
  color: #667eea;
}

/* Responsive Utility Classes */
.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .desktop-only {
    display: none;
  }

  .mobile-only {
    display: block;
  }
}

/* ===== ENHANCED STORY INTERACTION STYLES ===== */

/* Story Footer Actions */
.story-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg,
      rgba(0, 0, 0, 0.1) 0%,
      rgba(0, 0, 0, 0.4) 30%,
      rgba(0, 0, 0, 0.8) 70%,
      rgba(0, 0, 0, 0.95) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 24px;
  padding-bottom: 34px;
  z-index: 10;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.story-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.story-like-btn {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.story-like-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.story-like-btn:hover {
  transform: scale(1.15) translateY(-2px);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 20px rgba(255, 255, 255, 0.1);
}

.story-like-btn:hover::before {
  opacity: 1;
}

.story-like-btn.liked {
  background: linear-gradient(135deg, #ff0056, #ff3366);
  border-color: #ff0056;
  box-shadow:
    0 4px 20px rgba(255, 0, 86, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.story-like-btn.liked:hover {
  background: linear-gradient(135deg, #ff1a6d, #ff4d80);
  box-shadow:
    0 8px 30px rgba(255, 0, 86, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 25px rgba(255, 0, 86, 0.3);
}

.story-like-btn .lucide {
  color: white;
  width: 24px;
  height: 24px;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.story-like-btn:active .lucide {
  transform: scale(0.85);
}

.story-reply-form {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.story-reply-input {
  flex: 1;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  padding: 14px 22px;
  color: white;
  font-size: 15px;
  font-weight: 400;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  transition: all 0.3s ease;
  box-shadow:
    0 4px 15px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  outline: none;
}

.story-reply-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 300;
}

.story-reply-input:focus {
  border-color: rgba(255, 255, 255, 0.5);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 0 3px rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.story-reply-btn {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  border: none;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow:
    0 4px 15px rgba(102, 126, 234, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.story-reply-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.story-reply-btn:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow:
    0 8px 25px rgba(102, 126, 234, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 20px rgba(102, 126, 234, 0.2);
}

.story-reply-btn:hover::before {
  opacity: 1;
}

.story-reply-btn:active {
  transform: scale(0.95);
}

.story-reply-btn .lucide {
  color: white;
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.story-owner-actions {
  display: flex;
  gap: 12px;
  opacity: 0.9;
}

.story-owner-btn {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 24px;
  padding: 10px 18px;
  color: white;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow:
    0 4px 15px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.story-owner-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.story-owner-btn:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow:
    0 8px 25px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 15px rgba(255, 255, 255, 0.1);
}

.story-owner-btn:hover::before {
  opacity: 1;
}

.story-owner-btn:active {
  transform: translateY(0);
}

/* Story Modals */
.story-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: modalFadeIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Main Story View Modal */
#storyViewModal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  z-index: 999;
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
  }

  to {
    opacity: 1;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
}

.story-viewers-modal,
.story-replies-modal {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 20px;
  width: 90%;
  max-width: 420px;
  max-height: 85vh;
  overflow: hidden;
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.25),
    0 15px 35px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: modalSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

@keyframes modalSlideUp {
  from {
    transform: translateY(60px) scale(0.9);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.story-modal-header {
  padding: 24px 24px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.story-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  background: linear-gradient(135deg, var(--color-text), var(--color-text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.story-modal-close {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.02));
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.story-modal-close::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.story-modal-close:hover {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.04));
  border-color: rgba(0, 0, 0, 0.15);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.story-modal-close:hover::before {
  opacity: 1;
}

.story-modal-close:active {
  transform: scale(0.95);
}

.story-modal-content {
  max-height: 450px;
  overflow-y: auto;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.story-modal-content::-webkit-scrollbar {
  width: 6px;
}

.story-modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.story-modal-content::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.1));
  border-radius: 3px;
}

.story-modal-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.2));
}

/* Story View Content */
.story-view-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
  height: 100%;
}

.story-viewer-item,
.story-reply-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  position: relative;
  cursor: pointer;
}

.story-viewer-item:hover,
.story-reply-item:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.03), rgba(102, 126, 234, 0.01));
  transform: translateX(2px);
}

.story-viewer-item:last-child,
.story-reply-item:last-child {
  border-bottom: none;
}

.story-viewer-avatar,
.story-reply-avatar {
  width: 48px;
  height: 48px;
  border-radius: 22%;
  object-fit: cover;
  border: 3px solid transparent;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)) border-box;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.story-viewer-item:hover .story-viewer-avatar,
.story-reply-item:hover .story-reply-avatar {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.story-viewer-info,
.story-reply-info {
  flex: 1;
  min-width: 0;
}

.story-viewer-name,
.story-reply-username {
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
  font-size: 15px;
}

.story-viewer-time,
.story-reply-time {
  font-size: 13px;
  color: var(--color-text-secondary);
  font-weight: 400;
}

.story-reply-content {
  margin-top: 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.01));
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
  word-wrap: break-word;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.story-reply-item:hover .story-reply-content {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.02));
  border-color: rgba(0, 0, 0, 0.08);
}

.story-reply-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.3s ease;
}

.story-reply-item:hover .story-reply-actions {
  opacity: 1;
  transform: translateY(0);
}

.story-reply-action {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.02));
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 6px 12px;
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.story-reply-action:hover {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.04));
  border-color: rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.story-reply-action.like:hover {
  background: linear-gradient(135deg, #ff0056, #ff3366);
  border-color: #ff0056;
  color: white;
  box-shadow: 0 4px 12px rgba(255, 0, 86, 0.3);
}

.story-reply-action.delete:hover {
  background: linear-gradient(135deg, #dc3545, #e74c3c);
  border-color: #dc3545;
  color: white;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Empty States */
.story-modal-empty {
  padding: 60px 24px;
  text-align: center;
  color: var(--color-text-secondary);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.3));
}

.story-modal-empty .lucide {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  opacity: 0.4;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-6px);
  }
}

.story-modal-empty p {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  color: var(--color-text-secondary);
  opacity: 0.8;
}

/* Loading States */
.story-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.3));
}

.story-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(102, 126, 234, 0.2);
  border-top: 3px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Enhanced Animations */
@keyframes pulse {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }

  50% {
    transform: scale(1.05);
    filter: brightness(1.1);
  }

  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-4px);
  }

  60% {
    transform: translateY(-2px);
  }
}

.story-like-btn.liked .lucide {
  animation: pulse 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.story-like-btn:active {
  animation: bounce 0.4s ease;
}

.story-reply-btn:active {
  animation: bounce 0.4s ease;
}

/* Success Animation */
@keyframes successPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.story-reply-form.success .story-reply-input {
  animation: successPulse 0.6s ease;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .story-footer {
    padding: 20px;
    padding-bottom: 28px;
  }

  .story-actions {
    gap: 16px;
    margin-bottom: 16px;
  }

  .story-like-btn {
    width: 48px;
    height: 48px;
  }

  .story-like-btn .lucide {
    width: 22px;
    height: 22px;
  }

  .story-reply-input {
    padding: 12px 18px;
    font-size: 14px;
  }

  .story-reply-btn {
    width: 44px;
    height: 44px;
  }

  .story-reply-btn .lucide {
    width: 18px;
    height: 18px;
  }

  .story-owner-actions {
    gap: 10px;
  }

  .story-owner-btn {
    padding: 9px 16px;
    font-size: 12px;
  }

  .story-viewers-modal,
  .story-replies-modal {
    width: 95%;
    max-width: 380px;
    max-height: 90vh;
    margin: 10px;
  }

  .story-modal-header {
    padding: 20px;
  }

  .story-modal-title {
    font-size: 18px;
  }

  .story-modal-close {
    width: 32px;
    height: 32px;
  }

  .story-modal-content {
    max-height: 400px;
  }

  .story-viewer-item,
  .story-reply-item {
    padding: 16px 20px;
    gap: 14px;
  }

  .story-viewer-avatar,
  .story-reply-avatar {
    width: 44px;
    height: 44px;
  }

  .story-viewer-name,
  .story-reply-username {
    font-size: 14px;
  }

  .story-viewer-time,
  .story-reply-time {
    font-size: 12px;
  }

  .story-reply-content {
    padding: 12px 16px;
    font-size: 13px;
  }

  .story-reply-actions {
    gap: 6px;
  }

  .story-reply-action {
    padding: 5px 10px;
    font-size: 11px;
  }

  .story-modal-empty {
    padding: 50px 20px;
  }

  .story-modal-empty .lucide {
    width: 56px;
    height: 56px;
    margin-bottom: 18px;
  }

  .story-modal-empty p {
    font-size: 15px;
  }

  .story-loading {
    padding: 50px 20px;
  }

  .story-spinner {
    width: 28px;
    height: 28px;
  }
}