/* FrutiPhone — Part 1 Placeholder UI */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* ── ELECTRON TITLE BAR ── */
#electron-titlebar {
  display: none; /* hidden in browser */
  position: fixed; top: 0; left: 0; right: 0; height: 32px; z-index: 9999;
  -webkit-app-region: drag;
  background: linear-gradient(to bottom, rgba(8,18,34,0.98), rgba(6,14,26,0.96));
  border-bottom: 1px solid rgba(126,207,255,0.12);
  align-items: center; justify-content: space-between;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(126,207,255,0.08), inset 0 1px 0 rgba(255,255,255,0.06);
}
/* Show only inside Electron (attribute set by main.js) */
html[data-electron] #electron-titlebar { display: flex; }
html[data-electron] body { padding-top: 32px; }
html[data-electron] #btn-download-app-wrap { display: none !important; }

.etb-left {
  display: flex; align-items: center; gap: 8px;
  padding: 0 14px; font-size: 0.76rem; color: #7ecfff;
  font-weight: 700; letter-spacing: 0.05em;
}
.etb-icon { width: 14px; height: 14px; object-fit: contain; }
.etb-title { opacity: 0.9; }
.etb-controls {
  display: flex; -webkit-app-region: no-drag;
}
.etb-btn {
  width: 46px; height: 32px; background: none; border: none;
  color: #88a0b8; cursor: pointer; font-size: 0.85rem;
  transition: background 0.12s, color 0.12s;
  display: flex; align-items: center; justify-content: center;
}
.etb-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }
.etb-close:hover { background: rgba(220,50,47,0.85) !important; color: #fff !important; }

body {
  background: #1a2233;
  color: #e0e8f0;
  height: 100vh;
  overflow: hidden;
}

.screen { width: 100%; height: 100vh; }

/* ── AUTH ── */
#auth-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #0d1b2a, #1a3a5c);
}
.auth-box {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 36px 40px;
  width: 360px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.logo { font-size: 2rem; text-align: center; color: #7ecfff; }
.tagline { text-align: center; color: #88a0b8; font-size: 0.85rem; }
.tabs { display: flex; gap: 8px; }
.tab {
  flex: 1; padding: 8px; border: 1px solid rgba(255,255,255,0.15);
  background: transparent; color: #88a0b8; border-radius: 8px; cursor: pointer;
}
.tab.active { background: #2a6ea6; color: #fff; border-color: #3a8fd6; }
.tab-content { display: flex; flex-direction: column; gap: 10px; }
.auth-box input {
  padding: 10px 14px; border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05); color: #e0e8f0;
  border-radius: 8px; font-size: 0.95rem; outline: none;
}
.auth-box input:focus { border-color: #3a8fd6; }
.auth-box button {
  padding: 10px; background: #2a6ea6; color: #fff;
  border: none; border-radius: 8px; cursor: pointer; font-size: 0.95rem;
}
.auth-box button:hover { background: #3a8fd6; }
.error-msg { color: #ff7070; font-size: 0.85rem; min-height: 18px; }

/* ── MAIN APP LAYOUT ── */
#main-app {
  display: flex;
  height: 100vh;
}

/* Server rail */
#server-rail {
  width: 64px;
  background: #0d1520;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
  gap: 8px;
  overflow-y: auto;
}
.server-icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: #1e3550; border: 2px solid transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.1rem; transition: all 0.15s;
  color: #88a0b8;
}
.server-icon:hover, .server-icon.active {
  border-color: #3a8fd6; background: #2a4a6a; color: #fff;
}
#btn-add-server {
  width: 46px; height: 46px; border-radius: 50%;
  background: #1e3550; border: 2px dashed #2a6ea6;
  color: #3a8fd6; font-size: 1.3rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  margin-top: auto;
}
#btn-add-server:hover { background: #2a4a6a; }

/* Channel sidebar */
#channel-sidebar {
  width: 220px;
  background: #111d2e;
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  border-right: 1px solid rgba(255,255,255,0.06);
}
#server-name {
  font-weight: 700; font-size: 0.95rem;
  padding: 4px 14px 12px; color: #7ecfff;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 8px;
}
.sidebar-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: #557; padding: 4px 14px; font-weight: 600;
}
.channel-item {
  padding: 6px 14px; cursor: pointer; border-radius: 6px;
  margin: 1px 6px; color: #88a0b8; font-size: 0.9rem;
  display: flex; align-items: center; gap: 6px;
}
.channel-item:hover, .channel-item.active { background: #1e3550; color: #fff; }
#dm-section { margin-top: auto; border-top: 1px solid rgba(255,255,255,0.06); padding-top: 8px; }
.dm-item {
  padding: 6px 14px; cursor: pointer; border-radius: 6px;
  margin: 1px 6px; color: #88a0b8; font-size: 0.9rem;
}
.dm-item:hover, .dm-item.active { background: #1e3550; color: #fff; }


/* Chat area */
#chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #151f2e;
}
#chat-header { display: none !important; }
#messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.msg {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.msg-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.msg-author { font-weight: 600; color: #7ecfff; font-size: 0.9rem; }
.msg-time { font-size: 0.72rem; color: #445; }
.msg-content { color: #c8dae8; font-size: 0.93rem; padding-left: 2px; }
#input-area {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: #111d2e;
}
#msg-input {
  flex: 1;
  padding: 10px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #e0e8f0;
  font-size: 0.95rem;
  outline: none;
}
#msg-input:focus { border-color: #2a6ea6; }
#btn-send {
  padding: 10px 20px;
  background: #2a6ea6; color: #fff;
  border: none; border-radius: 8px; cursor: pointer;
}
#btn-send:hover { background: #3a8fd6; }

