/* theme.css - Perfect Neumorphism Design */
:root {
  /* Neumorphic Color Palette - Light Theme */
  --neu-bg: #e6e9ef;
  --neu-shadow-dark: #b8bec9;
  --neu-shadow-light: #f5f7fa;
  --neu-primary: #4a6cf7;
  --neu-primary-dark: #3a5ce5;
  --neu-text: #2d3748;
  --neu-text-secondary: #718096;
  --neu-text-muted: #a0aec0;
  
  /* Neumorphic Gradients */
  --bg-primary: var(--neu-bg);
  --bg-secondary: linear-gradient(145deg, #eef2f6, #dde1e6);
  --bg-tertiary: linear-gradient(145deg, #dde1e6, #ccd0d5);
  --bg-hover: linear-gradient(145deg, #f0f4f8, #dfe3e8);
  --bg-active: linear-gradient(145deg, #d5d9de, #c4c8cd);
  
  --text-primary: var(--neu-text);
  --text-secondary: var(--neu-text-secondary);
  --text-muted: var(--neu-text-muted);
  --text-link: var(--neu-primary);
  
  --border-light: rgba(255, 255, 255, 0.3);
  --border-medium: rgba(203, 207, 214, 0.6);
  --border-dark: rgba(184, 190, 201, 0.8);
  
  --message-out-bg: linear-gradient(145deg, var(--neu-primary), var(--neu-primary-dark));
  --message-out-text: #ffffff;
  --message-in-bg: linear-gradient(145deg, #ffffff, #f5f7fa);
  --message-in-text: var(--neu-text);
  
  /* Perfect Neumorphic Shadows - No White */
  --shadow-sm: 
    4px 4px 8px var(--neu-shadow-dark),
    -4px -4px 8px var(--neu-shadow-light);
  
  --shadow-md: 
    6px 6px 12px var(--neu-shadow-dark),
    -6px -6px 12px var(--neu-shadow-light);
  
  --shadow-lg: 
    8px 8px 16px var(--neu-shadow-dark),
    -8px -8px 16px var(--neu-shadow-light);
  
  --shadow-inset: 
    inset 3px 3px 6px var(--neu-shadow-dark),
    inset -3px -3px 6px var(--neu-shadow-light);
  
  --shadow-pressed: 
    inset 4px 4px 8px var(--neu-shadow-dark),
    inset -4px -4px 8px var(--neu-shadow-light);
  
  /* Enhanced Border Radius */
  --radius-sm: 16px;
  --radius-md: 20px;
  --radius-lg: 24px;
  --radius-xl: 28px;
  --radius-round: 50%;
  
  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-medium: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  /* Perfect Neumorphic Color Palette - Dark Theme */
  --neu-bg: #2d3748;
  --neu-shadow-dark: #1a202c;
  --neu-shadow-light: #4a5568;
  --neu-primary: #5a7df9;
  --neu-primary-dark: #4a6cf7;
  --neu-text: #f7fafc;
  --neu-text-secondary: #e2e8f0;
  --neu-text-muted: #a0aec0;
  
  /* Velvet-like Gradients for Dark Theme */
  --bg-primary: var(--neu-bg);
  --bg-secondary: linear-gradient(145deg, #343e50, #272f3d);
  --bg-tertiary: linear-gradient(145deg, #272f3d, #1a202c);
  --bg-hover: linear-gradient(145deg, #384152, #2b3342);
  --bg-active: linear-gradient(145deg, #1f2636, #121825);
  
  --text-primary: var(--neu-text);
  --text-secondary: var(--neu-text-secondary);
  --text-muted: var(--neu-text-muted);
  --text-link: var(--neu-primary);
  
  --border-light: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(26, 32, 44, 0.6);
  --border-dark: rgba(15, 20, 30, 0.8);
  
  --message-out-bg: linear-gradient(145deg, var(--neu-primary), var(--neu-primary-dark));
  --message-out-text: #ffffff;
  --message-in-bg: linear-gradient(145deg, #3c4658, #2f394b);
  --message-in-text: var(--neu-text);
  
  /* Dark Neumorphic Shadows */
  --shadow-sm: 
    4px 4px 8px var(--neu-shadow-dark),
    -4px -4px 8px var(--neu-shadow-light);
  
  --shadow-md: 
    6px 6px 12px var(--neu-shadow-dark),
    -6px -6px 12px var(--neu-shadow-light);
  
  --shadow-lg: 
    8px 8px 16px var(--neu-shadow-dark),
    -8px -8px 16px var(--neu-shadow-light);
  
  --shadow-inset: 
    inset 3px 3px 6px var(--neu-shadow-dark),
    inset -3px -3px 6px var(--neu-shadow-light);
  
  --shadow-pressed: 
    inset 4px 4px 8px var(--neu-shadow-dark),
    inset -4px -4px 8px var(--neu-shadow-light);
}

/* Enhanced Base Styles with Perfect Neumorphism */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-primary);
  transition: all var(--transition-medium);
  -webkit-font-smoothing: antialiased;
  height: 100vh;
  overflow: hidden;
  font-weight: 450;
}

/* App Container with Perfect Neumorphic Background */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: var(--bg-primary);
  position: relative;
}

/* Enhanced Side Menu - Perfect Neumorphism */
.side-menu {
  position: fixed;
  top: 0;
  left: -320px;
  width: 320px;
  height: 100%;
  background: var(--bg-secondary);
  z-index: 1000;
  transition: transform var(--transition-medium);
  box-shadow: var(--shadow-lg);
  border-right: 1px solid var(--border-light);
}

.side-menu.active {
  transform: translateX(320px);
}

.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--neu-primary);
  color: var(--neu-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 18px;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--border-light);
}

.user-info {
  flex: 1;
}

.user-name {
  font-weight: 650;
  color: var(--text-primary);
  font-size: 16px;
  letter-spacing: -0.01em;
}

.user-status {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 400;
}

.close-menu {
  background: var(--bg-tertiary);
  border: none;
  font-size: 18px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 10px;
  border-radius: var(--radius-sm);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.close-menu:hover {
  background: var(--bg-hover);
  box-shadow: var(--shadow-inset);
  transform: scale(0.95);
}

.close-menu:active {
  box-shadow: var(--shadow-pressed);
  transform: scale(0.92);
}

.menu-content {
  padding: 16px 0;
}

.menu-section {
  margin-bottom: 12px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-primary);
  text-decoration: none;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-size: 15px;
  margin: 0 12px;
  border-radius: var(--radius-md);
  font-weight: 500;
}

.menu-item:hover {
  background: var(--bg-hover);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.menu-item:active {
  box-shadow: var(--shadow-pressed);
  transform: translateY(0);
}

.menu-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* Enhanced Chats Panel - Perfect Neumorphism */
.chats-panel {
  width: 380px;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
  box-shadow: var(--shadow-md);
  border-right: 1px solid var(--border-light);
}

.chats-header {
  display: flex;
  align-items: center;
  padding: 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
  min-height: 72px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.menu-toggle {
  background: var(--bg-tertiary);
  border: none;
  font-size: 18px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 10px;
  border-radius: var(--radius-sm);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.menu-toggle:hover {
  background: var(--bg-hover);
  box-shadow: var(--shadow-inset);
  transform: scale(0.95);
}

.menu-toggle:active {
  box-shadow: var(--shadow-pressed);
  transform: scale(0.92);
}

.chats-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
  letter-spacing: -0.02em;
}

.search-toggle {
  background: var(--bg-tertiary);
  border: none;
  font-size: 18px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 10px;
  border-radius: var(--radius-sm);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.search-toggle:hover {
  background: var(--bg-hover);
  box-shadow: var(--shadow-inset);
  transform: scale(0.95);
}

.search-toggle:active {
  box-shadow: var(--shadow-pressed);
  transform: scale(0.92);
}

.search-container {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: none;
  flex-shrink: 0;
  background: var(--bg-secondary);
}

.search-container.active {
  display: block;
}

.search-input {
  width: 100%;
  padding: 16px 20px;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: all var(--transition-fast);
  font-family: inherit;
  box-shadow: var(--shadow-inset);
  font-weight: 450;
}

.search-input:focus {
  box-shadow: 
    inset 3px 3px 6px var(--neu-shadow-dark),
    inset -3px -3px 6px var(--neu-shadow-light),
    0 0 0 3px rgba(74, 108, 247, 0.2);
}

.chats-list {
  flex: 1;
  overflow-y: auto;
  background: var(--bg-secondary);
  -webkit-overflow-scrolling: touch;
  padding: 12px;
}

/* Enhanced Chat Items - Perfect Neumorphism */
.chat-item {
  display: flex;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
  border-radius: var(--radius-lg);
  position: relative;
  margin-bottom: 12px;
  background: var(--bg-tertiary);
  box-shadow: var(--shadow-sm);
  border: 1px solid transparent;
}

.chat-item:hover {
  background: var(--bg-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-light);
}

.chat-item.active {
  background: var(--message-out-bg);
  box-shadow: var(--shadow-md);
}

.chat-item.active .chat-name,
.chat-item.active .chat-last-message,
.chat-item.active .chat-time {
  color: var(--message-out-text);
}

.chat-avatar {
  position: relative;
  margin-right: 16px;
  flex-shrink: 0;
}

.chat-avatar-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--neu-primary);
  color: var(--neu-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--border-light);
}

.chat-avatar-image {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--border-light);
}

.chat-info {
  flex: 1;
  min-width: 0;
}

.chat-name {
  font-weight: 650;
  color: var(--text-primary);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.chat-last-message {
  color: var(--text-secondary);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 400;
}

.chat-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.chat-time {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 500;
}

.chat-unread {
  background: var(--neu-primary);
  color: var(--neu-text);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 14px;
  min-width: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--border-light);
}

.empty-chats {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 60px 20px;
  text-align: center;
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 24px;
  opacity: 0.6;
  background: var(--bg-tertiary);
  width: 120px;
  height: 120px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

/* Messages Panel - Perfect Neumorphism */
.messages-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  position: relative;
  z-index: 5;
}

.messages-header {
  display: flex;
  align-items: center;
  padding: 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
  min-height: 72px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.back-button {
  background: var(--bg-tertiary);
  border: none;
  font-size: 18px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 10px;
  border-radius: var(--radius-sm);
  width: 44px;
  height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.back-button:hover {
  background: var(--bg-hover);
  box-shadow: var(--shadow-inset);
  transform: scale(0.95);
}

.back-button:active {
  box-shadow: var(--shadow-pressed);
  transform: scale(0.92);
}

.chat-info {
  flex: 1;
}

.no-chat-selected {
  text-align: center;
  color: var(--text-secondary);
}

.no-chat-selected h3 {
  margin-bottom: 4px;
  color: var(--text-primary);
  font-weight: 600;
}

.active-chat-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.chat-avatar-small {
  position: relative;
}

.chat-avatar-small-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--neu-primary);
  color: var(--neu-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--border-light);
}

.chat-avatar-small-image {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--border-light);
}

.chat-details {
  flex: 1;
}

.chat-title {
  font-weight: 650;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.chat-status {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 400;
}

.chat-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-toggle-mobile {
  background: var(--bg-tertiary);
  border: none;
  font-size: 18px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 10px;
  border-radius: var(--radius-sm);
  width: 44px;
  height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.info-toggle-mobile:hover {
  background: var(--bg-hover);
  box-shadow: var(--shadow-inset);
  transform: scale(0.95);
}

.info-toggle-mobile:active {
  box-shadow: var(--shadow-pressed);
  transform: scale(0.92);
}

/* Messages Area with Perfect Neumorphism */
.messages-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  overflow: hidden;
  position: relative;
}

.welcome-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 60px 20px;
  text-align: center;
  color: var(--text-secondary);
}

.welcome-icon {
  font-size: 80px;
  margin-bottom: 24px;
  opacity: 0.6;
  background: var(--bg-tertiary);
  width: 140px;
  height: 140px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.welcome-screen h2 {
  margin-bottom: 12px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 24px;
}

.messages-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  overflow-y: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-primary);
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  min-height: min-content;
}

/* Enhanced Messages with Avatars - Perfect Neumorphism */
.message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 70%;
  position: relative;
  animation: messageAppear 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}



@keyframes messageAppear {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.message.incoming {
  align-self: flex-start;
  flex-direction: row;
}

.message.outgoing {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-round);
  background: var(--neu-primary);
  color: var(--neu-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--border-light);
  flex-shrink: 0;
}

.message-avatar-image {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-round);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--border-light);
  flex-shrink: 0;
}

