/* Skotcall - Discord Clone with Red Theme */
/* © 2026 Skotcall. All rights reserved. */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ==================== CSS VARIABLES ==================== */
:root {
  /* Red Theme Colors */
  --primary-red: #DC2626;
  --primary-red-dark: #B91C1C;
  --primary-red-light: #EF4444;
  --accent-red: #F87171;
  --accent-red-light: #FCA5A5;
  
  /* Dark Theme Base */
  --bg-primary: #1A1A1A;
  --bg-secondary: #242424;
  --bg-tertiary: #2E2E2E;
  --bg-hover: #383838;
  --bg-active: #424242;
  
  /* Text Colors */
  --text-primary: #FFFFFF;
  --text-secondary: #B3B3B3;
  --text-muted: #808080;
  --text-link: var(--accent-red);
  
  /* Borders & Dividers */
  --border-color: #3A3A3A;
  --divider-color: #2E2E2E;
  
  /* Status Colors */
  --status-online: #10B981;
  --status-idle: #F59E0B;
  --status-dnd: #DC2626;
  --status-offline: #6B7280;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.6);
  --shadow-red: 0 0 20px rgba(220, 38, 38, 0.3);
  
  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 50%;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 350ms ease;
  
  /* Z-index layers */
  --z-dropdown: 1000;
  --z-modal: 2000;
  --z-tooltip: 3000;
}

/* Light Theme */
[data-theme="light"] {
  --bg-primary: #FFFFFF;
  --bg-secondary: #F5F5F5;
  --bg-tertiary: #E5E5E5;
  --bg-hover: #D4D4D4;
  --bg-active: #C4C4C4;
  
  --text-primary: #1A1A1A;
  --text-secondary: #525252;
  --text-muted: #737373;
  
  --border-color: #E5E5E5;
  --divider-color: #F5F5F5;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Midnight Theme */
[data-theme="midnight"] {
  --bg-primary: #0A0A0A;
  --bg-secondary: #141414;
  --bg-tertiary: #1E1E1E;
  --bg-hover: #282828;
  --bg-active: #323232;
}

/* ==================== RESET & BASE ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-hover);
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-red);
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.6);
  }
}

@keyframes typing {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

/* ==================== UTILITY CLASSES ==================== */
.fade-in {
  animation: fadeIn 0.3s ease;
}

.slide-in-left {
  animation: slideInLeft 0.3s ease;
}

.slide-in-right {
  animation: slideInRight 0.3s ease;
}

.scale-in {
  animation: scaleIn 0.3s ease;
}

.hidden {
  display: none !important;
}

.flex {
  display: flex;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-sm {
  gap: var(--spacing-sm);
}

.gap-md {
  gap: var(--spacing-md);
}

.gap-lg {
  gap: var(--spacing-lg);
}

/* ==================== MAIN LAYOUT ==================== */
.app-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ==================== SERVERS SIDEBAR ==================== */
.servers-sidebar {
  width: 72px;
  background-color: var(--bg-tertiary);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--spacing-sm) 0;
  gap: var(--spacing-sm);
  overflow-y: auto;
  border-right: 1px solid var(--border-color);
}

.server-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.server-icon::before {
  content: '';
  position: absolute;
  left: -4px;
  width: 4px;
  height: 0;
  background: var(--primary-red);
  border-radius: 0 4px 4px 0;
  transition: height var(--transition-normal);
}

.server-icon:hover {
  border-radius: var(--radius-md);
  background: var(--primary-red);
  transform: translateY(-2px);
  box-shadow: var(--shadow-red);
}

.server-icon:hover::before {
  height: 20px;
}

.server-icon.active {
  border-radius: var(--radius-md);
  background: var(--primary-red);
}

.server-icon.active::before {
  height: 40px;
}

.server-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.server-icon-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.home-icon {
  background: var(--primary-red);
  border-radius: var(--radius-md);
}

.add-server {
  background: var(--bg-secondary);
  color: var(--status-online);
  font-size: 32px;
  font-weight: 300;
}

.add-server:hover {
  background: var(--status-online);
  color: var(--text-primary);
}

.server-divider {
  width: 32px;
  height: 2px;
  background: var(--border-color);
  border-radius: var(--radius-full);
  margin: var(--spacing-xs) 0;
}

/* ==================== CHANNELS SIDEBAR ==================== */
.channels-sidebar {
  width: 240px;
  background-color: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-color);
}