/* Right panel */
#right-panel {
  width: 220px;
  background: #111d2e;
  border-left: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  gap: 8px;
  overflow-y: auto;
}
.panel-section { padding: 4px 0; }
.member-item, .friend-item, .request-item {
  padding: 5px 14px;
  font-size: 0.88rem;
  color: #88a0b8;
  display: flex;
  align-items: center;
  gap: 6px;
}
.online-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #4caf50; flex-shrink: 0;
}
.request-item { flex-direction: column; align-items: flex-start; gap: 4px; }
.request-actions { display: flex; gap: 6px; }
.request-actions button {
  padding: 3px 10px; font-size: 0.78rem; border-radius: 5px;
  border: none; cursor: pointer;
}
.btn-accept { background: #2e7d32; color: #fff; }
.btn-reject { background: #5c2020; color: #fff; }
#btn-add-friend {
  margin: 4px 10px; padding: 5px 10px;
  background: transparent; border: 1px solid #2a6ea6;
  color: #3a8fd6; border-radius: 6px; cursor: pointer; font-size: 0.8rem; width: calc(100% - 20px);
}
#btn-add-friend:hover { background: #1e3550; }
.user-footer {
  margin-top: auto;
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; gap: 8px;
}
#current-username { flex: 1; font-size: 0.9rem; color: #7ecfff; font-weight: 600; }
#btn-logout {
  padding: 4px 10px; background: #2a2a3a;
  border: 1px solid rgba(255,255,255,0.1);
  color: #88a0b8; border-radius: 6px; cursor: pointer; font-size: 0.8rem;
}
#btn-logout:hover { background: #3a2020; color: #ff7070; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.modal {
  background: #111d2e;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 28px;
  width: 320px;
  display: flex; flex-direction: column; gap: 12px;
}
.modal h3 { color: #7ecfff; }
.modal input {
  padding: 10px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px; color: #e0e8f0; font-size: 0.95rem; outline: none;
}
.modal-buttons { display: flex; gap: 10px; }
.modal-buttons button {
  flex: 1; padding: 9px;
  border-radius: 8px; border: none; cursor: pointer; font-size: 0.9rem;
}
.btn-primary { background: #2a6ea6; color: #fff; }
.btn-cancel { background: #1e2e3e; color: #88a0b8; border: 1px solid rgba(255,255,255,0.1) !important; }
.modal-error { color: #ff7070; font-size: 0.83rem; }

/* ── PART 2 ADDITIONS ── */

/* Chat header actions */
#chat-header { display: flex; align-items: center; justify-content: space-between; }
#chat-actions { display: flex; gap: 6px; }
.hdr-btn {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: #88a0b8; padding: 5px 10px; border-radius: 6px; cursor: pointer; font-size: 0.85rem;
}
.hdr-btn:hover { background: #1e3550; color: #fff; }

/* Input area */
#input-area { align-items: center; }
.input-btn {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: #88a0b8; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 0.85rem;
  flex-shrink: 0;
}
.input-btn:hover { background: #1e3550; color: #fff; }

/* Upload preview */
#upload-preview {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 20px; background: #0d1520;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.85rem; color: #7ecfff;
}
#btn-cancel-upload {
  background: none; border: none; color: #ff7070; cursor: pointer; font-size: 1rem;
}

/* Message context menu */
.msg { position: relative; padding: 4px 6px; border-radius: 6px; }
.msg:hover { background: rgba(255,255,255,0.03); }
.msg:hover .msg-actions { display: flex; }
.msg-actions {
  display: none; position: absolute; right: 8px; top: 4px;
  gap: 4px; align-items: center;
}
.msg-action-btn {
  background: #1e3550; border: 1px solid rgba(255,255,255,0.12);
  color: #88a0b8; padding: 3px 8px; border-radius: 5px;
  cursor: pointer; font-size: 0.75rem;
}
.msg-action-btn:hover { background: #2a4a6a; color: #fff; }

/* File / image in messages */
.msg-image { max-width: 320px; max-height: 240px; border-radius: 8px; margin-top: 6px; cursor: pointer; }
.msg-file {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 8px 14px; margin-top: 6px;
  color: #7ecfff; text-decoration: none; font-size: 0.88rem;
}
.msg-file:hover { background: #1e3550; }
.msg-audio { margin-top: 6px; width: 280px; }
.msg-edited { font-size: 0.72rem; color: #445; margin-left: 4px; }
.msg-pinned-indicator { font-size: 0.72rem; color: #a0701a; margin-left: 4px; }

/* Pinned / soundboard panels */
#pinned-panel, #soundboard-panel {
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: #0d1520; max-height: 200px; overflow-y: auto;
}
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px; font-size: 0.85rem; font-weight: 600; color: #7ecfff;
}
.panel-header button { background: none; border: none; color: #88a0b8; cursor: pointer; }
.pinned-msg {
  padding: 6px 16px; border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.85rem; color: #c0d8f0;
}
.pinned-msg strong { color: #7ecfff; }
.sound-btn {
  margin: 4px 8px; padding: 6px 14px;
  background: #1e3550; border: 1px solid rgba(255,255,255,0.1);
  color: #c0d8f0; border-radius: 6px; cursor: pointer; font-size: 0.85rem;
}
.sound-btn:hover { background: #2a6ea6; color: #fff; }

/* GIF picker */
#gif-picker {
  position: fixed; bottom: 70px; left: 50%; transform: translateX(-50%);
  z-index: 200; width: 480px;
}
.gif-picker-inner {
  background: #111d2e; border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px; overflow: hidden;
}
.gif-header {
  display: flex; align-items: center; gap: 6px; padding: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-wrap: nowrap;
}
/* Main media tabs (GIF / Emoji) */
.gif-main-tabs { display: flex; gap: 3px; flex-shrink: 0; }
.gif-main-tab {
  padding: 5px 10px; border-radius: 7px; border: 1px solid rgba(255,255,255,0.1);
  background: transparent; color: #88a0b8; cursor: pointer; font-size: 0.88rem;
  transition: all 0.12s;
}
.gif-main-tab.active { background: #2a6ea6; color: #fff; border-color: #3a8fd6; }
#gif-search {
  flex: 1; padding: 7px 12px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 7px; color: #e0e8f0; font-size: 0.88rem; outline: none;
  min-width: 0;
}
.gif-tab {
  padding: 6px 12px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.1);
  background: transparent; color: #88a0b8; cursor: pointer; font-size: 0.8rem;
  flex-shrink: 0;
}
.gif-tab.active { background: #2a6ea6; color: #fff; border-color: #3a8fd6; }
#btn-close-gif { background: none; border: none; color: #88a0b8; cursor: pointer; font-size: 1.1rem; flex-shrink: 0; }
#gif-results {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  padding: 8px; max-height: 300px; overflow-y: auto;
}
#emoji-results { max-height: 320px; overflow-y: auto; }
.gif-item { position: relative; border-radius: 6px; overflow: hidden; cursor: pointer; }
.gif-item img { width: 100%; height: 100px; object-fit: cover; display: block; }
.gif-fav-btn {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,0.6); border: none; color: #ffd700;
  border-radius: 4px; padding: 2px 5px; cursor: pointer; font-size: 0.8rem;
}
.gif-loading { color: #445; text-align: center; padding: 20px; grid-column: 1/-1; }
/* Media picker button */
#btn-media-picker { min-width: 36px; font-size: 1rem; }

/* Poke toast */
#poke-toast {
  position: fixed; bottom: 30px; right: 30px;
  background: #2a6ea6; color: #fff;
  padding: 12px 20px; border-radius: 10px;
  font-size: 0.9rem; z-index: 300;
  animation: slideIn 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Context menu */
.ctx-menu {
  position: fixed; background: #111d2e;
  border: 1px solid rgba(255,255,255,0.12); border-radius: 8px;
  padding: 4px 0; z-index: 400; min-width: 160px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.ctx-item {
  padding: 8px 16px; cursor: pointer; font-size: 0.88rem; color: #c0d8f0;
}
.ctx-item:hover { background: #1e3550; }
.ctx-item.danger { color: #ff7070; }
.ctx-item.danger:hover { background: #3a1515; }

/* ── CALLS (Part 3) ── */
#call-overlay, #incoming-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex; align-items: center; justify-content: center;
  z-index: 500;
}
#call-box, #incoming-box {
  background: #111d2e;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 32px 40px;
  display: flex; flex-direction: column;
  align-items: center; gap: 16px;
  min-width: 300px;
}
#call-status { color: #88a0b8; font-size: 0.9rem; }
#call-user, #incoming-user { color: #7ecfff; font-size: 1.3rem; font-weight: 700; }
#incoming-label { color: #88a0b8; font-size: 0.9rem; }
#incoming-actions, #call-controls { display: flex; gap: 12px; margin-top: 8px; }
.call-btn {
  width: 52px; height: 52px; border-radius: 50%;
  border: none; cursor: pointer; font-size: 1.3rem;
  background: #1e3550; color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.call-btn:hover { background: #2a6ea6; }
.call-btn.danger { background: #c0392b; }
.call-btn.danger:hover { background: #e74c3c; }
.call-btn.green { background: #2e7d32; }
.call-btn.green:hover { background: #388e3c; }
#video-area {
  display: flex; position: relative;
  width: 480px; height: 270px;
  background: #000; border-radius: 10px; overflow: hidden;
}
#remote-video { width: 100%; height: 100%; object-fit: cover; }
#local-video {
  position: absolute; bottom: 10px; right: 10px;
  width: 120px; height: 80px; object-fit: cover;
  border-radius: 6px; border: 2px solid rgba(255,255,255,0.2);
}

/* ── PROFILES (Part 4) ── */
.profile-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 500;
}
.profile-window {
  background: #111d2e; border-radius: 14px;
  width: 360px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.profile-window.frame-glow-blue { box-shadow: 0 0 30px rgba(58,143,214,0.5), 0 8px 40px rgba(0,0,0,0.5); }
.profile-window.frame-glow-pink { box-shadow: 0 0 30px rgba(214,58,143,0.5), 0 8px 40px rgba(0,0,0,0.5); }
.profile-window.frame-glow-green { box-shadow: 0 0 30px rgba(58,214,143,0.5), 0 8px 40px rgba(0,0,0,0.5); }
.profile-window.frame-sharp { border-radius: 0; }
.profile-window.frame-rounded { border-radius: 24px; }
.profile-banner {
  height: 100px; background-size: cover; background-position: center;
  position: relative;
}
.profile-close {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,0.5); border: none; color: #fff;
  border-radius: 50%; width: 28px; height: 28px; cursor: pointer; font-size: 0.9rem;
}
.profile-edit-btn {
  position: absolute; top: 8px; left: 8px;
  background: rgba(0,0,0,0.5); border: none; color: #fff;
  border-radius: 6px; padding: 4px 10px; cursor: pointer; font-size: 0.8rem;
}
.profile-avatar-wrap { display: flex; padding: 0 16px; margin-top: -40px; }
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  border: 3px solid #111d2e; background: #1e3550;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; background-size: cover; background-position: center;
  position: relative; overflow: hidden; cursor: pointer;
}
.avatar-edit-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0.6);
  display: none; align-items: center; justify-content: center;
  font-size: 1.3rem; cursor: pointer;
}
.profile-avatar:hover .avatar-edit-overlay { display: flex; }
.profile-body { padding: 8px 16px 20px; }
.profile-name { font-size: 1.2rem; font-weight: 700; margin-bottom: 2px; }
.profile-username { color: #557; font-size: 0.82rem; margin-bottom: 8px; }
.profile-status { font-size: 0.88rem; color: #88a0b8; margin-bottom: 4px; }
.profile-activity { font-size: 0.82rem; color: #557; margin-bottom: 6px; }
.profile-bio { font-size: 0.88rem; color: #c0d8f0; margin: 8px 0; line-height: 1.5; }
.profile-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.profile-link {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: #7ecfff; padding: 4px 10px; border-radius: 6px; text-decoration: none; font-size: 0.82rem;
}
.profile-link:hover { background: #1e3550; }

/* Self avatar in footer */
#self-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: #1e3550; background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 0.9rem; flex-shrink: 0;
}

/* Edit profile modal */
.edit-profile-modal { width: 420px; max-height: 80vh; overflow-y: auto; }
.edit-profile-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.ep-tab {
  padding: 5px 10px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.1);
  background: transparent; color: #88a0b8; cursor: pointer; font-size: 0.78rem;
}
.ep-tab.active { background: #2a6ea6; color: #fff; }
.ep-content { display: flex; flex-direction: column; gap: 8px; }
.ep-content label { font-size: 0.78rem; color: #88a0b8; text-transform: uppercase; letter-spacing: 0.05em; }
.ep-content input, .ep-content textarea, .ep-content select {
  padding: 8px 12px; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 7px;
  color: #e0e8f0; font-size: 0.9rem; outline: none;
}
.ep-content textarea { resize: vertical; }
.ep-content select option { background: #111d2e; }
.color-row { display: flex; align-items: center; gap: 12px; }
.frame-options { display: flex; flex-wrap: wrap; gap: 6px; }
.frame-opt {
  padding: 5px 12px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer; font-size: 0.8rem; color: #88a0b8;
}
.frame-opt.active { border-color: #3a8fd6; background: #1e3550; color: #fff; }
.inline-btn { background: none; border: none; color: #3a8fd6; cursor: pointer; font-size: 0.85rem; text-decoration: underline; }
.link-item { display: flex; align-items: center; justify-content: space-between; padding: 6px; background: rgba(255,255,255,0.04); border-radius: 6px; font-size: 0.85rem; }
.btn-del-link, .btn-del-layout { background: none; border: none; color: #ff7070; cursor: pointer; }
.layout-item { display: flex; align-items: center; justify-content: space-between; padding: 6px; background: rgba(255,255,255,0.04); border-radius: 6px; font-size: 0.85rem; margin-bottom: 4px; }

/* Avatar editor */
.avatar-editor-area { display: flex; gap: 16px; align-items: flex-start; }
#avatar-preview-wrap { width: 200px; height: 200px; position: relative; }
#avatar-canvas { border-radius: 50%; display: block; }
#avatar-placeholder { width: 200px; height: 200px; border-radius: 50%; background: #1e3550; display: flex; align-items: center; justify-content: center; color: #445; font-size: 0.85rem; }
.avatar-controls { display: flex; flex-direction: column; gap: 10px; flex: 1; }
#crop-controls { display: flex; flex-direction: column; gap: 8px; }
#crop-controls label { display: flex; flex-direction: column; gap: 4px; font-size: 0.78rem; color: #88a0b8; }

/* ── DM PROFILE HEADER ── */
#dm-profile-header {
  display: none;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  position: relative;
}
#dm-profile-header[style*="display: block"],
#dm-profile-header[style*="display:block"] {
  display: block !important;
}
.dm-profile-inner {
  display: flex; align-items: flex-end; gap: 14px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
  min-height: 100px;
}
.dm-profile-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.2); background: #1e3550;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
  cursor: pointer; background-size: cover; background-position: center;
}
.dm-profile-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.dm-profile-name { font-size: 1rem; font-weight: 700; text-shadow: 0 1px 4px rgba(0,0,0,0.6); }
.dm-profile-user { font-size: 0.75rem; color: rgba(255,255,255,0.55); }
.dm-profile-status { font-size: 0.8rem; color: #88a0b8; }
.dm-profile-bio { font-size: 0.8rem; color: #88a0b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.dm-profile-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.dm-header-actions {
  display: flex; gap: 5px; align-items: center; flex-shrink: 0;
}
.dm-hdr-btn {
  background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.15);
  color: #c0d8f0; padding: 5px 8px; border-radius: 7px; cursor: pointer;
  font-size: 0.85rem; backdrop-filter: blur(6px);
  transition: background 0.12s;
}
.dm-hdr-btn:hover { background: rgba(42,110,166,0.55); color: #fff; }
.dm-hdr-btn:active { transform: scale(0.92); }

/* ── PROFILE BANNER BUTTONS FIX ── */
.profile-banner-btns {
  position: absolute; top: 8px; right: 8px;
  display: flex; gap: 6px; align-items: center;
}
.profile-banner-action {
  background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.15);
  color: #fff; padding: 5px 10px; border-radius: 7px;
  cursor: pointer; font-size: 0.8rem; backdrop-filter: blur(4px);
}
.profile-banner-action:hover { background: rgba(0,0,0,0.75); }
.profile-banner { position: relative; }

/* Font select preview */
#ep-name-font { font-size: 1rem; }

/* Bio color row */
#ep-bio-preview { font-size: 0.88rem; }

/* Typing indicator */
#typing-indicator {
  display: none;
  padding: 4px 20px 0;
  font-size: 0.78rem;
  color: #557;
  font-style: italic;
  min-height: 18px;
}

/* Crop labels */
.crop-label {
  display: flex; flex-direction: column; gap: 3px;
  font-size: 0.78rem; color: #88a0b8;
}
.crop-label input[type=range] { width: 100%; cursor: pointer; }

/* Poke button in DM header */
.dm-poke-btn {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  color: #88a0b8; padding: 4px 12px; border-radius: 6px;
  cursor: pointer; font-size: 0.8rem; margin-top: 4px; align-self: flex-start;
}
.dm-poke-btn:hover { background: #2a6ea6; color: #fff; }

/* ── FRIEND LIST WITH AVATAR ── */
.friend-item { display: flex; align-items: center; gap: 8px; padding: 5px 14px; }
.friend-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: #1e3550; display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; flex-shrink: 0; background-size: cover; background-position: center;
}
.friend-name { font-size: 0.88rem; font-weight: 600; }

/* ── LAYOUT & BACKGROUND FIXES (Part 4 fix4) ── */

/* User footer: dynamic background applied via JS */
.user-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 10px 12px;
  display: flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(6px);
}
#self-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: #1e3550; background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem; flex-shrink: 0;
}
#current-username {
  flex: 1; font-size: 0.9rem; font-weight: 600; color: #7ecfff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Messages area respects bg set via JS — don't hard-code background here */
#messages { background: transparent; }

/* Chat area background: set dynamically, fallback dark */
#chat-area { background: #151f2e; }

/* DM profile header: overlay tint for readability when banner shows */
.dm-profile-header { backdrop-filter: none; }

/* Members section hidden by default in DM mode */
#members-section { display: block; }
#members-section.hidden { display: none; }

/* ── LAYOUT RESTRUCTURE ── */
#left-sidebar {
  width: 220px;
  background: #111d2e;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
}
#channel-sidebar {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
#dm-sidebar {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding-bottom: 8px;
}
.sidebar-divider {
  border-top: 1px solid rgba(255,255,255,0.06);
  margin: 8px 0;
}
/* Hide old right panel friends section since it moved */
#right-panel { width: 180px; }

/* ── FIXES (part4-fix5) ── */

/* Channel sidebar — not full height, compact */
#channel-sidebar {
  width: auto !important;
  border-right: none !important;
  padding: 8px 0 !important;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

/* Left sidebar fixed width */
#left-sidebar { width: 200px !important; }

/* Right panel narrower */
#right-panel { width: 160px !important; }

/* User footer — don't truncate name */
#current-username {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}
.user-footer { min-width: 0; }

/* Profile card body background */
.profile-body {
  background: var(--profile-bg, transparent);
  transition: background 0.2s;
}

/* DM sidebar scrollable */
#dm-sidebar { overflow-y: auto; }
#dm-list { flex-shrink: 0; }

/* DM mode — show dm-sidebar, hide channel stuff */
#dm-sidebar { padding: 0 0 8px; }

/* ── LAYOUT FINAL FIX ── */
#left-sidebar {
  width: 260px !important;
  min-width: 260px !important;
  max-width: 260px !important;
  flex-shrink: 0 !important;
}
#channel-sidebar {
  width: 100% !important;
  min-width: 0 !important;
  border-right: none !important;
}
#right-panel {
  width: 160px !important;
  min-width: 160px !important;
  flex-shrink: 0 !important;
}
#current-username {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  font-size: 0.88rem;
}
.user-footer {
  flex-shrink: 0;
  min-width: 0;
  overflow: hidden;
}
#self-avatar { flex-shrink: 0; }
#btn-logout { flex-shrink: 0; font-size: 0.75rem; padding: 4px 8px; }

/* ══════════════════════════════════════
   FINAL LAYOUT — overrides everything above
   ══════════════════════════════════════ */
#main-app { display: flex; height: 100vh; overflow: hidden; }

#server-rail {
  width: 60px !important; min-width: 60px !important; flex-shrink: 0 !important;
}

#left-sidebar {
  width: 260px !important; min-width: 260px !important; max-width: 260px !important;
  flex-shrink: 0 !important; display: flex !important; flex-direction: column !important;
  background: #111d2e; border-right: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
}

#channel-sidebar {
  display: flex; flex-direction: column;
  flex: 1; min-height: 0; overflow-y: auto;
  width: 100% !important; border-right: none !important; padding: 8px 0 !important;
}

#dm-sidebar {
  display: flex; flex-direction: column;
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 0 0 8px;
}