.message-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.message-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.message.incoming .message-header {
  justify-content: flex-start;
}

.message.outgoing .message-header {
  justify-content: flex-end;
  flex-direction: row-reverse;
}

.message-sender {
  font-weight: 650;
  color: var(--text-primary);
  font-size: 14px;
}

.message-bubble {
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  position: relative;
  word-wrap: break-word;
  box-shadow: var(--shadow-sm);
  border: 1px solid transparent;
  min-width: 120px;
}

.message.incoming .message-bubble {
  background: var(--message-in-bg);
  color: var(--message-in-text);
  border-bottom-left-radius: var(--radius-sm);
}

.message.outgoing .message-bubble {
  background: var(--message-out-bg);
  color: var(--message-out-text);
  border-bottom-right-radius: var(--radius-sm);
}

.message-text {
  line-height: 1.5;
  font-size: 15px;
  font-weight: 450;
}

.message-time {
  font-size: 12px;
  opacity: 0.7;
  text-align: right;
  margin-top: 4px;
  font-weight: 500;
}

.empty-messages {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: var(--text-secondary);
  flex: 1;
}

/* Message Input Area - Perfect Neumorphism */
.message-input-area {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  padding: 20px;
  position: relative;
  z-index: 20;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.input-container {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  max-width: 800px;
  margin: 0 auto;
}

.attach-widget,
.emoji-widget {
  background: var(--bg-tertiary);
  border: none;
  font-size: 18px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 12px;
  border-radius: var(--radius-md);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.attach-widget:hover,
.emoji-widget:hover {
  background: var(--bg-hover);
  box-shadow: var(--shadow-inset);
  transform: scale(0.95);
}

.attach-widget:active,
.emoji-widget:active {
  box-shadow: var(--shadow-pressed);
  transform: scale(0.92);
}

.message-input-wrapper {
  flex: 1;
  background: var(--bg-tertiary);
  border: none;
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  min-height: 48px;
  display: flex;
  align-items: center;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-inset);
}

.message-input-wrapper:focus-within {
  box-shadow: 
    inset 3px 3px 6px var(--neu-shadow-dark),
    inset -3px -3px 6px var(--neu-shadow-light),
    0 0 0 3px rgba(74, 108, 247, 0.2);
}

#messageInput {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  max-height: 120px;
  min-height: 20px;
  font-weight: 450;
}