.server-header {
  height: 48px;
  padding: 0 var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.server-header:hover {
  background: var(--bg-hover);
}

.server-name {
  font-weight: 600;
  font-size: 15px;
}

.dropdown-icon {
  font-size: 12px;
  transition: transform var(--transition-fast);
}

.server-header:hover .dropdown-icon {
  transform: rotate(180deg);
}

.channels-list {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-md) var(--spacing-sm);
}

.channel-category {
  margin-bottom: var(--spacing-md);
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-xs) var(--spacing-sm);
  cursor: pointer;
  user-select: none;
  transition: color var(--transition-fast);
}

.category-header:hover {
  color: var(--text-primary);
}

.category-name {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.category-icon {
  font-size: 10px;
  transition: transform var(--transition-fast);
}

.category-header.collapsed .category-icon {
  transform: rotate(-90deg);
}

.channel-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm);
  margin: 2px 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  position: relative;
}

.channel-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.channel-item.active {
  background: var(--bg-active);
  color: var(--text-primary);
}

.channel-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--primary-red);
  border-radius: 0 4px 4px 0;
}

.channel-icon {
  font-size: 16px;
  color: var(--text-muted);
}

.channel-item.active .channel-icon,
.channel-item:hover .channel-icon {
  color: var(--primary-red);
}