#chat-area { flex: 1 !important; min-width: 0 !important; display: flex; flex-direction: column; }

#right-panel {
  width: 170px !important; min-width: 170px !important; flex-shrink: 0 !important;
  background: #111d2e; border-left: 1px solid rgba(255,255,255,0.06);
  display: flex; flex-direction: column; padding: 12px 0; overflow-y: auto;
}

/* Footer */
.user-footer {
  flex-shrink: 0 !important; display: flex !important; align-items: center !important;
  gap: 8px !important; padding: 10px 12px !important;
  border-top: 1px solid rgba(255,255,255,0.06);
  min-width: 0; overflow: hidden;
  margin-top: auto;
}
#self-avatar { flex-shrink: 0 !important; width: 30px !important; height: 30px !important; }
#current-username {
  flex: 1 !important; min-width: 0 !important;
  overflow: hidden !important; text-overflow: ellipsis !important;
  white-space: nowrap !important; font-size: 0.88rem !important;
}
#btn-logout { flex-shrink: 0 !important; font-size: 0.75rem !important; padding: 3px 8px !important; }

/* Sidebar section title */
.sidebar-section-title {
  font-weight: 700; font-size: 0.88rem; color: #7ecfff;
  padding: 12px 14px 6px;
}
.sidebar-divider { border-top: 1px solid rgba(255,255,255,0.06); margin: 8px 0; }