#sendMessageBtn {
  background: var(--neu-primary);
  color: var(--neu-text);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

#sendMessageBtn:hover {
  background: var(--neu-primary-dark);
  box-shadow: var(--shadow-inset);
  transform: scale(0.95);
}

#sendMessageBtn:active {
  box-shadow: var(--shadow-pressed);
  transform: scale(0.92);
}

/* Info Panel - Perfect Neumorphism */
/*.info-panel {
  position: fixed;
  right: 0;
  width: 320px;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  position: fixed;
  z-index: 2000;
  box-shadow: var(--shadow-md);
}
*/
.info-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  height: 100%;
  background: var(--bg-secondary);
  z-index: 2000;
  transition: transform var(--transition-medium);
  box-shadow: var(--shadow-lg);
  border-left: 1px solid var(--border-light);
  transform: translateX(100%);
}

.info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-secondary);
  min-height: 72px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.info-header h3 {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 18px;
  letter-spacing: -0.02em;
}

.close-info {
  background: var(--bg-tertiary);
  border: none;
  font-size: 18px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 10px;
  border-radius: var(--radius-sm);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.close-info:hover {
  background: var(--bg-hover);
  box-shadow: var(--shadow-inset);
  transform: scale(0.95);
}

.close-info:active {
  box-shadow: var(--shadow-pressed);
  transform: scale(0.92);
}

.info-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
}