.channel-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.user-area {
  height: 52px;
  background: var(--bg-tertiary);
  padding: var(--spacing-sm);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  border-top: 1px solid var(--border-color);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  position: relative;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.user-avatar:hover {
  transform: scale(1.1);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.status-indicator {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-tertiary);
  background: var(--status-online);
}

.status-indicator.idle {
  background: var(--status-idle);
}

.status-indicator.dnd {
  background: var(--status-dnd);
}

.status-indicator.offline {
  background: var(--status-offline);
}

.user-info {
  flex: 1;
  overflow: hidden;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-status {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-controls {
  display: flex;
  gap: var(--spacing-xs);
}

.user-control-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.user-control-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ==================== MAIN CHAT AREA ==================== */
.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
}

.chat-header {
  height: 48px;
  padding: 0 var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.channel-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.channel-hash {
  color: var(--text-muted);
  font-size: 20px;
}

.channel-title {
  font-weight: 600;
  font-size: 16px;
}

.channel-description {
  color: var(--text-muted);
  font-size: 14px;
  margin-left: var(--spacing-sm);
  padding-left: var(--spacing-sm);
  border-left: 1px solid var(--border-color);
}

.chat-controls {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.chat-control-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 20px;
  padding: var(--spacing-sm);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.chat-control-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.message {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-sm);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
  animation: fadeIn 0.3s ease;
}

.message:hover {
  background: var(--bg-secondary);
}

.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.message-avatar:hover {
  transform: scale(1.1);
}

.message-avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.message-content {
  flex: 1;
  min-width: 0;
}

.message-header {
  display: flex;
  align-items: baseline;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xs);
}

.message-author {
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.message-author:hover {
  color: var(--primary-red);
  text-decoration: underline;
}

.message-timestamp {
  font-size: 12px;
  color: var(--text-muted);
}

.message-text {
  font-size: 15px;
  line-height: 1.5;
  word-wrap: break-word;
}

.message-attachment {
  margin-top: var(--spacing-sm);
  max-width: 400px;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.message-attachment:hover {
  transform: scale(1.02);
}

.message-attachment img,
.message-attachment video {
  width: 100%;
  display: block;
}

.message-reactions {
  display: flex;
  gap: var(--spacing-xs);
  margin-top: var(--spacing-sm);
  flex-wrap: wrap;
}

.reaction {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.reaction:hover {
  background: var(--bg-hover);
  border-color: var(--primary-red);
}

.reaction.active {
  background: rgba(220, 38, 38, 0.1);
  border-color: var(--primary-red);
}

.typing-indicator {
  padding: 0 var(--spacing-md);
  color: var(--text-muted);
  font-size: 13px;
  height: 20px;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: var(--radius-full);
  animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

.message-input-container {
  padding: var(--spacing-md);
}

.message-input-wrapper {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: var(--spacing-sm) var(--spacing-md);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  border: 2px solid transparent;
  transition: all var(--transition-fast);
}

.message-input-wrapper:focus-within {
  border-color: var(--primary-red);
  box-shadow: var(--shadow-red);
}

.message-input-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 20px;
  padding: var(--spacing-xs);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.message-input-btn:hover {
  color: var(--primary-red);
  background: var(--bg-hover);
}

.message-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  resize: none;
  max-height: 200px;
}

.message-input::placeholder {
  color: var(--text-muted);
}

/* ==================== MEMBERS SIDEBAR ==================== */
.members-sidebar {
  width: 240px;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.members-list {
  padding: var(--spacing-md) var(--spacing-sm);
}

.member-category {
  margin-bottom: var(--spacing-md);
}

.member-category-header {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: var(--spacing-sm);
  margin-bottom: var(--spacing-xs);
}

.member-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm);
  margin: 2px 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.member-item:hover {
  background: var(--bg-hover);
}

.member-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  position: relative;
}

.member-avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.member-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==================== MODALS ==================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  animation: fadeIn 0.2s ease;
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 90%;
  max-height: 90%;
  overflow: hidden;
  animation: scaleIn 0.3s ease;
}

.modal-header {
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 24px;
  padding: var(--spacing-xs);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.modal-body {
  padding: var(--spacing-lg);
  overflow-y: auto;
  max-height: calc(90vh - 140px);
}

.modal-footer {
  padding: var(--spacing-lg);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-md);
}

/* ==================== FORMS ==================== */
.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary-red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: var(--spacing-xs);
}

/* ==================== BUTTONS ==================== */
.btn {
  padding: var(--spacing-sm) var(--spacing-lg);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--primary-red);
  color: var(--text-primary);
}

.btn-primary:hover {
  background: var(--primary-red-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-red);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-hover);
}

.btn-success {
  background: var(--status-online);
  color: var(--text-primary);
}

.btn-success:hover {
  background: #059669;
  transform: translateY(-2px);
}

.btn-danger {
  background: transparent;
  color: var(--primary-red);
  border: 1px solid var(--primary-red);
}

.btn-danger:hover {
  background: var(--primary-red);
  color: var(--text-primary);
}

.btn-link {
  background: transparent;
  color: var(--text-link);
  padding: 0;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* ==================== VOICE/VIDEO CALL ==================== */
.call-container {
  position: fixed;
  bottom: 0;
  left: 72px;
  right: 0;
  background: var(--bg-tertiary);
  border-top: 2px solid var(--primary-red);
  padding: var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  animation: slideInLeft 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.call-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.call-type {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--status-online);
  font-weight: 600;
}

.call-participants {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.call-participant {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
}

.call-controls {
  display: flex;
  gap: var(--spacing-md);
}

.call-btn {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all var(--transition-fast);
}

.call-btn-mute {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.call-btn-mute:hover {
  background: var(--bg-hover);
}

.call-btn-mute.active {
  background: var(--primary-red);
  color: var(--text-primary);
}

.call-btn-end {
  background: var(--primary-red);
  color: var(--text-primary);
}

.call-btn-end:hover {
  background: var(--primary-red-dark);
  transform: scale(1.1);
}

/* ==================== TOOLTIPS ==================== */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  padding: var(--spacing-xs) var(--spacing-sm);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-fast);
  z-index: var(--z-tooltip);
  box-shadow: var(--shadow-md);
}

.tooltip:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* ==================== LOADING ==================== */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--bg-hover);
  border-top-color: var(--primary-red);
  border-radius: var(--radius-full);
  animation: spin 1s linear infinite;
}