/* DM items */
.dm-item {
  padding: 6px 14px; cursor: pointer; border-radius: 6px;
  margin: 1px 6px; color: #88a0b8; font-size: 0.88rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dm-item:hover { background: #1e3550; color: #fff; }

/* Friend list items */
.friend-item {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 12px; min-width: 0;
}
.friend-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: #1e3550; display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; background-size: cover; background-position: center;
}
.friend-name {
  font-size: 0.85rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}

/* Add friend button */
#btn-add-friend {
  margin: 4px 10px; padding: 5px 10px; width: calc(100% - 20px);
  background: transparent; border: 1px solid #2a6ea6;
  color: #3a8fd6; border-radius: 6px; cursor: pointer; font-size: 0.8rem;
}
#btn-add-friend:hover { background: #1e3550; }

/* ── FRIENDS RAIL BUTTON ── */
.friends-rail-btn {
  width: 46px; height: 46px; border-radius: 12px;
  background: transparent; border: 2px solid transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 4px; margin: 4px auto 0;
  transition: all 0.15s;
}
.friends-rail-btn img {
  width: 38px; height: 38px; object-fit: contain;
  border-radius: 8px;
}
.friends-rail-btn:hover { border-color: #3a8fd6; background: rgba(58,143,214,0.15); }
.friends-rail-btn.active { border-color: #3a8fd6; background: rgba(58,143,214,0.2); }
.rail-divider {
  width: 32px; height: 1px; background: rgba(255,255,255,0.1);
  margin: 6px auto;
}



/* ── WIDER PROFILE MODAL ── */
.profile-window {
  width: 440px !important;
}
.profile-banner {
  height: 130px !important;
  background-size: cover !important;
  background-position: center !important;
}
.profile-body {
  padding: 10px 20px 24px !important;
}

/* ── WIDER EDIT PROFILE MODAL ── */
.edit-profile-modal {
  width: 500px !important;
  max-height: 85vh !important;
}
.image-editor-modal {
  width: 520px !important;
}




/* ── USER FOOTER BACKGROUND ── */
#user-footer {
  background-size: var(--footer-bg-size, auto) !important;
  background-repeat: repeat !important;
}

/* ── BACKGROUND EDITOR TWO-COLUMN ── */
.bg-editor-cols { display: flex; gap: 12px; width: 100%; }
.bg-editor-col { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.bg-section-title { font-size: 0.8rem; font-weight: 700; color: #7ecfff; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px; }

/* Avatar bar (between banner and body) */
.profile-avatar-wrap { transition: background-color 0.2s; }

/* ── BUTTON PRESS FEEDBACK ── */
.hdr-btn, .input-btn, .call-btn, .btn-primary, .btn-cancel, .friends-rail-btn, .server-icon {
  transition: transform 0.08s ease, opacity 0.08s ease;
}
.hdr-btn:active, .input-btn:active, .call-btn:active, .btn-primary:active, .btn-cancel:active {
  transform: scale(0.91);
  opacity: 0.85;
}
.friends-rail-btn:active, .server-icon:active {
  transform: scale(0.88);
  opacity: 0.8;
}
#btn-send:active { transform: scale(0.93); }

/* ── CHATBOX STYLES ── */
#messages.chatbox-bubbles .msg {
  background: rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 8px 12px;
  margin: 2px 0;
  max-width: 80%;
}
#messages.chatbox-compact .msg { padding: 2px 6px; gap: 0; }
#messages.chatbox-compact .msg-header { font-size: 0.75rem; }
#messages.chatbox-compact .msg-content { font-size: 0.85rem; }
#messages.chatbox-minimal .msg-header .msg-author { display: none; }
#messages.chatbox-minimal .msg-time { font-size: 0.68rem; }

/* ── DM DECORATION FIXES ── */
/* Background size must use px not % for tiling */
#chat-area[style*="background-image"] {
  background-attachment: local;
}

/* ── SPEECH BUBBLE MESSAGES ── */
#messages {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 20px;
}