.info-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: var(--text-secondary);
}

.placeholder-icon {
  font-size: 64px;
  margin-bottom: 24px;
  opacity: 0.6;
  background: var(--bg-tertiary);
  width: 120px;
  height: 120px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.info-details {
  color: var(--text-primary);
}

.info-section {
  margin-bottom: 28px;
}

.info-section h4 {
  margin-bottom: 16px;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 16px;
  letter-spacing: -0.01em;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.info-label {
  font-weight: 600;
  color: var(--text-secondary);
  margin-right: 16px;
  font-size: 14px;
}

.info-value {
  color: var(--text-primary);
  text-align: right;
  flex: 1;
  font-size: 14px;
  font-weight: 450;
}

.info-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-action-btn {
  padding: 14px 18px;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 14px;
  transition: all var(--transition-fast);
  text-align: left;
  font-family: inherit;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.info-action-btn:hover {
  background: var(--bg-hover);
  box-shadow: var(--shadow-inset);
  transform: translateY(-1px);
}

.info-action-btn:active {
  box-shadow: var(--shadow-pressed);
  transform: translateY(0);
}

.info-action-btn.danger {
  background: linear-gradient(145deg, #fed7d7, #feb2b2);
  color: #c53030;
}

.info-action-btn.danger:hover {
  background: linear-gradient(145deg, #feb2b2, #fc8181);
}

[data-theme="dark"] .info-action-btn.danger {
  background: linear-gradient(145deg, #742a2a, #5c2222);
  color: #fc8181;
}

[data-theme="dark"] .info-action-btn.danger:hover {
  background: linear-gradient(145deg, #5c2222, #441a1a);
}

/* Buttons - Perfect Neumorphism */
.btn-primary {
  background: var(--neu-primary);
  color: var(--neu-text);
  border: none;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all var(--transition-fast);
  font-family: inherit;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  letter-spacing: -0.01em;
}

.btn-primary:hover {
  background: var(--neu-primary-dark);
  box-shadow: var(--shadow-inset);
  transform: translateY(-1px);
}

.btn-primary:active {
  box-shadow: var(--shadow-pressed);
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: none;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 15px;
  transition: all var(--transition-fast);
  font-family: inherit;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  font-weight: 500;
}

.btn-secondary:hover {
  background: var(--bg-hover);
  box-shadow: var(--shadow-inset);
  transform: translateY(-1px);
}

.btn-secondary:active {
  box-shadow: var(--shadow-pressed);
  transform: translateY(0);
}

/* Modal Windows - Perfect Neumorphism */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(8px);
}

.modal-content {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border-light);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-sm);
}

.modal-header h3 {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 18px;
  letter-spacing: -0.02em;
}

.close-modal {
  background: var(--bg-tertiary);
  border: none;
  font-size: 18px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 10px;
  border-radius: var(--radius-sm);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.close-modal:hover {
  background: var(--bg-hover);
  box-shadow: var(--shadow-inset);
  transform: scale(0.95);
}

.close-modal:active {
  box-shadow: var(--shadow-pressed);
  transform: scale(0.92);
}

.modal-body {
  padding: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
  letter-spacing: -0.01em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 16px 20px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: all var(--transition-fast);
  font-family: inherit;
  box-shadow: var(--shadow-inset);
  font-weight: 450;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  box-shadow: 
    inset 3px 3px 6px var(--neu-shadow-dark),
    inset -3px -3px 6px var(--neu-shadow-light),
    0 0 0 3px rgba(74, 108, 247, 0.2);
}

.form-group small {
  display: block;
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 400;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 28px;
}

/* Context Menu - Perfect Neumorphism */
.context-menu {
  position: fixed;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 1200;
  min-width: 200px;
  border: 1px solid var(--border-light);
  backdrop-filter: blur(10px);
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-primary);
  text-decoration: none;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-size: 14px;
  border-radius: var(--radius-md);
  font-weight: 500;
}

.context-menu-item:hover {
  background: var(--bg-hover);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.context-menu-item:active {
  box-shadow: var(--shadow-pressed);
  transform: translateY(0);
}

.context-menu-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* Global Info Toggle - Perfect Neumorphism */
.info-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-round);
  background: var(--neu-primary);
  color: var(--neu-text);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-md);
  z-index: 999;
  transition: all var(--transition-medium);
  font-weight: 600;
}

.info-toggle:hover {
  background: var(--neu-primary-dark);
  box-shadow: var(--shadow-lg);
  transform: scale(1.05) translateY(-2px);
}

.info-toggle:active {
  box-shadow: var(--shadow-pressed);
  transform: scale(0.95) translateY(0);
}

.info-toggle.active {
  background: var(--text-secondary);
  transform: rotate(90deg);
}

/* Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-medium), visibility var(--transition-medium);
  backdrop-filter: blur(4px);
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Hidden Elements */
.hidden {
  display: none !important;
}

/* Auth Styles - Perfect Neumorphism */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-primary);
  padding: 20px;
}

.auth-form {
  background: var(--bg-secondary);
  padding: 40px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 440px;
  border: 1px solid var(--border-light);
}

.auth-form h2 {
  text-align: center;
  margin-bottom: 32px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.auth-links {
  text-align: center;
  margin-top: 24px;
}

.auth-links a {
  color: var(--neu-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.auth-links a:hover {
  color: var(--neu-primary-dark);
  text-decoration: underline;
}

.error-message {
  background: linear-gradient(145deg, #fed7d7, #feb2b2);
  color: #c53030;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-top: 20px;
  border: 1px solid rgba(197, 48, 48, 0.3);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .error-message {
  background: linear-gradient(145deg, #742a2a, #5c2222);
  color: #fc8181;
  border: 1px solid rgba(252, 129, 129, 0.3);
}