.loading-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  flex-direction: column;
  gap: var(--spacing-md);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .servers-sidebar {
    width: 56px;
  }
  
  .server-icon {
    width: 40px;
    height: 40px;
  }
  
  .channels-sidebar {
    width: 200px;
  }
  
  .members-sidebar {
    display: none;
  }
  
  .channel-description {
    display: none;
  }
}

/* ==================== AUTHENTICATION PAGE ==================== */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  padding: var(--spacing-lg);
  position: relative;
  overflow: hidden;
}

.auth-container::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.1) 0%, transparent 70%);
  animation: pulse 10s ease-in-out infinite;
}

.auth-box {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: var(--spacing-xl);
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 1;
  animation: scaleIn 0.5s ease;
}

.auth-logo {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.auth-logo img {
  width: 80px;
  height: 80px;
  margin-bottom: var(--spacing-md);
  animation: glow 2s ease-in-out infinite;
}

.auth-title {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--spacing-sm);
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin: var(--spacing-md) 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.auth-divider-text {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.auth-footer {
  text-align: center;
  margin-top: var(--spacing-lg);
  font-size: 14px;
  color: var(--text-muted);
}

.auth-link {
  color: var(--primary-red);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.auth-link:hover {
  color: var(--primary-red-light);
  text-decoration: underline;
}

/* ==================== SETTINGS PANEL ==================== */
.settings-container {
  display: flex;
  height: 100vh;
  background: var(--bg-primary);
}

.settings-sidebar {
  width: 240px;
  background: var(--bg-secondary);
  padding: var(--spacing-lg);
  overflow-y: auto;
  border-right: 1px solid var(--border-color);
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.settings-nav-item {
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-secondary);
  font-weight: 500;
}

.settings-nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.settings-nav-item.active {
  background: var(--bg-active);
  color: var(--primary-red);
}

.settings-content {
  flex: 1;
  padding: var(--spacing-xl);
  overflow-y: auto;
}

.settings-section {
  max-width: 740px;
  margin-bottom: var(--spacing-xl);
}

.settings-section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
}

.settings-section-description {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: var(--spacing-lg);
}

.settings-item {
  background: var(--bg-secondary);
  padding: var(--spacing-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
}

.theme-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.theme-option {
  aspect-ratio: 16/9;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 3px solid transparent;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.theme-option:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.theme-option.active {
  border-color: var(--primary-red);
  box-shadow: var(--shadow-red);
}

.theme-option-dark {
  background: linear-gradient(135deg, #1A1A1A 0%, #2E2E2E 100%);
}

.theme-option-light {
  background: linear-gradient(135deg, #FFFFFF 0%, #E5E5E5 100%);
}

.theme-option-midnight {
  background: linear-gradient(135deg, #0A0A0A 0%, #1E1E1E 100%);
}

.theme-option-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--spacing-sm);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

/* ==================== PROFILE CARD ==================== */
.profile-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.3s ease;
}

.profile-banner {
  height: 120px;
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
  position: relative;
}

.profile-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  border: 6px solid var(--bg-secondary);
  position: absolute;
  bottom: -40px;
  left: var(--spacing-lg);
}

.profile-avatar-large img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.profile-body {
  padding: var(--spacing-xl);
  padding-top: 50px;
}

.profile-username {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: var(--spacing-xs);
}

.profile-tag {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: var(--spacing-lg);
}

.profile-section {
  margin-bottom: var(--spacing-lg);
}

.profile-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: var(--spacing-sm);
}

.profile-badges {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.badge {
  padding: 4px 12px;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid var(--primary-red);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-red);
}

/* ==================== FOOTER ==================== */
.footer {
  text-align: center;
  padding: var(--spacing-md);
  color: var(--text-muted);
  font-size: 12px;
  border-top: 1px solid var(--border-color);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--primary-red);
}