.msg {
  display: flex;
  flex-direction: column;
  position: relative;
  max-width: 72%;
  align-self: flex-start; /* received = left */
  margin-bottom: 2px;
  padding: 0 !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

/* My messages align right */
.msg.mine {
  align-self: flex-end;
}

/* Header row */
.msg-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 0 4px;
  margin-bottom: 2px;
}
.msg.mine .msg-header {
  flex-direction: row-reverse;
}

/* The bubble itself */
.msg-bubble {
  position: relative;
  background: linear-gradient(
    135deg,
    rgba(30, 50, 80, 0.55) 0%,
    rgba(10, 18, 35, 0.75) 100%
  );
  border: 1px solid rgba(255,255,255,0.13);
  border-bottom-color: rgba(255,255,255,0.04);
  border-radius: 0 12px 12px 12px;
  padding: 8px 14px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),   /* top gloss line */
    inset 0 -1px 0 rgba(0,0,0,0.25),
    0 4px 16px rgba(0,0,0,0.35),
    0 1px 3px rgba(0,0,0,0.2);
  backdrop-filter: blur(14px) saturate(1.6) brightness(1.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.6) brightness(1.08);
  word-break: break-word;
}

.msg.mine .msg-bubble {
  border-radius: 12px 12px 0 12px;
  background: linear-gradient(
    135deg,
    rgba(42, 90, 160, 0.55) 0%,
    rgba(15, 35, 80, 0.75) 100%
  );
  border-color: rgba(100,180,255,0.18);
  border-bottom-color: rgba(58,143,214,0.06);
  box-shadow:
    inset 0 1px 0 rgba(150,210,255,0.2),
    inset 0 -1px 0 rgba(0,0,0,0.25),
    0 4px 16px rgba(0,0,0,0.35),
    0 1px 3px rgba(0,0,0,0.2);
}

/* Tip for received — top-left corner pointing up */
.msg-bubble::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0px;
  border: 8px solid transparent;
  border-bottom-color: rgba(8, 14, 24, 0.84);
  border-top: 0;
  border-left: 0;
  filter: drop-shadow(0 -1px 0 rgba(255,255,255,0.08));
}

/* Tip for sent — bottom-right corner pointing down */
.msg.mine .msg-bubble::before {
  top: auto;
  bottom: -8px;
  left: auto;
  right: 0px;
  border: 8px solid transparent;
  border-top-color: rgba(20, 40, 70, 0.88);
  border-bottom: 0;
  border-right: 0;
}

/* Image frame */
.msg-image {
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  max-width: 300px;
  max-height: 220px;
  object-fit: cover;
  display: block;
}

/* Actions hover */
.msg:hover .msg-actions { display: flex; }
.msg-actions {
  display: none;
  position: absolute;
  right: 0; top: 0;
  gap: 4px;
  background: rgba(8,14,24,0.95);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 3px 6px;
  z-index: 10;
}
.msg.mine .msg-actions { right: auto; left: 0; }

/* ── SERVER RAIL LAYOUT FIX ── */
#server-rail {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  padding: 8px 0 !important;
  gap: 6px !important;
}
#server-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1; /* takes up space, pushes buttons to edges */
}
#btn-add-server {
  margin-top: auto !important;
  flex-shrink: 0;
}
#btn-solo-server {
  flex-shrink: 0;
  margin-bottom: 4px;
}

/* Mine author name right-aligned */
.mine-author { color: #7ecfff; font-weight: 600; font-size: 0.9rem; }
.msg.mine .msg-time { color: #446; font-size: 0.72rem; }

/* Consecutive messages from same person — hide tip after first */
.msg + .msg:not(.mine) .msg-bubble::before,
.msg.mine + .msg.mine .msg-bubble::before {
  display: none;
}
.msg + .msg:not(.mine),
.msg.mine + .msg.mine {
  margin-top: -2px;
}
.msg + .msg:not(.mine) .msg-bubble {
  border-radius: 2px 12px 12px 12px;
}
.msg.mine + .msg.mine .msg-bubble {
  border-radius: 12px 12px 0 12px;
}

/* ── DM SIDEBAR TOPBAR ── */
#dm-sidebar-topbar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.sidebar-icon-btn {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: #88a0b8; width: 34px; height: 34px; border-radius: 8px;
  cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center;
  position: relative; transition: all 0.1s;
}
.sidebar-icon-btn:hover { background: #1e3550; color: #fff; }
.sidebar-icon-btn:active { transform: scale(0.88); }

/* Notification badge on bell */
#notif-badge {
  position: absolute; top: -4px; right: -4px;
  background: #e53935; color: #fff; font-size: 0.62rem; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px; pointer-events: none;
}

/* Friends badge */
#friends-badge {
  position: absolute; top: -4px; right: -4px;
  background: #e53935; color: #fff; font-size: 0.62rem; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px; pointer-events: none;
}
.friends-rail-btn { position: relative; }

/* DM unread dot */
.dm-unread {
  width: 8px; height: 8px; border-radius: 50%; background: #e53935;
  flex-shrink: 0; margin-left: auto;
}

/* Notifications panel */
.notif-panel {
  width: 240px; background: #111d2e;
  border: 1px solid rgba(255,255,255,0.12); border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  max-height: 320px; overflow-y: auto;
}
.notif-panel-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; font-size: 0.82rem; font-weight: 700; color: #7ecfff;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.notif-panel-title button {
  background: none; border: none; color: #88a0b8; cursor: pointer; font-size: 0.78rem;
}
.notif-item {
  padding: 8px 14px; font-size: 0.82rem; color: #c0d8f0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* ── MUTE SLASH INDICATOR ── */
.sidebar-icon-btn { position: relative; overflow: visible; }
.mute-slash {
  position: absolute; bottom: -3px; right: -3px;
  background: #e53935; color: #fff; font-size: 0.55rem;
  width: 13px; height: 13px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; pointer-events: none;
  border: 1px solid #111d2e;
}

/* ── INLINE MESSAGE EDITOR ── */
.msg-inline-editor {
  width: 100%;
  background: rgba(255,255,255,0.08);
  border: 1px solid #3a8fd6;
  border-radius: 6px;
  color: #e0e8f0;
  font-size: 0.93rem;
  font-family: inherit;
  padding: 4px 8px;
  resize: none;
  outline: none;
  min-width: 200px;
}

/* ── LAYOUT: FLOATING PANELS WITH GAPS ── */
#app, #main-app {
  background: transparent;
}

/* Chat area background extends to full window behind everything */
body { position: relative; }
#chat-area {
  position: relative;
  z-index: 1;
}
#left-sidebar, #server-rail, #right-panel {
  position: relative;
  z-index: 2;
  border-radius: 12px;
  margin: 6px;
  overflow: hidden;
}
#server-rail { margin: 6px 3px 6px 6px; border-radius: 14px; }
#left-sidebar { margin: 6px 3px; border-radius: 12px; }
#right-panel  { margin: 6px 6px 6px 3px; border-radius: 12px; }

/* Inner panels also rounded */
#channel-sidebar, #dm-sidebar { border-radius: 10px; overflow: hidden; }
#server-list { gap: 4px; padding: 4px 0; }
#dm-list, #friend-list, #pending-requests { padding: 4px 0; }

/* Soft gap between DM list items */
.dm-item, .friend-item { margin: 2px 6px; border-radius: 8px; }
.channel-item { margin: 1px 6px; border-radius: 7px; }
.server-icon { margin: 3px auto; border-radius: 12px; }

/* Solo server button — transparent background, no white box */
#btn-solo-server {
  background: transparent !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 10px !important;
  padding: 2px !important;
  overflow: hidden !important;
}
#btn-solo-server img {
  width: 36px !important;
  height: 36px !important;
  object-fit: contain !important;
  border-radius: 8px !important;
  background: transparent !important;
}
#btn-solo-server:hover { background: rgba(255,255,255,0.08) !important; }

/* Music DVD spinner in topbar */
#btn-music-dvd {
  background: transparent !important;
  border: none !important;
  border-radius: 50% !important;
  padding: 2px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
#btn-music-dvd:hover { background: rgba(255,255,255,0.08) !important; }
#music-dvd-img { border-radius: 50% !important; }

/* Ensure panel backgrounds are semi-transparent so chat bg bleeds through */
#left-sidebar {
  background: rgba(17, 29, 46, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
#server-rail {
  background: rgba(10, 16, 24, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
#right-panel {
  background: rgba(17, 29, 46, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
#chat-header {
  background: rgba(13, 21, 32, 0.75);
  backdrop-filter: blur(8px);
  border-radius: 12px 12px 0 0;
}

/* DM sidebar and inner panels must be transparent so the left-sidebar background shows,
   not a solid black box layered on top of the user's chosen background */
#dm-sidebar,
#channel-sidebar,
#dm-list,
#friend-list,
#pending-requests {
  background: transparent !important;
}

/* Central panel-styles injected rules use !important and need to win.
   Remove any !important from the base rules above so Central overrides work. */

/* Chat area takes full space so its background image shows behind sidebars */
#main-app {
  position: relative;
  overflow: hidden;
}

/* ── DVD SPIN ANIMATION ── */
@keyframes dvd-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
#dvd-gif, #music-dvd-img {
  animation: dvd-spin 3s linear infinite;
  animation-play-state: paused; /* starts paused, JS resumes */
  border-radius: 50% !important;
  background: transparent !important;
}

/* chat-area: normal flow */

/* ── DM SIDEBAR SPACING ── */
#dm-list {
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.dm-item { margin: 2px 8px; border-radius: 8px; }

/* ── INPUT BOX ROUNDED ── */
#input-area {
  margin: 0 12px 12px !important;
  border-radius: 12px !important;
  background: rgba(17,29,46,0.85) !important;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08) !important;
  overflow: hidden;
}

/* ── GLOSSINESS — same technique as msg-bubble ── */
#server-rail, #left-sidebar, #right-panel {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    inset 0 -1px 0 rgba(0,0,0,0.2);
}


/* dm-profile-header border radius handled above */

/* ── INPUT AREA ROUNDED (DM + server channels) ── */
#input-area {
  border-radius: 12px !important;
  margin: 0 10px 10px !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  overflow: hidden;
}

/* ── PANEL GLOSSINESS — inset gloss line like msg-bubble ── */
/* Applied via Central panel styles: when gloss is set, the CSS injection handles it */
/* Default subtle gloss on sidebars */
#left-sidebar {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    inset 0 -1px 0 rgba(0,0,0,0.18) !important;
}
#server-rail {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -1px 0 rgba(0,0,0,0.15) !important;
}
