/* =========================================================
   Discord PHP – nowoczesny, kompletny design system
   ========================================================= */
:root {
  --bg-app: #0B0B0B;
  --bg-server: #0e0e0e;
  --bg-sidebar: #121212;
  --bg-main: #0f0f0f;
  --bg-input: #1a1a1a;
  --bg-hover: rgba(255,255,255,0.04);
  --bg-active: rgba(255,255,255,0.06);
  --bg-modifier: rgba(255,255,255,0.03);
  --border: rgba(255,255,255,0.05);
  --border-subtle: rgba(255,255,255,0.05);
  --text: #ffffff;
  --text-muted: rgba(255,255,255,0.60);
  --text-dim: rgba(255,255,255,0.40);
  --accent: #5865F2;
  --accent-hover: #4752C4;
  --success: #10B981;
  --success-hover: #059669;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --warning: #f59e0b;
  --pink: #a855f7;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-full: 999px;
  --shadow: 0 10px 25px rgba(0,0,0,0.35);
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: 0.2s ease;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; height: 100%;
  font-family: var(--font);
  background: var(--bg-app); color: var(--text);
  overflow: hidden; -webkit-font-smoothing: antialiased;
}
button, input, textarea { font-family: inherit; }
button { cursor: pointer; }

#app { display: flex; height: 100vh; width: 100vw; overflow: hidden; background: var(--bg-app); }

/* SERVERS BAR */
.servers-bar {
  width: 72px; background: var(--bg-server);
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 0; gap: 8px; flex-shrink: 0;
  overflow-y: auto; overflow-x: hidden;
  border-right: 1px solid var(--border-subtle);
}
.servers-bar::-webkit-scrollbar { width: 0; }
.server-icon {
  width: 48px; height: 48px; border-radius: 0; background: var(--bg-main);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: border-radius var(--transition), background var(--transition), transform var(--transition);
  color: var(--text); font-weight: 700; overflow: hidden; flex-shrink: 0; position: relative;
}
.server-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.server-icon::before {
  content: ""; position: absolute; left: -16px; width: 4px; height: 0;
  background: #fff; border-radius: 0; transition: height var(--transition);
}
.server-icon:hover::before { height: 20px; }
.server-icon.active::before { height: 40px; }
.server-icon:hover, .server-icon.active { border-radius: 0; background: var(--accent); transform: translateY(-1px); }
.server-icon.home { background: var(--accent); color: #fff; }
.server-icon.home:hover, .server-icon.home.active { background: var(--accent-hover); border-radius: 0; }
.server-icon.shop { background: var(--bg-main); color: var(--success); }
.server-icon.shop:hover, .server-icon.shop.active { background: var(--success); color: #fff; border-radius: 0; }
.server-icon.addons { background: var(--bg-main); color: #faa61a; }
.server-icon.addons:hover, .server-icon.addons.active { background: #a855f7; color: #fff; border-radius: 0; }
.server-icon.add { background: var(--bg-main); font-size: 24px; color: var(--success); line-height: 1; }
.server-icon.add:hover { background: var(--success); color: #fff; border-radius: 0; }
.server-separator { width: 32px; height: 2px; background: var(--bg-hover); margin: 4px 0; border-radius: 0; flex-shrink: 0; }
#server-list { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }

/* SIDEBAR */
.sidebar {
  width: 280px; background: var(--bg-sidebar); display: flex; flex-direction: column;
  flex-shrink: 0; min-height: 0; position: relative; border-right: 1px solid var(--border-subtle);
}
.main { flex: 1; display: flex; flex-direction: column; background: var(--bg-main); min-width: 0; min-height: 0; position: relative; }

.server-header {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer; user-select: none;
  min-height: 48px; flex-shrink: 0; transition: background var(--transition);
}
.server-header:hover { background: var(--bg-hover); }
.server-header h2 {
  font-size: 15px; font-weight: 700; color: var(--text); margin: 0; flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.server-dropdown-btn {
  background: transparent; border: none; color: var(--text-muted); font-size: 12px;
  width: 28px; height: 28px; border-radius: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.server-dropdown-btn:hover { background: var(--bg-hover); color: var(--text); }
.server-dropdown-menu {
  position: absolute; top: calc(100% + 4px); left: 8px; right: 8px; background: #111214;
  border-radius: 0; box-shadow: var(--shadow); padding: 6px; z-index: 1000;
  display: none; border: 1px solid var(--border);
}
.server-dropdown-menu.show { display: block; animation: fadeIn .12s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.server-dropdown-menu .menu-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: var(--text-muted);
  font-size: 14px; border: none; background: transparent; width: 100%; text-align: left;
  border-radius: 0; cursor: pointer; transition: var(--transition);
}
.server-dropdown-menu .menu-item:hover { background: var(--accent); color: #fff; }
.server-dropdown-menu .menu-item.danger { color: var(--danger); }
.server-dropdown-menu .menu-item.danger:hover { background: var(--danger); color: #fff; }

/* CHANNELS */
.channels { flex: 1; overflow-y: auto; padding: 8px; min-height: 0; }
.channels::-webkit-scrollbar { width: 6px; }
.channels::-webkit-scrollbar-thumb { background: var(--bg-server); border-radius: 0; }
.channel-category {
  font-size: 11px; font-weight: 700; color: var(--text-dim); text-transform: uppercase;
  letter-spacing: .5px; padding: 14px 8px 4px; display: flex; align-items: center; gap: 4px; cursor: pointer;
}
.channel-category:hover { color: var(--text); }
.channel {
  display: flex; align-items: center; gap: 6px; padding: 7px 8px; margin: 1px 0;
  border-radius: 0; color: var(--text-dim); cursor: pointer; font-size: 15px; font-weight: 500;
  transition: var(--transition);
}
.channel:hover { background: var(--bg-modifier); color: var(--text-muted); }
.channel.active { background: var(--bg-active); color: var(--text); }
.channel .channel-hash { font-size: 18px; font-weight: 600; color: inherit; width: 20px; text-align: center; flex-shrink: 0; opacity: .8; }
.channel.voice .channel-hash { font-size: 16px; }
.channel.voice.in-voice { color: var(--success); }

/* DM */
.dm-panel { flex: 1; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; }
.dm-header { font-size: 11px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; padding: 16px 16px 8px; }
.dm-list { padding: 0 8px 8px; }
.dm-item {
  display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 0;
  cursor: pointer; color: var(--text-dim); transition: var(--transition);
}
.dm-item:hover { background: var(--bg-modifier); color: var(--text-muted); }
.dm-item.active { background: var(--bg-active); color: var(--text); }
.dm-avatar {
  width: 32px; height: 32px; border-radius: 0; overflow: hidden; display: flex;
  align-items: center; justify-content: center; font-weight: 700; color: #fff; flex-shrink: 0; font-size: 13px;
}
.dm-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dm-name { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* SHOP SIDE */
.shop-side-panel {
  display: none; flex-direction: column; flex: 1; padding: 12px 8px; gap: 4px; min-height: 0; overflow-y: auto;
}
.shop-side-title {
  font-size: 11px; font-weight: 700; color: var(--text-dim); text-transform: uppercase;
  letter-spacing: .5px; padding: 8px 8px 10px;
}
.shop-side-item {
  text-align: left; background: transparent; border: none; color: var(--text-dim);
  padding: 10px 12px; border-radius: 0; font-size: 15px; font-weight: 500;
  cursor: pointer; transition: var(--transition);
}
.shop-side-item:hover { background: var(--bg-modifier); color: var(--text-muted); }
.shop-side-item.active { background: var(--bg-active); color: var(--text); }

/* MEMBERS */
.members {
  width: 260px; background: var(--bg-sidebar); padding: 16px 8px; overflow-y: auto;
  flex-shrink: 0; border-left: 1px solid var(--border-subtle);
}
.members h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-dim); margin: 0 0 8px; padding: 0 8px; }
.member-role-group { margin-bottom: 16px; }
.member-role-header { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; margin: 0 0 6px; padding: 0 8px; }
.member { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 0; cursor: pointer; transition: var(--transition); }
.member:hover { background: var(--bg-modifier); }
.member-avatar {
  width: 32px; height: 32px; border-radius: 0; display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; overflow: hidden; flex-shrink: 0; font-size: 13px;
}
.member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-info { min-width: 0; flex: 1; }
.member-name { display: block; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-role-tag { display: block; font-size: 11px; opacity: .85; }

/* CHAT HEADER */
.chat-header {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px;
  border-bottom: 1px solid var(--border); background: var(--bg-main); flex-shrink: 0;
  box-shadow: 0 1px 0 rgba(0,0,0,.2); z-index: 2;
}
.chat-header .channel-hash { color: var(--text-dim); font-size: 22px; font-weight: 600; }
#current-channel-name { font-weight: 600; font-size: 16px; color: var(--text); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.header-actions button {
  background: transparent; border: none; color: var(--text-muted); width: 36px; height: 36px;
  border-radius: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.header-actions button:hover { background: var(--bg-hover); color: var(--text); }

.dm-profile-header { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; }
.dm-profile-avatar {
  width: 32px; height: 32px; border-radius: 0; overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; cursor: pointer;
}
.dm-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dm-profile-meta { flex: 1; min-width: 0; }
.dm-profile-name { display: block; font-weight: 600; color: var(--text); cursor: pointer; font-size: 16px; }
.dm-profile-name:hover { text-decoration: underline; }
.dm-profile-sub { display: block; font-size: 12px; color: var(--text-dim); }
.dm-profile-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.dm-action-btn {
  width: 36px; height: 36px; border: none; border-radius: 0; background: transparent;
  color: var(--text-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition);
}
.dm-action-btn:hover { background: var(--bg-hover); color: var(--text); }
.dm-action-btn.danger:hover { background: rgba(237,66,69,.15); color: var(--danger); }

/* MESSAGES */
#chat-view { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.messages { flex: 1; overflow-y: auto; padding: 16px 0; min-height: 0; }
.messages::-webkit-scrollbar { width: 10px; }
.messages::-webkit-scrollbar-thumb { background: var(--bg-server); border-radius: 0; border: 2px solid var(--bg-main); }
.welcome-msg { text-align: center; color: var(--text-muted); padding: 48px 24px; }
.welcome-msg h3 { color: var(--text); margin: 0 0 8px; font-size: 22px; }
.message { display: flex; gap: 16px; padding: 2px 16px; margin-top: 14px; position: relative; transition: background var(--transition); }
.message:hover { background: rgba(0,0,0,.06); }
.message-avatar {
  width: 40px; height: 40px; border-radius: 0; overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; cursor: pointer; font-size: 15px;
}
.message-avatar img { width: 100%; height: 100%; object-fit: cover; }
.message-content { flex: 1; min-width: 0; }
.message-header { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; flex-wrap: wrap; }
.message-author { font-weight: 600; font-size: 15px; cursor: pointer; }
.message-author:hover { text-decoration: underline; }
.message-time { font-size: 12px; color: var(--text-dim); }
.message-text { font-size: 15px; line-height: 1.4; color: #dbdee1; word-wrap: break-word; white-space: pre-wrap; }
.msg-actions { display: none; gap: 4px; margin-left: auto; }
.message:hover .msg-actions { display: inline-flex; }
.msg-edit, .msg-del, .msg-react-btn {
  background: var(--bg-sidebar); border: 1px solid var(--border); border-radius: 0;
  cursor: pointer; padding: 2px 6px; font-size: 13px; color: var(--text-muted);
}
.msg-del:hover { color: var(--danger); }
.message-attachment { margin-top: 8px; max-width: 420px; }
.message-attachment img, .message-attachment video { max-width: 100%; border-radius: 0; display: block; }
.message-reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.reaction {
  background: var(--bg-sidebar); border: 1px solid var(--border); border-radius: 0;
  padding: 2px 8px; font-size: 13px; cursor: pointer; transition: var(--transition);
}
.reaction:hover { border-color: var(--accent); }
.reaction.mine { background: rgba(88,101,242,.2); border-color: var(--accent); }

/* INPUT */
.message-input-area { padding: 0 16px 24px; position: relative; flex-shrink: 0; }
.input-wrapper {
  display: flex; align-items: center; gap: 6px; background: var(--bg-input);
  border-radius: 0; padding: 10px 14px; border: 1px solid transparent; transition: border-color var(--transition);
}
.input-wrapper:focus-within { border-color: rgba(88,101,242,.35); }
#message-input { flex: 1; background: transparent; border: none; color: var(--text); font-size: 15px; outline: none; font-family: inherit; }
#message-input::placeholder { color: #6d6f78; }
#send-btn, .upload-btn, #emoji-btn, #gif-btn {
  background: transparent; border: none; color: var(--text-muted); width: 36px; height: 36px;
  border-radius: 0; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 18px; font-weight: 700; transition: var(--transition);
}
#gif-btn { font-size: 11px; letter-spacing: .5px; border: 1.5px solid var(--text-muted); border-radius: 0; width: auto; padding: 0 8px; height: 24px; }
#send-btn:hover, .upload-btn:hover, #emoji-btn:hover, #gif-btn:hover { background: var(--bg-hover); color: var(--text); }
#gif-btn:hover { border-color: var(--text); }
.picker-panel {
  position: absolute; bottom: 100%; left: 16px; right: 16px; background: var(--bg-sidebar);
  border: 1px solid var(--border); border-radius: 0; padding: 12px; margin-bottom: 8px;
  max-height: 280px; overflow-y: auto; z-index: 50; box-shadow: var(--shadow);
}
#emoji-panel { display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: 4px; }
#emoji-panel span { font-size: 22px; cursor: pointer; text-align: center; padding: 4px; border-radius: 0; }
#emoji-panel span:hover { background: var(--bg-hover); }
#gif-search { width: 100%; background: var(--bg-server); border: none; border-radius: 0; padding: 10px; color: var(--text); margin-bottom: 8px; outline: none; }
#gif-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
#gif-results img { width: 100%; border-radius: 0; cursor: pointer; }
#upload-preview { padding: 8px 0; }

/* FRIENDS */
#friends-view {
  flex: 1; flex-direction: column; overflow-y: auto; padding: 20px 28px 40px;
  background: var(--bg-main); min-height: 0;
}
#friends-view.is-open { display: flex !important; }
.friends-header h3 { margin: 0 0 16px; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.add-friend-box { display: flex; gap: 8px; margin-bottom: 8px; }
.add-friend-box input {
  flex: 1; background: var(--bg-server); border: 1px solid var(--border-subtle); border-radius: 0;
  padding: 12px 14px; color: var(--text); font-size: 15px; outline: none; transition: border-color var(--transition);
}
.add-friend-box input:focus { border-color: var(--accent); }
.friends-sections { margin-top: 20px; }
.friends-section { margin-bottom: 28px; }
.friends-section h4 { font-size: 11px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; margin: 0 0 10px; }
.friend-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 0;
  cursor: pointer; transition: background var(--transition);
}
.friend-row:hover { background: var(--bg-modifier); }
.friend-avatar {
  width: 40px; height: 40px; border-radius: 0; display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; flex-shrink: 0; overflow: hidden;
}
.friend-avatar img { width: 100%; height: 100%; object-fit: cover; }
.friend-info { flex: 1; min-width: 0; }
.friend-name { display: block; font-weight: 600; color: var(--text); }
.friend-status { display: block; font-size: 12px; color: var(--text-dim); }
.friend-msg-btn { background: transparent; border: none; font-size: 18px; cursor: pointer; opacity: 0; transition: opacity var(--transition); padding: 6px; }
.friend-row:hover .friend-msg-btn { opacity: 1; }
.friend-actions { display: flex; gap: 8px; flex-shrink: 0; }
.btn-friend { border: none; border-radius: 0; padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--transition); }
.btn-friend.accept { background: var(--success); color: #fff; }
.btn-friend.accept:hover { background: var(--success-hover); }
.btn-friend.decline { background: var(--bg-hover); color: var(--text); }
.btn-friend.decline:hover { background: var(--danger); color: #fff; }
.empty-hint { color: var(--text-dim); font-size: 14px; padding: 8px; }

/* SHOP */
#shop-view {
  display: none; flex: 1; overflow-y: auto; padding: 28px 36px 48px;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(88,101,242,.18), transparent 50%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(235,69,158,.12), transparent 45%),
    var(--bg-main);
  flex-direction: column; min-height: 0; width: 100%;
}
#shop-view.is-open { display: flex !important; }
.shop-hero {
  background: linear-gradient(125deg, #5865f2 0%, #7c3aed 40%, #eb459e 75%, #fee75c 100%);
  border-radius: 0; padding: 32px 36px; margin-bottom: 28px;
  position: relative; overflow: hidden; box-shadow: 0 12px 40px rgba(88,101,242,.25);
}
.shop-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(0,0,0,.4), transparent 55%); pointer-events: none;
}
.shop-hero-badge {
  display: inline-block; background: rgba(0,0,0,.35); backdrop-filter: blur(8px); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: 1.4px; padding: 5px 12px;
  border-radius: 0; margin-bottom: 12px; position: relative; z-index: 1;
}
.shop-hero h2 { margin: 0 0 10px; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; position: relative; z-index: 1; }
.shop-hero p { margin: 0; max-width: 520px; color: rgba(255,255,255,.92); font-size: 15px; line-height: 1.5; position: relative; z-index: 1; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; margin-bottom: 24px; }
.shop-card {
  background: rgba(43,45,49,.9); border: 1px solid var(--border-subtle); border-radius: 0;
  padding: 22px; display: flex; flex-direction: column;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  backdrop-filter: blur(8px);
}
.shop-card:hover { border-color: rgba(88,101,242,.5); transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,.3); }
.shop-card.featured { border-color: rgba(235,69,158,.5); background: linear-gradient(165deg, rgba(43,45,49,.95) 0%, rgba(53,36,58,.9) 100%); }
.shop-card-icon {
  width: 52px; height: 52px; border-radius: 0; display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; margin-bottom: 16px;
}
.shop-card-icon.nitro { background: linear-gradient(135deg, #5865f2, #eb459e); color: #fff; box-shadow: 0 6px 16px rgba(88,101,242,.35); }
.shop-card-icon.boost { background: rgba(35,165,89,.2); }
.shop-card-icon.decor { background: rgba(254,231,92,.15); }
.shop-card-icon.gift { background: rgba(235,69,158,.18); }
.shop-card h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.shop-card p { margin: 0 0 16px; color: var(--text-muted); font-size: 13px; line-height: 1.5; flex: 1; }
.shop-price { font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 14px; letter-spacing: -0.02em; }
.shop-price span { font-size: 13px; font-weight: 500; color: var(--text-dim); }
.btn-shop {
  background: var(--accent); color: #fff; border: none; border-radius: 0; padding: 11px 14px;
  font-weight: 600; font-size: 14px; cursor: pointer; transition: background var(--transition), transform var(--transition);
}
.btn-shop:hover { background: var(--accent-hover); transform: translateY(-1px); }
.shop-card.featured .btn-shop { background: var(--pink); }
.shop-card.featured .btn-shop:hover { background: #c93b86; }
.shop-note {
  text-align: center; color: var(--text-dim); font-size: 13px; margin: 8px 0 0; padding: 12px;
  border-radius: 0; background: rgba(0,0,0,.15);
}

/* VOICE */
.voice-under, .voice-under-channel { padding: 2px 8px 6px 28px; }
.voice-under .vu, .voice-under-channel .vu {
  display: flex; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 0; font-size: 13px; color: var(--text-dim);
}
.voice-under .vu .av, .voice-under-channel .vu .av {
  width: 20px; height: 20px; border-radius: 0; overflow: hidden; display: inline-flex;
  align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.voice-under .vu .av img { width: 100%; height: 100%; object-fit: cover; }
.vu.speaking .av, .voice-user-avatar.speaking { box-shadow: 0 0 0 2px var(--success) !important; }
#voice-bar { border-top: 1px solid var(--border); background: #232428; flex-shrink: 0; }
.voice-container { padding: 8px; }
.voice-channel-info { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.voice-connected-icon { font-size: 16px; }
.voice-channel-name { font-size: 13px; font-weight: 600; color: var(--success); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.voice-user-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.voice-user-item { display: flex; align-items: center; gap: 6px; background: var(--bg-sidebar); border-radius: 0; padding: 4px 8px; }
.voice-user-avatar {
  width: 24px; height: 24px; border-radius: 0; overflow: hidden; display: flex;
  align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff;
}
.voice-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.voice-user-name { font-size: 12px; color: #dbdee1; }
.voice-controls { display: flex; gap: 4px; }
.voice-control-btn {
  flex: 1; background: var(--bg-sidebar); border: none; color: var(--text-muted); border-radius: 0;
  padding: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.voice-control-btn:hover { background: var(--bg-hover); color: var(--text); }
.voice-control-btn.muted { color: var(--danger); }
.voice-control-btn.danger:hover { background: var(--danger); color: #fff; }

/* USER PANEL */
.user-panel {
  display: flex; align-items: center; padding: 10px 12px; background: #232428;
  border-top: 1px solid var(--border); gap: 10px; min-height: 56px; flex-shrink: 0;
  width: 100%;
}
.user-panel .user-avatar {
  width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px; color: #fff; flex-shrink: 0; cursor: pointer; overflow: hidden;
}
.user-panel .user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-panel .user-info { flex: 1 1 auto; min-width: 90px; max-width: none; cursor: pointer; overflow: hidden; }
.user-panel .user-info .username {
  display: block; font-size: 14px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-panel .user-info .status { display: block; font-size: 12px; color: var(--text-dim); }
.user-panel .user-info .status.online { color: var(--success); }
.user-controls { display: flex; align-items: center; gap: 2px; flex-shrink: 0; margin-left: auto; }
.user-control-btn {
  background: transparent; border: none; color: var(--text-muted); width: 32px; height: 32px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition);
}
.user-control-btn:hover { background: var(--bg-hover); color: var(--text); }
.user-control-btn.active, .user-control-btn.muted { color: var(--danger); }

/* BUTTONS / MODALS */
.btn-primary {
  background: var(--accent); color: #fff; border: none; border-radius: 0; padding: 12px 16px;
  font-weight: 600; cursor: pointer; width: 100%; font-size: 14px; transition: background var(--transition);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary {
  background: var(--bg-hover); color: var(--text); border: none; border-radius: 0; padding: 12px 16px;
  font-weight: 600; cursor: pointer; width: 100%; margin-top: 8px; transition: background var(--transition);
}
.btn-secondary:hover { background: #6d6f78; }
.btn-danger {
  background: var(--danger); color: #fff; border: none; border-radius: 0; padding: 10px 16px;
  font-weight: 600; cursor: pointer; transition: background var(--transition);
}
.btn-danger:hover { background: var(--danger-hover); }
.error-msg { color: var(--danger); font-size: 14px; margin-top: 8px; }
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.75); display: flex; align-items: center;
  justify-content: center; z-index: 10000; backdrop-filter: blur(4px);
}
.modal-box {
  background: var(--bg-main); border-radius: 0; padding: 28px; max-width: 440px;
  width: 90%; color: var(--text); box-shadow: var(--shadow); border: 1px solid var(--border-subtle);
}
.modal-box h2 { margin: 0 0 16px; font-size: 20px; font-weight: 700; }
.modal-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.modal-tab {
  flex: 1; background: var(--bg-sidebar); border: none; color: var(--text-muted); padding: 10px;
  border-radius: 0; cursor: pointer; font-weight: 600; transition: var(--transition);
}
.modal-tab.active { background: var(--accent); color: #fff; }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: 11px; font-weight: 700; color: var(--text-muted);
  margin-bottom: 8px; text-transform: uppercase; letter-spacing: .5px;
}
.form-group input {
  width: 100%; background: var(--bg-server); border: 1px solid var(--border-subtle); border-radius: 0;
  padding: 12px; color: var(--text); font-size: 15px; outline: none; transition: border-color var(--transition);
}
.form-group input:focus { border-color: var(--accent); }

/* LOGIN */
#login-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(88,101,242,.2), transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(235,69,158,.12), transparent 40%),
    var(--bg-app);
  padding: 20px;
}
.login-box {
  background: var(--bg-main); border-radius: 0; padding: 36px; width: 100%;
  max-width: 420px; box-shadow: var(--shadow); border: 1px solid var(--border-subtle);
}
.login-logo { text-align: center; font-size: 28px; font-weight: 800; margin-bottom: 4px; color: #fff; letter-spacing: -0.02em; }
.login-subtitle { text-align: center; color: var(--text-muted); margin: 0 0 28px; font-size: 14px; }

.typing-indicator { padding: 0 16px 4px; font-size: 12px; color: var(--text-muted); min-height: 18px; }
.logout-btn { background: transparent; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: 0; }
.logout-btn:hover { color: var(--text); background: var(--bg-hover); }
.invite-code-box {
  background: var(--bg-server); padding: 14px; border-radius: 0; text-align: center;
  margin: 12px 0; border: 1px solid var(--border-subtle);
}
.invite-code-box code { font-size: 20px; font-weight: 700; letter-spacing: 2px; color: var(--text); }
.invite-code-row { display: flex; gap: 8px; align-items: center; }
.settings-input {
  width: 100%; background: var(--bg-server); border: 1px solid var(--border-subtle); border-radius: 0;
  padding: 10px 12px; color: var(--text); font-size: 14px; outline: none;
}
.settings-input:focus { border-color: var(--accent); }
.settings-label { display: block; font-size: 11px; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .4px; }
.settings-group { margin-bottom: 18px; }

*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(0,0,0,.35); border-radius: 0; }
*::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,.5); }


/* ========== LOGIN (ładny ekran) ========== */
#login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 70% 50% at 15% 20%, rgba(88,101,242,.28), transparent 55%),
    radial-gradient(ellipse 50% 40% at 85% 75%, rgba(235,69,158,.18), transparent 50%),
    radial-gradient(ellipse 40% 30% at 50% 100%, rgba(35,165,89,.1), transparent 40%),
    #111214;
}
.login-box {
  background: rgba(49,51,56,.95);
  border-radius: 0;
  padding: 36px 32px 32px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 16px 48px rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(12px);
}
.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.login-logo h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}
.login-logo svg { filter: drop-shadow(0 4px 12px rgba(88,101,242,.4)); }
.login-subtitle {
  text-align: center;
  color: #b5bac1;
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.4;
}
#login-screen .tabs {
  display: flex;
  background: #1e1f22;
  border-radius: 0;
  padding: 4px;
  margin-bottom: 22px;
  gap: 4px;
}
#login-screen .tab {
  flex: 1;
  border: none;
  background: transparent;
  color: #b5bac1;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 0;
  cursor: pointer;
  transition: .15s;
}
#login-screen .tab:hover { color: #fff; }
#login-screen .tab.active {
  background: #5865f2;
  color: #fff;
  box-shadow: 0 2px 8px rgba(88,101,242,.35);
}
#login-screen .form-group { margin-bottom: 16px; }
#login-screen .form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: #b5bac1;
  margin-bottom: 8px;
}
#login-screen .form-group input {
  width: 100%;
  background: #1e1f22;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 0;
  padding: 12px 14px;
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
#login-screen .form-group input:focus {
  border-color: #5865f2;
  box-shadow: 0 0 0 3px rgba(88,101,242,.2);
}
#login-screen .btn-primary {
  margin-top: 8px;
  padding: 13px 16px;
  border-radius: 0;
  font-size: 15px;
  box-shadow: 0 4px 14px rgba(88,101,242,.3);
}
#login-screen .btn-primary:hover {
  transform: translateY(-1px);
}
#login-screen .error-msg {
  text-align: center;
  min-height: 20px;
}

/* ========== KANAŁY jak Discord ========== */
.channel-category {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 16px 8px 4px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #949ba4;
  cursor: default;
  user-select: none;
}
.channel-category:hover { color: #dbdee1; }
.channel-category .cat-arrow {
  font-size: 9px;
  width: 12px;
  opacity: .8;
}
.channel-category .cat-label { flex: 1; }
.channel-category .cat-add {
  width: 18px;
  height: 18px;
  border: none;
  background: transparent;
  color: #949ba4;
  font-size: 16px;
  line-height: 1;
  border-radius: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: .12s;
}
.channel-category:hover .cat-add { opacity: 1; }
.channel-category .cat-add:hover { color: #fff; background: rgba(255,255,255,.08); }

.channel {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  margin: 1px 0;
  border-radius: 0;
  color: #949ba4;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  transition: background .12s, color .12s;
}
.channel:hover {
  background: rgba(79,84,92,.16);
  color: #dbdee1;
}
.channel.active {
  background: rgba(79,84,92,.32);
  color: #fff;
}
.channel .channel-hash {
  width: 20px;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  opacity: .85;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.channel .channel-hash.voice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.channel .channel-hash.voice-icon img {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
  opacity: 0.85;
}
.channel:hover .channel-hash.voice-icon img,
.channel.active .channel-hash.voice-icon img {
  opacity: 1;
}
.channel .channel-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.channel.voice.in-voice {
  color: #23a559;
}
.channel.voice.in-voice .channel-hash { color: #23a559; }

/* Tapeta – półprzezroczyste tła */
html.has-wallpaper .servers-bar,
html.has-wallpaper .sidebar,
html.has-wallpaper .members,
html.has-wallpaper .main,
html.has-wallpaper .chat-header,
html.has-wallpaper #friends-view,
html.has-wallpaper #shop-view {
  backdrop-filter: blur(8px);
}
html.has-wallpaper .messages {
  background: transparent;
}


/* ========== TAPETA – cały ekran ========== */
#wallpaper-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
}
#app, #login-screen {
  position: relative;
  z-index: 1;
}
html.has-wallpaper #app {
  background: transparent !important;
}
html.has-wallpaper .servers-bar,
html.has-wallpaper .sidebar,
html.has-wallpaper .members,
html.has-wallpaper .main,
html.has-wallpaper .chat-header,
html.has-wallpaper #friends-view,
html.has-wallpaper #shop-view,
html.has-wallpaper .user-panel,
html.has-wallpaper #voice-bar {
  background-color: var(--bg-sidebar);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
html.has-wallpaper .main,
html.has-wallpaper #friends-view,
html.has-wallpaper #shop-view,
html.has-wallpaper .chat-header {
  background-color: var(--bg-main);
}
html.has-wallpaper .servers-bar {
  background-color: var(--bg-server);
}
html.has-wallpaper .messages {
  background: transparent;
}

/* ========== DM CALL jak Discord ========== */
.discord-call-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 48px 24px 40px;
  overflow: hidden;
}
.discord-call-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, #3c3f45 0%, #1e1f22 55%, #111214 100%);
  z-index: 0;
}
.discord-call-center {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 12px;
}
.discord-call-avatar-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 8px;
}
.discord-call-ring {
  position: absolute;
  inset: -10px;
  border-radius: 0;
  border: 3px solid rgba(35,165,89,.55);
  opacity: 0;
  transform: scale(0.85);
}
.discord-call-overlay.is-ringing .discord-call-ring {
  animation: callPulse 1.6s ease-out infinite;
}
.discord-call-overlay.is-connected .discord-call-ring {
  opacity: 1;
  transform: scale(1);
  border-color: rgba(35,165,89,.75);
  animation: none;
}
@keyframes callPulse {
  0% { opacity: .9; transform: scale(0.9); }
  70% { opacity: 0; transform: scale(1.25); }
  100% { opacity: 0; transform: scale(1.25); }
}
.discord-call-overlay .call-avatar.main {
  width: 120px;
  height: 120px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  position: relative;
  z-index: 1;
}
.discord-call-overlay .caller-name {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}
.discord-call-overlay .call-status {
  font-size: 14px;
  color: #b5bac1;
  font-weight: 500;
}
.discord-call-overlay.is-connected .call-status {
  color: #23a559;
}
.discord-call-controls {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.discord-call-controls .call-control-btn {
  width: 56px;
  height: 56px;
  border-radius: 0;
  border: none;
  background: #2b2d31;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s, transform .12s;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.discord-call-controls .call-control-btn:hover {
  background: #3f4147;
  transform: scale(1.05);
}
.discord-call-controls .call-control-btn.muted {
  background: #ed4245;
}
.discord-call-controls .call-control-btn.danger {
  background: #ed4245;
}
.discord-call-controls .call-control-btn.danger:hover {
  background: #c73c3f;
}
.discord-call-controls .call-control-btn.sharing {
  background: #23a559;
}

/* Incoming call modal polish */
#incoming-call-modal .call-modal {
  text-align: center;
  max-width: 360px;
}
#incoming-call-modal .call-avatar {
  width: 88px;
  height: 88px;
  border-radius: 0;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
}
#incoming-call-modal .call-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
#incoming-call-modal .btn-call {
  flex: 1;
  border: none;
  border-radius: 0;
  padding: 12px;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
}
#incoming-call-modal .btn-call.accept { background: #23a559; }
#incoming-call-modal .btn-call.accept:hover { background: #1a7f3f; }
#incoming-call-modal .btn-call.decline { background: #ed4245; }
#incoming-call-modal .btn-call.decline:hover { background: #c73c3f; }


/* ========== WebRTC video stage (DM / screen share) ========== */
.webrtc-video-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  pointer-events: none;
}
.webrtc-remote-video {
  max-width: min(720px, 90%);
  max-height: 70vh;
  width: auto;
  height: auto;
  border-radius: 0;
  border: 2px solid rgba(88,101,242,.6);
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
  background: #000;
  object-fit: contain;
  pointer-events: auto;
}
.discord-call-overlay .discord-call-center,
.discord-call-overlay .discord-call-controls {
  z-index: 3;
}
.discord-call-overlay:has(.webrtc-remote-video) .discord-call-center {
  opacity: 0.35;
  transform: scale(0.9);
  transition: .2s;
}


/* ========== DM CALL BAR (jak Discord – nie pełny ekran) ========== */
#active-call-overlay.dm-call-bar,
.dm-call-bar {
  position: relative !important;
  inset: auto !important;
  display: none;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 5;
  background: #1e1f22;
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: 0;
  overflow: visible;
}
.dm-call-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  min-height: 72px;
}
.dm-call-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.dm-call-avatar-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}
.dm-call-bar .call-avatar.main {
  width: 48px !important;
  height: 48px !important;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  position: relative;
  z-index: 1;
}
.dm-call-bar .discord-call-ring {
  position: absolute;
  inset: -6px;
  border-radius: 0;
  border: 2px solid rgba(35,165,89,.55);
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
}
.dm-call-bar.is-ringing .discord-call-ring {
  animation: callPulse 1.6s ease-out infinite;
}
.dm-call-bar.is-connected .discord-call-ring {
  opacity: 1;
  transform: scale(1);
  border-color: rgba(35,165,89,.8);
  animation: none;
}
.dm-call-meta { min-width: 0; }
.dm-call-bar .caller-name {
  font-size: 16px !important;
  font-weight: 600;
  color: #f2f3f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dm-call-bar .call-status {
  font-size: 13px !important;
  color: #b5bac1;
  margin-top: 2px;
}
.dm-call-bar.is-connected .call-status {
  color: #23a559;
}
.dm-call-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.dm-call-bar .call-control-btn {
  width: 40px !important;
  height: 40px !important;
  border-radius: 0;
  border: none;
  background: #2b2d31;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s, transform .12s;
}
.dm-call-bar .call-control-btn:hover {
  background: #3f4147;
  transform: scale(1.04);
}
.dm-call-bar .call-control-btn.muted {
  background: #ed4245;
}
.dm-call-bar .call-control-btn.danger {
  background: #ed4245;
}
.dm-call-bar .call-control-btn.danger:hover {
  background: #c73c3f;
}
.dm-call-bar .call-control-btn.sharing {
  background: #23a559;
}

/* video pod paskiem połączenia, nie full screen */
.dm-call-bar .webrtc-video-stage {
  position: relative !important;
  inset: auto !important;
  display: none;
  padding: 8px 16px 16px;
  justify-content: center;
  background: #111214;
  pointer-events: auto;
}
.dm-call-bar .webrtc-video-stage:not(:empty) {
  display: flex !important;
}
.dm-call-bar .webrtc-remote-video {
  max-width: 100%;
  max-height: 280px;
  width: auto;
  border-radius: 0;
  border: 1px solid rgba(88,101,242,.45);
}

/* wyłącz stare full-screen reguły */
.discord-call-overlay {
  position: relative !important;
  inset: auto !important;
}
.discord-call-bg { display: none !important; }

/* Custom emoji */
.custom-emoji {
  width: 22px;
  height: 22px;
  vertical-align: middle;
  object-fit: contain;
  margin: 0 1px;
}
.emoji-section-title {
  grid-column: 1 / -1;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #949ba4;
  letter-spacing: .4px;
  padding: 8px 4px 4px;
}
.emoji-custom-btn {
  width: 36px;
  height: 36px;
  padding: 4px;
  border: none;
  background: transparent;
  border-radius: 0;
  cursor: pointer;
}
.emoji-custom-btn:hover { background: rgba(255,255,255,.08); }
.emoji-custom-btn img { width: 100%; height: 100%; object-fit: contain; }
.ss-emoji-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,.2);
  border-radius: 0;
  padding: 8px 10px;
}
.ss-emoji-item img { width: 32px; height: 32px; object-fit: contain; }
.ss-emoji-item span { color: #dbdee1; font-size: 13px; }
.ss-emoji-item button {
  border: none;
  background: transparent;
  color: #949ba4;
  cursor: pointer;
  margin-left: 4px;
}
.ss-emoji-item button:hover { color: #ed4245; }
#emoji-panel {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
  gap: 4px;
}
#emoji-panel button {
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
  border-radius: 0;
  padding: 4px;
}
#emoji-panel button:hover { background: rgba(255,255,255,.08); }


/* ========== PROFIL DISCORD (karta po kliknięciu użytkownika) ========== */
.profile-modal {
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.55);
  z-index: 10050;
}
.profile-modal .discord-profile-card,
.discord-profile-card {
  position: relative;
  width: 340px;
  max-width: 94vw;
  background: #111214;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.06);
  padding: 0;
}
.dp-banner {
  height: 96px;
  background: #5865f2;
}
.dp-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 0;
  background: rgba(0,0,0,.45);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
}
.dp-close:hover { background: rgba(0,0,0,.65); }
.dp-avatar-row {
  position: relative;
  padding: 0 16px;
  margin-top: -40px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  z-index: 2;
}
.dp-avatar-wrap {
  position: relative;
  width: 84px;
  height: 84px;
}
.dp-avatar {
  width: 84px;
  height: 84px;
  border-radius: 0;
  border: 6px solid #111214;
  overflow: hidden;
  background: #5865f2;
  box-sizing: content-box;
  margin: -6px;
}
.dp-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dp-status-dot {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 18px;
  height: 18px;
  border-radius: 0;
  border: 4px solid #111214;
  background: #23a559;
  box-sizing: border-box;
}
.dp-status-dot.offline { background: #80848e; }
.dp-status-dot.idle { background: #f0b232; }
.dp-status-dot.dnd { background: #ed4245; }
.dp-body {
  padding: 12px 16px 16px;
}
.dp-names { margin-bottom: 12px; }
.dp-display-name {
  font-size: 20px;
  font-weight: 700;
  color: #f2f3f5;
  line-height: 1.2;
}
.dp-username {
  font-size: 14px;
  color: #b5bac1;
  margin-top: 2px;
}
.dp-menu {
  background: #2b2d31;
  border-radius: 0;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dp-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: transparent;
  color: #dbdee1;
  padding: 10px 10px;
  border-radius: 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}
.dp-menu-item:hover {
  background: rgba(79,84,92,.32);
}
.dp-menu-icon {
  width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dp-menu-label { flex: 1; }
.dp-badge-new {
  background: #ed4245;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .4px;
  padding: 2px 6px;
  border-radius: 0;
}
.dp-chevron {
  color: #949ba4;
  font-size: 18px;
  line-height: 1;
}
.dp-status-dot-inline {
  width: 12px;
  height: 12px;
  border-radius: 0;
  background: #23a559;
  display: inline-block;
}
.dp-status-dot-inline.offline { background: #80848e; }
.dp-actions {
  display: none;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.dp-actions .btn-primary,
.dp-actions .btn-secondary {
  width: 100%;
  margin: 0;
}

/* Role na karcie profilu */
.dp-roles-section {
  margin: 0 0 12px;
  padding: 12px;
  background: #2b2d31;
  border-radius: 0;
}
.dp-roles-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #b5bac1;
  margin-bottom: 8px;
}
.dp-roles-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dp-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1e1f22;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 0;
  padding: 4px 10px 4px 8px;
  max-width: 100%;
}
.dp-role-dot {
  width: 12px;
  height: 12px;
  border-radius: 0;
  flex-shrink: 0;
}
.dp-role-name {
  font-size: 12px;
  font-weight: 500;
  color: #dbdee1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

/* szerszy panel użytkownika */
.sidebar { width: 280px !important; }
.user-panel { min-height: 56px; padding: 10px 12px; gap: 10px; }
.user-panel .user-info { min-width: 100px; }
.user-panel .user-info .username { font-size: 14px; }

.dp-banner {
  height: 110px;
  background-color: #5865f2;
  background-size: cover;
  background-position: center;
}

/* Nadawanie ról – przycisk + */
.ss-member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 0;
  flex-wrap: wrap;
}
.ss-member-row:hover { background: rgba(255,255,255,.04); }
.ss-member-roles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 160px;
}
.ss-role-chip.assigned {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 0;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}
.ss-role-remove {
  border: none;
  background: rgba(0,0,0,.25);
  color: #fff;
  width: 16px;
  height: 16px;
  border-radius: 0;
  line-height: 1;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ss-role-remove:hover { background: #ed4245; }
.ss-role-add-wrap { position: relative; display: inline-flex; }
.ss-role-add-btn {
  width: 28px;
  height: 28px;
  border-radius: 0;
  border: 1px dashed #949ba4;
  background: transparent;
  color: #dbdee1;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.ss-role-add-btn:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255,255,255,.06);
}
.ss-role-add-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  min-width: 180px;
  background: #111214;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
  padding: 6px;
  z-index: 50;
}
.ss-role-add-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  background: transparent;
  color: #dbdee1;
  padding: 8px 10px;
  border-radius: 0;
  cursor: pointer;
  font-size: 14px;
  text-align: left;
}
.ss-role-add-item:hover { background: #5865f2; color: #fff; }
.ss-role-dot {
  width: 12px;
  height: 12px;
  border-radius: 0;
  flex-shrink: 0;
}
.ss-role-add-empty {
  padding: 10px;
  color: #949ba4;
  font-size: 13px;
}
.ss-owner-tag { color: #949ba4; font-size: 12px; }
.ss-no-roles { color: #949ba4; font-size: 12px; }
.dp-badge-new { display: none !important; }

/* Role – + i panel nadawania */
#ss-members-list { overflow: visible; }
.ss-member-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 0;
  margin-bottom: 4px;
}
.ss-member-row:hover { background: rgba(255,255,255,.04); }
.ss-member-avatar {
  width: 40px;
  height: 40px;
  border-radius: 0;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
}
.ss-member-meta { flex: 1; min-width: 0; }
.ss-member-name { font-weight: 600; color: #f2f3f5; margin-bottom: 8px; }
.ss-member-roles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.ss-role-chip.assigned {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 0;
  padding: 4px 8px 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}
.ss-role-remove {
  border: none;
  background: rgba(0,0,0,.3);
  color: #fff;
  width: 18px;
  height: 18px;
  border-radius: 0;
  line-height: 1;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ss-role-remove:hover { background: #ed4245; }
.ss-role-add-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ss-role-add-btn {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px;
  border-radius: 0!important;
  border: 2px dashed #949ba4 !important;
  background: #2b2d31 !important;
  color: #fff !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0 !important;
}
.ss-role-add-btn:hover {
  border-color: #5865f2 !important;
  color: #fff !important;
  background: #404249 !important;
}
.ss-role-add-panel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1e1f22;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 0;
  padding: 6px 8px;
}
.ss-role-add-panel[hidden] { display: none !important; }
.ss-role-select {
  background: #2b2d31;
  border: 1px solid rgba(255,255,255,.1);
  color: #f2f3f5;
  border-radius: 0;
  padding: 8px 10px;
  font-size: 13px;
  min-width: 140px;
}
.ss-role-assign-btn {
  width: auto !important;
  padding: 8px 14px !important;
  margin: 0 !important;
  font-size: 13px !important;
}
.ss-owner-tag { color: #949ba4; font-size: 12px; font-weight: 500; }
.ss-no-roles { color: #949ba4; font-size: 12px; }

/* Status menu na profilu */
.dp-status-wrap { position: relative; }
.dp-status-menu {
  margin-top: 6px;
  background: #1e1f22;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 0;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dp-status-option {
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  background: transparent;
  color: #dbdee1;
  padding: 10px 12px;
  border-radius: 0;
  cursor: pointer;
  font-size: 14px;
  text-align: left;
  width: 100%;
}
.dp-status-option:hover { background: rgba(79,84,92,.4); }
.dp-status-dot-inline.idle,
.dp-status-dot.idle,
.status.idle { color: #f0b232; }
.dp-status-dot-inline.idle,
.dp-status-dot.idle { background: #f0b232; }
.dp-status-dot-inline.dnd,
.dp-status-dot.dnd { background: #ed4245; }
.status.dnd { color: #ed4245; }
.dp-status-dot-inline.offline,
.dp-status-dot.offline { background: #80848e; }
.status.offline { color: #949ba4; }
.user-panel .user-info .status.idle::before { background: #f0b232; }
.user-panel .user-info .status.dnd::before { background: #ed4245; }
.user-panel .user-info .status.offline::before { background: #80848e; }
.invite-code-box code {
  font-size: 15px !important;
  letter-spacing: 0.3px !important;
  word-break: break-all;
}

/* Uprawnienia roli */
.ss-role-row {
  background: rgba(0,0,0,.15);
  border-radius: 0;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.ss-role-main {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ss-role-perms {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.ss-role-perms[hidden] { display: none !important; }
.ss-perms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.ss-perm-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #dbdee1;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 0;
  background: rgba(0,0,0,.2);
}
.ss-perm-item:hover { background: rgba(255,255,255,.06); }
.ss-perm-item input { accent-color: #5865f2; width: 16px; height: 16px; }
.ss-perm-save { width: auto !important; padding: 8px 16px !important; }
@media (max-width: 700px) {
  .ss-perms-grid { grid-template-columns: 1fr; }
}

.voice-connected-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.voice-connected-icon img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
  filter: brightness(0) saturate(100%) invert(64%) sepia(47%) saturate(470%) hue-rotate(87deg) brightness(95%) contrast(92%);
}
.channel .channel-hash.voice-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  opacity: 0.85;
  filter: brightness(0) invert(0.7);
}
.channel:hover .channel-hash.voice-icon img,
.channel.active .channel-hash.voice-icon img {
  opacity: 1;
  filter: brightness(0) invert(0.95);
}

/* ===== ROLE EDITOR (Discord-like) ===== */
.role-editor {
  display: flex;
  gap: 0;
  min-height: 520px;
  background: #2b2d31;
  border-radius: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.06);
}
.role-editor-sidebar {
  width: 220px;
  background: #1e1f22;
  border-right: 1px solid rgba(255,255,255,.06);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.role-editor-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  color: #949ba4;
}
.role-add-btn {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #dbdee1;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}
.role-add-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.role-editor-list {
  overflow-y: auto;
  padding: 4px 8px 12px;
  flex: 1;
}
.role-side-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: transparent;
  color: #dbdee1;
  padding: 8px 10px;
  border-radius: 0;
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  margin-bottom: 2px;
}
.role-side-item:hover { background: rgba(255,255,255,.06); }
.role-side-item.active { background: rgba(255,255,255,.1); }
.role-side-item.everyone { opacity: .7; cursor: default; }
.role-side-dot {
  width: 12px;
  height: 12px;
  border-radius: 0;
  flex-shrink: 0;
}
.role-side-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.role-editor-main {
  flex: 1;
  padding: 20px 24px;
  overflow-y: auto;
  background: #313338;
}
.role-editor-empty {
  color: #949ba4;
  padding: 40px 20px;
  text-align: center;
}
.role-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.role-editor-title {
  font-size: 16px;
  font-weight: 700;
  color: #f2f3f5;
  letter-spacing: .3px;
}
.role-delete-btn {
  border: none;
  background: transparent;
  color: #f23f43;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}
.role-delete-btn:hover { text-decoration: underline; }
.role-editor-tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 20px;
}
.role-tab {
  border: none;
  background: transparent;
  color: #b5bac1;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.role-tab:hover { color: #dbdee1; }
.role-tab.active {
  color: #fff;
  border-bottom-color: #fff;
}
.role-help {
  color: #949ba4;
  font-size: 13px;
  margin: 0 0 12px;
  line-height: 1.4;
}
.role-color-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}
.role-color-swatch.custom {
  width: 44px;
  height: 44px;
  border-radius: 0;
  border: 2px solid rgba(255,255,255,.15);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: #1e1f22;
  position: relative;
}
.role-color-swatch.custom input[type=color] {
  position: absolute;
  inset: -4px;
  width: 120%;
  height: 120%;
  border: none;
  cursor: pointer;
  padding: 0;
}
.role-color-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 280px;
}
.role-color-dot {
  width: 24px;
  height: 24px;
  border-radius: 0;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}
.role-color-dot:hover { transform: scale(1.08); }
.role-color-dot.active {
  border-color: #fff;
  box-shadow: 0 0 0 2px #5865f2;
}
.role-preview-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #2b2d31;
  border-radius: 0;
  padding: 14px 16px;
  margin-top: 8px;
  border: 1px solid rgba(255,255,255,.06);
}
.role-preview-dot {
  width: 16px;
  height: 16px;
  border-radius: 0;
  background: #99aab5;
  flex-shrink: 0;
}
.role-preview-name {
  font-weight: 600;
  font-size: 15px;
  color: #f2f3f5;
}
.role-preview-sub {
  font-size: 12px;
  color: #949ba4;
  margin-top: 2px;
}
.role-editor-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.role-editor-footer .btn-primary {
  width: auto !important;
  padding: 10px 20px !important;
}
.role-member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  color: #dbdee1;
  font-size: 14px;
}
#ss-tab-roles {
  padding: 0 !important;
}
#ss-tab-roles .settings-section-title { display: none; }

/* Role na profilu – pigułki + × + */
.dp-roles-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.dp-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1e1f22;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 0;
  padding: 4px 10px 4px 8px;
  max-width: 100%;
  font-size: 12px;
  color: #dbdee1;
}
.dp-role-pill.editable {
  padding-right: 6px;
}
.dp-role-x {
  border: none;
  background: transparent;
  color: #949ba4;
  width: 16px;
  height: 16px;
  border-radius: 0;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dp-role-x:hover {
  background: #ed4245;
  color: #fff;
}
.dp-role-add-wrap {
  position: relative;
  display: inline-flex;
}
.dp-role-add {
  width: 28px;
  height: 28px;
  border-radius: 0;
  border: 1px dashed #6d6f78;
  background: transparent;
  color: #dbdee1;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}
.dp-role-add:hover {
  border-color: #dbdee1;
  background: rgba(255,255,255,.06);
}
.dp-role-add-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 180px;
  max-height: 220px;
  overflow-y: auto;
  background: #111214;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  padding: 6px;
  z-index: 100;
}
.dp-role-add-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  background: transparent;
  color: #dbdee1;
  padding: 8px 10px;
  border-radius: 0;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
}
.dp-role-add-item:hover {
  background: #5865f2;
  color: #fff;
}
.dp-role-add-empty {
  padding: 10px;
  color: #949ba4;
  font-size: 12px;
}

/* wyraźniejsze odłączanie roli */
.dp-role-pill.editable .dp-role-x {
  margin-left: 2px;
  background: rgba(255,255,255,.08);
  color: #dbdee1;
  width: 18px;
  height: 18px;
  font-size: 15px;
}
.dp-role-pill.editable .dp-role-x:hover {
  background: #ed4245;
  color: #fff;
}

/* Przełącznik: wyświetlaj rolę osobno */
.role-hoist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding: 14px 16px;
  background: #2b2d31;
  border-radius: 0;
  border: 1px solid rgba(255,255,255,.06);
}
.role-hoist-title {
  font-size: 14px;
  font-weight: 600;
  color: #f2f3f5;
}
.role-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  display: inline-block;
}
.role-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.role-switch-slider {
  position: absolute;
  inset: 0;
  background: #4e5058;
  border-radius: 0;
  cursor: pointer;
  transition: .2s;
}
.role-switch-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 0;
  transition: .2s;
}
.role-switch input:checked + .role-switch-slider {
  background: #23a559;
}
.role-switch input:checked + .role-switch-slider::before {
  transform: translateX(20px);
}

/* Menu ⋯ przy wiadomości */
.message {
  position: relative;
}
.message-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.msg-more-wrap {
  position: relative;
  margin-left: auto;
  opacity: 0;
  transition: opacity .12s;
}
.message:hover .msg-more-wrap,
.msg-more-wrap:focus-within {
  opacity: 1;
}
.msg-more-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 0;
  background: #2b2d31;
  color: #b5bac1;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px rgba(0,0,0,.2);
}
.msg-more-btn:hover {
  background: #35373c;
  color: #fff;
}
.msg-more-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  min-width: 180px;
  background: #111214;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
  padding: 6px;
  z-index: 50;
}
.msg-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  background: transparent;
  color: #dbdee1;
  padding: 8px 10px;
  border-radius: 0;
  cursor: pointer;
  font-size: 14px;
  text-align: left;
}
.msg-menu-item:hover {
  background: #5865f2;
  color: #fff;
}
.msg-menu-item.danger:hover {
  background: #ed4245;
}
/* stare przyciski ukryte gdyby zostały */
.msg-actions, .msg-react-btn { display: none !important; }


/* Tapeta – naprawdę pełny ekran */
html, body {
  min-height: 100%;
}
html.has-wallpaper,
html.has-wallpaper body {
  background: transparent !important;
}
#wallpaper-layer {
  position: fixed !important;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0 !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed;
  pointer-events: none;
}
html.has-wallpaper #app {
  background: transparent !important;
}
html.has-wallpaper .servers-bar {
  background-color: rgba(30,31,34,0.55) !important;
}
html.has-wallpaper .sidebar,
html.has-wallpaper .user-panel,
html.has-wallpaper #voice-bar {
  background-color: rgba(43,45,49,0.55) !important;
}
html.has-wallpaper .main,
html.has-wallpaper #friends-view,
html.has-wallpaper #shop-view,
html.has-wallpaper .chat-header,
html.has-wallpaper .members {
  background-color: rgba(49,51,56,0.50) !important;
}
html.has-wallpaper .messages,
html.has-wallpaper .message {
  background: transparent !important;
}
html.has-wallpaper .chat-input-container,
html.has-wallpaper .message-input-wrapper {
  background-color: rgba(56,58,64,0.65) !important;
}


/* ========== STYL KWADRATOWY ========== */
:root {
  --radius: 10px;
  --radius-lg: 14px;
}
.server-icon,
.server-icon img,
.server-icon.home,
.server-icon.shop,
.server-icon.add {
  border-radius: 0!important;
}
.server-icon:hover,
.server-icon.active,
.server-icon.home:hover,
.server-icon.home.active,
.server-icon.shop:hover,
.server-icon.shop.active,
.server-icon.add:hover {
  border-radius: 0!important;
}
.message-avatar,
.dm-avatar,
.ss-member-avatar,
.settings-avatar-large,
.user-avatar,
#user-avatar-btn,
.profile-avatar,
.dp-avatar,
.member-avatar {
  border-radius: 0!important;
}
.btn-primary,
.btn-secondary,
.settings-input,
.login-box,
.modal-box,
.channel,
.friend-row,
.msg-more-menu,
.dp-role-pill,
.role-editor,
.role-side-item,
.settings-change-avatar-btn,
.invite-code-box,
#emoji-panel,
#gif-panel,
.message-input-wrapper,
.chat-input-container input,
textarea.settings-input {
  border-radius: 0!important;
}
.login-box { border-radius: 0!important; }
.modal-box.settings-box,
.account-settings-modal .modal-box {
  border-radius: 0!important;
}

/* Speaking – zielona obwódka tylko gdy ktoś mówi */
.voice-user-avatar {
  border: 2px solid transparent !important;
  box-sizing: border-box;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.voice-user-avatar.speaking {
  border-color: #23a55a !important;
  box-shadow: 0 0 0 2px rgba(35,165,90,.45) !important;
}
.voice-under .vu .av,
.voice-under-channel .vu .av {
  border: 2px solid transparent !important;
  box-sizing: border-box;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.voice-under .vu.speaking .av,
.voice-under-channel .vu.speaking .av,
.voice-under .vu .av.speaking,
.voice-under-channel .vu .av.speaking {
  border-color: #23a55a !important;
  box-shadow: 0 0 0 2px rgba(35,165,90,.45) !important;
}
.ss-transfer-btn {
  margin-left: 6px;
  border: 1px solid rgba(240,178,50,.4);
  background: rgba(240,178,50,.12);
  color: #f0b232;
  border-radius: 0;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
}
.ss-transfer-btn:hover {
  background: rgba(240,178,50,.25);
}

/* Mention popup + highlights */
.message-input-area { position: relative; }
.mention-popup {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 100%;
  margin-bottom: 6px;
  background: #111214;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
  max-height: 220px;
  overflow-y: auto;
  z-index: 40;
  padding: 6px;
}
.mention-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  background: transparent;
  color: #dbdee1;
  padding: 8px 10px;
  border-radius: 0;
  cursor: pointer;
  font-size: 14px;
  text-align: left;
}
.mention-item:hover,
.mention-item.active {
  background: #5865f2;
  color: #fff;
}
.mention-prefix { opacity: .8; font-weight: 700; }
.mention {
  border-radius: 0;
  padding: 0 2px;
  font-weight: 500;
  cursor: pointer;
}
.user-mention,
.everyone-mention {
  color: #c9cdfb;
  background: rgba(88,101,242,.3);
}
.channel-mention {
  color: #00a8fc;
  background: rgba(0,168,252,.12);
}
.user-mention:hover,
.channel-mention:hover {
  text-decoration: underline;
}
.voice-level-bar {
  height: 6px;
  background: #1e1f22;
  border-radius: 0;
  overflow: hidden;
  margin-top: 8px;
}
.voice-level-fill {
  height: 100%;
  width: 0%;
  background: #23a55a;
  transition: width .05s linear;
}

/* Modal tworzenia kanału */
.channel-create-box {
  width: min(440px, 94vw);
  background: #313338;
  border-radius: 0;
  padding: 20px 22px 18px;
  border: 1px solid rgba(255,255,255,.06);
}
.channel-create-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.channel-create-header h2 {
  margin: 0;
  font-size: 18px;
  color: #f2f3f5;
}
.channel-create-sub {
  color: #949ba4;
  font-size: 13px;
  margin: 0 0 16px;
}
.channel-type-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.channel-type-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: #2b2d31;
  border-radius: 0;
  padding: 12px 14px;
  cursor: pointer;
  color: #dbdee1;
}
.channel-type-card:hover {
  background: #35373c;
}
.channel-type-card.active {
  border-color: #5865f2;
  background: rgba(88,101,242,.12);
}
.channel-type-icon {
  width: 36px;
  height: 36px;
  border-radius: 0;
  background: #1e1f22;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #b5bac1;
  flex-shrink: 0;
}
.channel-type-icon.voice img {
  filter: brightness(0) invert(.75);
}
.channel-type-title {
  font-weight: 600;
  font-size: 14px;
  color: #f2f3f5;
}
.channel-type-desc {
  font-size: 12px;
  color: #949ba4;
  margin-top: 2px;
}
.channel-name-row {
  display: flex;
  align-items: center;
  gap: 0;
  background: #1e1f22;
  border-radius: 0;
  border: 1px solid rgba(255,255,255,.06);
  overflow: hidden;
  margin-bottom: 8px;
}
.channel-name-prefix {
  padding: 0 12px;
  color: #949ba4;
  font-weight: 700;
  font-size: 16px;
}
.channel-name-row .settings-input {
  border: none !important;
  background: transparent !important;
  margin: 0 !important;
  border-radius: 0!important;
}
.channel-create-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
.channel-create-actions .btn-primary,
.channel-create-actions .btn-secondary {
  width: auto !important;
  padding: 10px 16px !important;
}

.channels-ctx-menu {
  position: fixed;
  z-index: 9999;
  min-width: 220px;
  background: #111214;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  padding: 6px;
}
.channels-ctx-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: #dbdee1;
  padding: 8px 10px;
  border-radius: 0;
  cursor: pointer;
  font-size: 13px;
}
.channels-ctx-menu button:hover {
  background: #5865f2;
  color: #fff;
}

.edit-message-box {
  width: min(480px, 94vw);
  background: #313338;
  border-radius: 0;
  padding: 20px 22px 18px;
  border: 1px solid rgba(255,255,255,.06);
}
.edit-message-box textarea {
  width: 100%;
  min-height: 100px;
  resize: vertical;
  margin: 12px 0 8px;
}

/* Uniwersalne ładne modale */
.modal {
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
}
.zynced-modal {
  width: min(440px, 94vw);
  background: #313338;
  border-radius: 0;
  padding: 20px 22px 18px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 16px 48px rgba(0,0,0,.45);
}
.zynced-modal-text {
  color: #b5bac1;
  font-size: 14px;
  line-height: 1.45;
  margin: 8px 0 16px;
}
.react-modal-box { width: min(360px, 94vw); }
.react-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.react-pick {
  font-size: 24px;
  background: #2b2d31;
  border: 1px solid transparent;
  border-radius: 0;
  padding: 10px 6px;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease;
}
.react-pick:hover {
  background: #5865f2;
  transform: scale(1.08);
}
.upload-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  font-size: 13px;
  color: #dbdee1;
}
.upload-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.upload-cancel-btn {
  border: none;
  background: #4e5058;
  color: #fff;
  border-radius: 0;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.upload-cancel-btn:hover { background: #ed4245; }
.upload-squares {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
}
.upload-sq {
  width: 14px;
  height: 14px;
  border-radius: 0;
  background: #1e1f22;
  border: 1px solid #3f4147;
  transition: background .12s ease, border-color .12s ease;
}
.upload-sq.on {
  background: #6d6f78;
  border-color: #8b8d97;
}
#upload-progress-pct { font-size: 12px; color: #949ba4; }

/* Zapamiętaj mnie – ładny moduł */
.remember-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #2b2d31;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 0;
  padding: 12px 14px;
  cursor: pointer;
  text-transform: none !important;
  letter-spacing: 0 !important;
  margin: 0;
}
.remember-card:hover { border-color: rgba(88,101,242,.45); }
.remember-card-text { display: flex; flex-direction: column; gap: 2px; }
.remember-card-title { color: #f2f3f5; font-size: 14px; font-weight: 600; }
.remember-card-sub { color: #949ba4; font-size: 12px; font-weight: 400; }
.remember-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.remember-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.remember-slider {
  position: absolute;
  inset: 0;
  background: #4e5058;
  border-radius: 0;
  transition: background .15s ease;
}
.remember-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 0;
  transition: transform .15s ease;
}
.remember-switch input:checked + .remember-slider {
  background: #5865f2;
}
.remember-switch input:checked + .remember-slider::before {
  transform: translateX(20px);
}

/* ===== Rozmowa DM: 2 duże kafle + 3 małe przyciski (jak szkic) ===== */
#active-call-overlay.dm-call-stage,
.dm-call-stage {
  position: relative;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 0;
  max-height: 200px;
  padding: 12px 16px 10px;
  background: #121214;
  border-bottom: 1px solid #2a2a30;
  z-index: 20;
}
#active-call-overlay.dm-call-stage[style*="flex"],
#active-call-overlay.dm-call-stage.is-open {
  display: flex !important;
}
.dm-call-tiles {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  width: auto;
  max-width: 100%;
}
.dm-call-tile {
  position: relative;
  width: 120px;
  height: 120px;
  aspect-ratio: auto;
  background: #1a1a1e;
  border: 2px solid #2a2a30;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.dm-call-tile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 0;
  background: #7c8cff;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,.35);
}
.dm-call-tile-name,
.dm-call-tile-status { display: none !important; }
.dm-call-tile-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
.dm-call-stage .dm-call-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  background: #1a1a1e;
  border: 1px solid #2a2a30;
}
.dm-call-stage .call-control-btn {
  width: 36px;
  height: 36px;
  border-radius: 0;
  border: 1px solid #2a2a30;
  background: #121214;
  color: #dbdee1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  pointer-events: auto;
  z-index: 5;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.dm-call-stage .call-control-btn:hover {
  background: #2a2a30;
  color: #fff;
}
.dm-call-stage .call-control-btn.muted {
  background: #f04444;
  border-color: #f04444;
  color: #fff;
}
.dm-call-stage .call-control-btn.danger {
  background: #121214;
  border-color: #f04444;
  color: #f04444;
}
.dm-call-stage .call-control-btn.danger:hover {
  background: #f04444;
  color: #fff;
}
.dm-call-stage .call-control-btn.sharing {
  background: #3dd68c;
  border-color: #3dd68c;
  color: #0c0c0e;
}
.dm-call-stage.is-connected #active-call-status {
  color: #3dd68c;
}
.dm-call-stage.is-ringing .dm-call-tile {
  border-color: #3dd68c;
  box-shadow: 0 0 0 1px rgba(61,214,140,.35);
  animation: dmCallPulse 1.2s ease-in-out infinite;
}
.dm-call-stage.is-connected .dm-call-tile {
  border-color: #3dd68c;
  box-shadow: 0 0 0 1px rgba(61,214,140,.22);
  animation: none;
}
@keyframes dmCallPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(61,214,140,.25); }
  50% { box-shadow: 0 0 0 4px rgba(61,214,140,.1); }
}
@media (max-width: 560px) {
  .dm-call-tile { width: 96px; height: 96px; }
  .dm-call-tile-avatar { width: 40px; height: 40px; font-size: 16px; }
  .dm-call-stage { max-height: 170px; padding: 10px 12px 8px; }
}

/* Hover kanał / kategoria jak Discord */
.channel {
  border-radius: 0;
  transition: background .12s ease, color .12s ease;
}
.channel:hover {
  background: rgba(79,84,92,.4) !important;
  color: #fff;
}
.channel-category {
  border-radius: 0;
  cursor: pointer;
  transition: color .12s ease;
}
.channel-category:hover .cat-label {
  color: #fff;
}
.channel-category:hover .cat-add {
  opacity: 1;
}
.cat-add {
  opacity: 0;
  transition: opacity .12s ease;
}
.channel-category:hover .cat-add,
.channel-category .cat-add:focus {
  opacity: 1;
}

/* Podgląd własnego udostępniania ekranu (tylko Ty widzisz) */
.self-share-preview {
  position: fixed;
  right: 16px;
  bottom: 90px;
  width: min(280px, 42vw);
  background: #1e1f22;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 0;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
  z-index: 80;
  flex-direction: column;
  overflow: hidden;
}
.self-share-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #f2f3f5;
  background: #2b2d31;
}
.self-share-stop {
  border: none;
  background: #ed4245;
  color: #fff;
  border-radius: 0;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
}
.self-share-preview video {
  width: 100%;
  max-height: 160px;
  object-fit: contain;
  background: #000;
  display: block;
}
#voice-share-btn.sharing {
  background: #23a55a !important;
  color: #fff !important;
}

/* Kwadratowe ikony serwerów */
.server-icon,
.server-icon img,
.server-icon:hover,
.server-icon.active,
.server-icon.home,
.server-icon.shop,
.server-icon.addons,
.server-icon.add {
  border-radius: 0!important;
}

.addons-view {
  flex: 1;
  display: none;
  flex-direction: column;
  padding: 28px 32px;
  overflow: auto;
  background: var(--bg-main, #313338);
}
.addons-header h2 { margin: 0 0 6px; font-size: 22px; color: #fff; }
.addons-header p { margin: 0 0 20px; color: #b5bac1; font-size: 14px; }
.addons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.addons-card {
  background: #2b2d31;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 0;
  padding: 16px;
}
.addons-card-icon { font-size: 28px; margin-bottom: 8px; }
.addons-card h3 { margin: 0 0 6px; font-size: 15px; color: #f2f3f5; }
.addons-card p { margin: 0; font-size: 13px; color: #949ba4; line-height: 1.4; }

.addons-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}
.addons-card.featured {
  border-color: rgba(88,101,242,.45);
  background: linear-gradient(180deg, #2b2d31 0%, #232428 100%);
  position: relative;
}
.addons-badge {
  display: inline-block;
  margin-top: 10px;
  background: #5865f2;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  padding: 3px 8px;
  border-radius: 0;
}





/* ===== STYL SZARY / CZARNY + nowoczesny czat ===== */
:root {
  color-scheme: dark;
  --bg-base: #0a0a0b;
  --bg-app: #111214;
  --bg-main: #1a1b1e;
  --bg-panel: #16171a;
  --bg-elevated: #1e1f22;
  --bg-hover: rgba(255,255,255,.06);
  --border-soft: rgba(255,255,255,.08);
  --border-strong: rgba(255,255,255,.12);
  --text-primary: #f2f3f5;
  --text-secondary: #b5bac1;
  --text-muted: #949ba4;
  --accent: #5865f2;
  --accent-hover: #6a75f5;
  --success: #23a55a;
  --danger: #ed4245;
  --warning: #f0b232;
  --font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  --text: var(--text-primary);
  --text-dim: var(--text-muted);
  --bg-deep: var(--bg-base);
}

html, body {
  background: #0a0a0b !important;
  color: var(--text-primary) !important;
  font-family: var(--font-family) !important;
}
body::before, body::after { display: none !important; }

#app, .main, #chat-view { background: var(--bg-app) !important; }

.servers-bar {
  background: #0a0a0b !important;
  border-right: 1px solid var(--border-soft) !important;
  backdrop-filter: none !important;
}
.server-icon {
  border-radius: 0!important;
  background: #1e1f22 !important;
  border: 1px solid var(--border-soft) !important;
  color: var(--text-primary) !important;
  box-shadow: none !important;
}
.server-icon:hover, .server-icon.active {
  border-radius: 0!important;
  background: #2b2d31 !important;
  border-color: #3f4147 !important;
  transform: none !important;
  box-shadow: none !important;
}
.server-icon.home {
  background: #5865f2 !important;
  border-color: #5865f2 !important;
  color: #fff !important;
}
.server-icon.shop, .server-icon.addons {
  background: #1e1f22 !important;
}
.server-icon.shop:hover, .server-icon.shop.active { background: #23a55a !important; border-color: #23a55a !important; color: #fff !important; }
.server-icon.addons:hover, .server-icon.addons.active { background: #3f4147 !important; color: #fff !important; }

.channels-panel, .sidebar, #dm-panel, .members-panel, #members-panel, .user-panel {
  background: #16171a !important;
  border-color: var(--border-soft) !important;
  backdrop-filter: none !important;
}
.channel:hover { background: rgba(255,255,255,.06) !important; }
.channel.active {
  background: rgba(255,255,255,.08) !important;
  box-shadow: none !important;
  border-left: none !important;
}

.chat-header, #chat-header {
  background: #111214 !important;
  border-bottom: 1px solid var(--border-soft) !important;
  backdrop-filter: none !important;
}

/* nowoczesny czat */
#messages, .messages {
  background: #111214 !important;
  padding: 16px 8px 12px !important;
}
.message {
  border-radius: 0;
  padding: 6px 12px !important;
  margin: 0 !important;
  transition: background .12s ease;
}
.message:hover { background: rgba(255,255,255,.03) !important; }
.message .msg-avatar {
  border-radius: 0;
  width: 40px; height: 40px;
}
.message .msg-author { font-weight: 600; color: #f2f3f5; }
.message .msg-time { color: #949ba4; font-size: 11px; }
.message .msg-content { color: #dbdee1; line-height: 1.4; word-break: break-word; }

.message-input-area, .composer, #message-form {
  background: #111214 !important;
  border-top: 1px solid var(--border-soft);
}
.composer-inner, #message-input, textarea#message-input {
  background: #1e1f22 !important;
  border: 1px solid transparent !important;
  border-radius: 0!important;
  color: #f2f3f5 !important;
}
#message-input:focus { border-color: #3f4147 !important; box-shadow: none !important; }

.btn-primary, button.btn-primary {
  background: #5865f2 !important;
  border: none !important;
  border-radius: 0!important;
  color: #fff !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
}
.btn-primary:hover { background: #6a75f5 !important; transform: none !important; }
.btn-secondary {
  background: #2b2d31 !important;
  border: 1px solid #3f4147 !important;
  border-radius: 0!important;
  color: #f2f3f5 !important;
  text-transform: none !important;
}
.btn-danger { background: #ed4245 !important; border-radius: 0!important; color: #fff !important; }

.login-page, #login-page, .auth-wrap {
  background: #0a0a0b !important;
}
.login-box, .auth-card, #login-box {
  background: #16171a !important;
  border: 1px solid var(--border-soft) !important;
  border-radius: 0!important;
  box-shadow: 0 8px 32px rgba(0,0,0,.45) !important;
  backdrop-filter: none !important;
}
input, textarea, .settings-input {
  background: #1e1f22 !important;
  border: 1px solid #2b2d31 !important;
  border-radius: 0!important;
  color: #f2f3f5 !important;
}
input:focus, textarea:focus {
  border-color: #5865f2 !important;
  box-shadow: 0 0 0 2px rgba(88,101,242,.25) !important;
}

.modal-box, .zynced-modal, .settings-modal .settings-content, .account-settings-modal {
  background: #16171a !important;
  border: 1px solid var(--border-soft) !important;
  border-radius: 0!important;
  box-shadow: 0 16px 48px rgba(0,0,0,.55) !important;
  backdrop-filter: none !important;
}

.addons-card, .shop-card {
  background: #1e1f22 !important;
  border: 1px solid var(--border-soft) !important;
  border-radius: 0!important;
  box-shadow: none !important;
}
.addons-card:hover, .shop-card:hover {
  transform: none;
  border-color: #3f4147 !important;
  box-shadow: none !important;
}
.addons-card.featured {
  background: #1e1f22 !important;
  border-color: #5865f2 !important;
}
.addons-badge { background: #5865f2 !important; border-radius: 0!important; }

/* menu kontekstowe kanałów */
.channels-ctx-menu {
  position: fixed;
  z-index: 9999;
  min-width: 200px;
  background: #111214;
  border: 1px solid #2b2d31;
  border-radius: 0;
  padding: 6px;
  box-shadow: 0 12px 32px rgba(0,0,0,.55);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.channels-ctx-menu button {
  border: none;
  background: transparent;
  color: #dbdee1;
  text-align: left;
  padding: 8px 10px;
  border-radius: 0;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.channels-ctx-menu button:hover { background: #5865f2; color: #fff; }
.channels-ctx-menu button.danger { color: #ed4245; }
.channels-ctx-menu button.danger:hover { background: #ed4245; color: #fff; }
.channels-ctx-menu .ctx-sep {
  height: 1px;
  background: #2b2d31;
  margin: 4px 6px;
}

/* Zgłoś problem – ładny layout */
#tab-report .settings-section-title {
  font-size: 18px;
  font-weight: 700;
  color: #f2f3f5;
  margin-bottom: 6px;
}
#tab-report .report-card {
  background: #1e1f22;
  border: 1px solid #2b2d31;
  border-radius: 0;
  padding: 16px;
  margin-top: 8px;
}
#tab-report textarea {
  min-height: 140px;
  resize: vertical;
}
#report-status.ok { color: #23a55a !important; }
#report-status.err { color: #ed4245 !important; }

::-webkit-scrollbar-thumb {
  background: #2b2d31 !important;
  border-radius: 0;
}
::-webkit-scrollbar-track { background: transparent !important; }

/* ===== KWADRATOWE + SZARO-CZARNE (dobrze widoczne) ===== */
:root {
  --bg-base: #0c0c0e;
  --bg-app: #121214;
  --bg-main: #18181b;
  --bg-panel: #1a1a1e;
  --bg-elevated: #222226;
  --bg-hover: rgba(255,255,255,.07);
  --border-soft: rgba(255,255,255,.09);
  --border-strong: rgba(255,255,255,.14);
  --text-primary: #ececee;
  --text-secondary: #b4b4bc;
  --text-muted: #8b8b96;
  --accent: #7c8cff;
  --accent-hover: #93a0ff;
  --success: #3dd68c;
  --danger: #f04444;
  --radius: 10px;
}

html, body, #app, .main, #chat-view, .servers-bar, .channels-panel, .sidebar,
#dm-panel, .members-panel, #members-panel, .user-panel, .chat-header,
#messages, .message-input-area, .composer, .login-page, .login-box, .auth-card,
.modal-box, .zynced-modal, .settings-box, .account-settings-modal,
.server-settings-modal, .addons-view, .shop-view, .password-card, .report-card,
.server-icon, .channel, button, input, textarea, select, .btn-primary,
.btn-secondary, .btn-danger, .channels-ctx-menu, .picker-panel, #gif-panel,
.dm-call-tile, .call-control-btn, .voice-control-btn, .addons-card, .shop-card {
  border-radius: 0!important;
}

html, body {
  background: #0c0c0e !important;
  color: #ececee !important;
}
#app, .main, #chat-view { background: #121214 !important; }
.servers-bar { background: #0c0c0e !important; border-right: 1px solid #2a2a30 !important; }
.channels-panel, .sidebar, #dm-panel, .members-panel, #members-panel, .user-panel {
  background: #1a1a1e !important;
  border-color: #2a2a30 !important;
}
.chat-header, #messages, .message-input-area, .composer { background: #121214 !important; }
.server-icon {
  background: #222226 !important;
  border: 1px solid #2a2a30 !important;
  color: #ececee !important;
}
.server-icon:hover, .server-icon.active {
  background: #2c2c32 !important;
  border-color: #7c8cff !important;
}
.server-icon.home {
  background: #7c8cff !important;
  border-color: #7c8cff !important;
  color: #0c0c0e !important;
}
.channel:hover, .channel.active { background: #2a2a30 !important; }
.btn-primary, button.btn-primary {
  background: #7c8cff !important;
  color: #0c0c0e !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: none !important;
  text-transform: none !important;
}
.btn-primary:hover { background: #93a0ff !important; }
.btn-secondary {
  background: #222226 !important;
  border: 1px solid #3a3a42 !important;
  color: #ececee !important;
}
.btn-danger { background: #f04444 !important; color: #fff !important; border: none !important; }
input, textarea, .settings-input, #message-input {
  background: #121214 !important;
  border: 1px solid #2a2a30 !important;
  color: #ececee !important;
  border-radius: 0!important;
}
input:focus, textarea:focus {
  border-color: #7c8cff !important;
  box-shadow: 0 0 0 2px rgba(124,140,255,.22) !important;
}
.login-box, .auth-card, .modal-box, .zynced-modal, .settings-box {
  background: #1a1a1e !important;
  border: 1px solid #2a2a30 !important;
  box-shadow: 0 16px 48px rgba(0,0,0,.55) !important;
}
.login-page, #login-page { background: #0c0c0e !important; }
body::before, body::after { display: none !important; }

.password-card, .report-card {
  background: #222226;
  border: 1px solid #2a2a30;
  padding: 16px;
  margin-top: 8px;
}
.settings-hint {
  color: #8b8b96;
  font-size: 13px;
  margin: 0 0 14px;
  line-height: 1.45;
}
.settings-status { font-size: 13px; margin: 10px 0 0; color: #8b8b96; }
.settings-status.ok { color: #3dd68c; }
.settings-status.err { color: #f04444; }

.channels-ctx-menu {
  background: #121214 !important;
  border: 1px solid #2a2a30 !important;
  border-radius: 0!important;
}
.channels-ctx-menu button:hover { background: #7c8cff !important; color: #0c0c0e !important; }

/* avatars can stay round for readability; everything else square */
.server-icon, .server-icon img { border-radius: 0!important; }

/* ===== Nowoczesny composer + DM (nie rozciągnięty) ===== */
#chat-view {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#messages.messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 0 12px !important;
  max-width: 100%;
}

/* wiadomości – pełna szerokość czatu */
.message {
  max-width: none;
  margin: 0 !important;
  padding: 4px 16px !important;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.message + .message { margin-top: 2px !important; }
.message .msg-avatar {
  width: 40px !important;
  height: 40px !important;
  flex-shrink: 0;
  border-radius: 0!important;
}
.message .msg-body { min-width: 0; flex: 1; }
.message .msg-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}
.message .msg-author { font-weight: 600; font-size: 15px; color: #f2f3f5; }
.message .msg-time { font-size: 11px; color: #6d6f78; }
.message .msg-content {
  font-size: 15px;
  line-height: 1.45;
  color: #dbdee1;
  word-break: break-word;
}
.message .msg-media img {
  max-width: min(360px, 100%);
  border-radius: 0;
  margin-top: 6px;
}

/* pasek pisania – pełna szerokość */
.message-input-area {
  padding: 0 16px 20px !important;
  background: transparent !important;
  border-top: none !important;
  display: block;
  justify-content: stretch;
}
.composer-shell {
  width: 100%;
  max-width: none;
  position: relative;
}
.input-wrapper {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  background: #1e1f22 !important;
  border: 1px solid #2b2d31 !important;
  border-radius: 0!important;
  padding: 8px 10px !important;
  min-height: 48px;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.input-wrapper:focus-within {
  border-color: #3f4147 !important;
  box-shadow: 0 0 0 1px #3f4147, 0 4px 16px rgba(0,0,0,.3);
}
#message-input {
  flex: 1 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #f2f3f5 !important;
  font-size: 15px !important;
  padding: 6px 8px !important;
  min-width: 0;
}
#message-input::placeholder { color: #6d6f78 !important; }

.composer-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: none !important;
  color: #b5bac1 !important;
  cursor: pointer;
  border-radius: 0!important;
  padding: 0 !important;
  transition: background .12s ease, color .12s ease;
}
.composer-btn:hover {
  background: #2b2d31 !important;
  color: #f2f3f5 !important;
}
.composer-btn.gif-chip {
  width: auto !important;
  min-width: 40px;
  height: 28px !important;
  padding: 0 10px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .06em;
  border: 1px solid #4e5058 !important;
  color: #dbdee1 !important;
}
.composer-btn.gif-chip:hover {
  border-color: #7c8cff !important;
  color: #7c8cff !important;
  background: rgba(124,140,255,.08) !important;
}
.composer-btn.send {
  color: #7c8cff !important;
}
.composer-btn.send:hover {
  background: rgba(124,140,255,.15) !important;
  color: #93a0ff !important;
}

/* pickery nad inputem, w szerokości composera */
.composer-shell .picker-panel {
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  bottom: calc(100% + 8px) !important;
  border-radius: 0!important;
  background: #1e1f22 !important;
  border: 1px solid #2b2d31 !important;
}

.upload-preview {
  margin-bottom: 8px;
  padding: 8px;
  background: #1e1f22;
  border: 1px solid #2b2d31;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* DM header bardziej kompaktowy */
body.dm-mode .chat-header,
#chat-view.dm-active .chat-header {
  max-width: 100%;
}
#chat-header {
  padding: 12px 20px !important;
}

/* chat header content narrower feel */
.chat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #2a2a30 !important;
}

@media (max-width: 900px) {
  .message, .composer-shell { max-width: 100%; }
  .message { padding: 6px 12px !important; }
  .message-input-area { padding: 0 10px 14px !important; }
}

/* ===== Nowoczesny pasek wiadomości + DM ===== */
.message-input-area {
  padding: 0 16px 20px !important;
  background: transparent !important;
  border-top: none !important;
}
.input-wrapper {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  background: #1e1f22 !important;
  border: 1px solid #2b2d31 !important;
  border-radius: 0!important;
  padding: 0 8px 0 4px !important;
  min-height: 48px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input-wrapper:focus-within {
  border-color: #3f4147 !important;
  box-shadow: 0 0 0 1px rgba(124,140,255,.2), 0 4px 16px rgba(0,0,0,.3);
}
.composer-btn,
.upload-btn,
#emoji-btn,
#gif-btn,
#send-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  color: #b5bac1 !important;
  border-radius: 0!important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  transition: background .12s ease, color .12s ease !important;
}
.composer-btn:hover,
.upload-btn:hover,
#emoji-btn:hover {
  background: rgba(255,255,255,.06) !important;
  color: #f2f3f5 !important;
}
#gif-btn.gif-chip,
#gif-btn {
  width: auto !important;
  min-width: 40px !important;
  height: 26px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .06em !important;
  border: 1.5px solid #4e5058 !important;
  border-radius: 0!important;
  color: #b5bac1 !important;
  background: transparent !important;
}
#gif-btn:hover {
  border-color: #f2f3f5 !important;
  color: #f2f3f5 !important;
  background: rgba(255,255,255,.04) !important;
}
#send-btn.composer-btn.send,
#send-btn {
  width: 36px !important;
  height: 36px !important;
  color: #7c8cff !important;
  border-radius: 0!important;
}
#send-btn:hover {
  background: rgba(124,140,255,.15) !important;
  color: #93a0ff !important;
}
#message-input {
  flex: 1 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #f2f3f5 !important;
  font-size: 15px !important;
  padding: 10px 8px !important;
  min-width: 0 !important;
  outline: none !important;
}
#message-input::placeholder {
  color: #6d6f78 !important;
}
#message-input:focus {
  border: none !important;
  box-shadow: none !important;
}

/* DM – nowoczesny wygląd rozmowy */
#chat-view.dm-mode .chat-header,
body.dm-open .chat-header {
  background: #1a1a1e !important;
  border-bottom: 1px solid #2a2a30 !important;
  min-height: 48px;
  padding: 0 16px;
}
#messages {
  background: #121214 !important;
  padding: 16px 8px 8px !important;
}
.message {
  display: flex;
  gap: 12px;
  padding: 4px 12px 4px 8px !important;
  border-radius: 0;
  margin: 0 !important;
}
.message:hover {
  background: rgba(255,255,255,.03) !important;
}
.message .msg-avatar,
.message-avatar {
  width: 40px !important;
  height: 40px !important;
  border-radius: 0!important;
  flex-shrink: 0;
  margin-top: 2px;
}
.message .msg-body { min-width: 0; flex: 1; }
.message .msg-author {
  font-weight: 600;
  font-size: 15px;
  color: #f2f3f5;
  margin-right: 6px;
}
.message .msg-time {
  font-size: 11px;
  color: #6d6f78;
}
.message .msg-content {
  font-size: 15px;
  line-height: 1.45;
  color: #dbdee1;
  word-break: break-word;
}
.message .msg-media img {
  max-width: min(420px, 100%);
  border-radius: 0;
  margin-top: 6px;
  border: 1px solid #2a2a30;
}

/* nagłówek DM – czytelniejszy */
#chat-header #current-channel-name {
  font-weight: 600;
  font-size: 15px;
  color: #f2f3f5;
}
#header-icon {
  color: #8b8b96;
  margin-right: 6px;
}

/* podgląd uploadu nad paskiem */
.upload-preview {
  background: #1e1f22;
  border: 1px solid #2b2d31;
  border-radius: 0;
  padding: 8px 10px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* full width chat */
#chat-view,
#chat-view.dm-active,
body.dm-mode #chat-view {
  flex: 1 1 auto !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}
#messages,
#messages.messages {
  max-width: none !important;
  width: 100% !important;
}
.message-input-area,
.composer-shell,
.input-wrapper {
  max-width: none !important;
  width: 100% !important;
}
.main {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: auto !important;
}

.channel-edit-box {
  max-width: 440px;
  width: 94vw;
}
.channel-edit-box .channel-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.channel-edit-box .channel-name-prefix {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #222226;
  border: 1px solid #2a2a30;
  color: #b5bac1;
  font-weight: 700;
}
.channel-edit-box .channel-name-row .settings-input {
  flex: 1;
}
.channel-edit-box .channel-create-sub {
  color: #8b8b96;
  font-size: 13px;
  line-height: 1.45;
  margin: 0 0 14px;
}

/* ===== Sklep: jeden produkt + animacje 3D ===== */
.shop-grid-single {
  display: grid !important;
  grid-template-columns: minmax(280px, 420px) !important;
  justify-content: center;
  gap: 24px;
  padding: 8px 0 24px;
}
.shop-hero-support h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}
.shop-card-3d,
.card-3d {
  transform-style: preserve-3d;
  perspective: 800px;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease, border-color .2s ease;
  will-change: transform;
}
.shop-card-3d:hover,
.card-3d:hover {
  transform: translateY(-8px) rotateX(6deg) rotateY(-4deg) scale(1.02);
  box-shadow: 0 24px 48px rgba(0,0,0,.45), 0 0 0 1px rgba(124,140,255,.25);
  border-color: #7c8cff !important;
}
.shop-card-icon.support {
  background: linear-gradient(135deg, #7c8cff, #f04488);
  color: #fff;
  font-size: 28px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
a.btn-shop.btn-support {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: #7c8cff !important;
  color: #0c0c0e !important;
  font-weight: 700;
  padding: 12px 18px;
  border: none;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
a.btn-shop.btn-support:hover {
  background: #93a0ff !important;
  transform: translateY(-2px);
}

/* dodatki 3d grid */
.addons-grid {
  perspective: 1000px;
}
.addons-card.card-3d {
  background: #1e1f22;
  border: 1px solid #2a2a30;
}
.addons-view.is-open {
  animation: addonsIn .28s ease;
}
@keyframes addonsIn {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
#shop-view {
  animation: addonsIn .28s ease;
}

/* serwer icons subtle 3d */
.server-icon {
  transition: transform .2s ease, box-shadow .2s ease !important;
}
.server-icon:hover {
  transform: translateY(-3px) scale(1.05) !important;
}

/* channel hover lift */
.channel {
  transition: transform .15s ease, background .15s ease;
}
.channel:hover {
  transform: translateX(2px);
}

/* Szablony serwera */
.template-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0 4px;
}
.template-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px;
  background: #121214;
  border: 1px solid #2a2a30;
  color: #dbdee1;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color .15s, transform .15s;
}
.template-card:hover { border-color: #4e5058; transform: translateY(-1px); }
.template-card.active { border-color: #7c8cff; box-shadow: 0 0 0 1px #7c8cff; }
.template-icon { font-size: 18px; }
.template-title { font-weight: 700; font-size: 13px; color: #f2f3f5; }
.template-desc { font-size: 11px; color: #8b8b96; }

/* Discover / Disboard-like */
.server-icon.discover { color: #3dd68c; }
.server-icon.discover:hover, .server-icon.discover.active {
  background: #3dd68c !important;
  color: #0c0c0e !important;
  border-color: #3dd68c !important;
}
.discover-view {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px 40px;
  display: none;
  flex-direction: column;
  gap: 20px;
  background: #121214;
}
.discover-view.is-open { display: flex !important; }
.discover-hero h2 { margin: 8px 0; font-size: 1.8rem; }
.discover-hero p { color: #8b8b96; margin: 0 0 16px; max-width: 560px; }
.discover-search-row {
  display: flex;
  gap: 8px;
  max-width: 520px;
  margin-bottom: 12px;
}
.discover-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.discover-tag {
  background: #1e1f22;
  border: 1px solid #2a2a30;
  color: #b5bac1;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.discover-tag:hover { border-color: #4e5058; color: #fff; }
.discover-tag.active { border-color: #7c8cff; color: #7c8cff; }
.discover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.discover-card {
  background: #1e1f22;
  border: 1px solid #2a2a30;
  padding: 14px;
  display: flex;
  gap: 12px;
}
.discover-card-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
  color: #fff;
  overflow: hidden;
}
.discover-card-icon img { width: 100%; height: 100%; object-fit: cover; }
.discover-card-body { min-width: 0; flex: 1; }
.discover-card-body h3 { margin: 0 0 4px; font-size: 15px; color: #f2f3f5; }
.discover-card-body p {
  margin: 0 0 8px;
  font-size: 12px;
  color: #8b8b96;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.discover-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-size: 12px;
  color: #b5bac1;
}
.discover-card-tag {
  background: #121214;
  border: 1px solid #2a2a30;
  padding: 2px 6px;
  font-size: 10px;
  color: #8b8b96;
}
.discover-join { width: 100%; padding: 8px !important; }
.discover-join:disabled { opacity: .55; cursor: default; }

.addons-grid-single {
  grid-template-columns: minmax(260px, 400px) !important;
  justify-content: start;
}

.discover-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}
.discover-hero-top h2 { margin: 8px 0; }
#list-server-select {
  width: 100%;
  background: #121214;
  color: #f2f3f5;
  border: 1px solid #2a2a30;
  padding: 10px;
}

/* Linki w czacie jak Discord */
.chat-link,
a.chat-link,
a.zynced-link {
  color: #00a8fc !important;
  text-decoration: none;
  cursor: pointer;
  word-break: break-all;
}
.chat-link:hover,
a.chat-link:hover,
a.zynced-link:hover {
  text-decoration: underline;
  color: #4cb8ff !important;
}
.message-text .chat-link {
  font-weight: 500;
}

/* Linki czatu – wymuszenie niebieskiego */
.message-text a.chat-link,
.message-text a.zynced-link,
.message-content a.chat-link,
.message-content a.zynced-link,
#messages a.chat-link,
#messages a.zynced-link {
  color: #00a8fc !important;
  text-decoration: none !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  word-break: break-all !important;
  font-weight: 500 !important;
}
.message-text a.chat-link:hover,
.message-text a.zynced-link:hover,
#messages a.chat-link:hover,
#messages a.zynced-link:hover {
  color: #4cb8ff !important;
  text-decoration: underline !important;
}

/* Pełny ekran: Sklep / Serwery / Dodatki */
body.view-fullscreen .sidebar {
  display: none !important;
}
body.view-fullscreen .user-panel {
  display: none !important;
}
body.view-fullscreen .server-header {
  display: none !important;
}
body.view-fullscreen .main {
  flex: 1 1 auto !important;
  width: 100% !important;
  max-width: none !important;
}
/* tylko aktywny widok – nie wszystkie naraz */
body.view-shop #shop-view,
body.view-discover #discover-view,
body.view-addons #addons-view,
body.view-addons .addons-view {
  display: flex !important;
  flex-direction: column;
  flex: 1 1 auto !important;
  width: 100% !important;
  min-height: 0 !important;
  max-width: none !important;
  padding: 28px 40px 48px !important;
  overflow-y: auto !important;
}
body.view-shop #discover-view,
body.view-shop #addons-view,
body.view-discover #shop-view,
body.view-discover #addons-view,
body.view-addons #shop-view,
body.view-addons #discover-view {
  display: none !important;
}
body.view-fullscreen .shop-grid,
body.view-fullscreen .discover-grid,
body.view-fullscreen .addons-grid {
  max-width: 1100px;
}

/* Baner serwera */
.server-banner-bar {
  height: 120px;
  background-size: cover;
  background-position: center;
  background-color: #1e1f22;
  border-bottom: 1px solid #2a2a30;
  flex-shrink: 0;
}
.server-banner-preview {
  width: 100%;
  max-width: 480px;
  height: 135px;
  background: #1e1f22;
  background-size: cover;
  background-position: center;
  border: 1px solid #2a2a30;
  position: relative;
  cursor: pointer;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.server-banner-preview .server-banner-placeholder {
  color: #8b8b96;
  font-size: 13px;
}
.server-banner-preview .upload-hint {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}
.server-banner-preview:hover .upload-hint { display: flex; }
.crop-wide, .crop-circle.crop-wide {
  width: 420px !important;
  height: 236px !important;
  border-radius: 0!important;
}

/* Nowoczesny głos / wideo */
#voice-bar.voice-bar-modern,
.voice-bar-modern {
  background: linear-gradient(180deg, #1a1b1e 0%, #121214 100%) !important;
  border-top: 1px solid #2a2a30 !important;
  padding: 10px 12px !important;
  gap: 8px !important;
}
.voice-bar-modern .voice-connection-status {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #3dd68c !important;
}
.voice-bar-modern .voice-channel-name {
  font-size: 13px;
  color: #f2f3f5;
  font-weight: 600;
}
.voice-user-item {
  background: #1e1f22 !important;
  border: 1px solid #2a2a30 !important;
  border-radius: 0!important;
  padding: 6px 8px !important;
  transition: border-color .15s, background .15s;
}
.voice-user-item.speaking {
  border-color: #3dd68c !important;
  box-shadow: 0 0 0 1px #3dd68c;
}
.voice-user-item .voice-user-avatar {
  border-radius: 0!important;
}
.voice-user-item .voice-user-avatar.self {
  outline: 2px solid #7c8cff;
}
.voice-controls, .voice-bar-modern .voice-controls {
  display: flex;
  gap: 6px;
}
.voice-controls button,
.voice-bar-modern button {
  border-radius: 0!important;
  background: #2b2d31 !important;
  border: 1px solid #3f4147 !important;
  color: #f2f3f5 !important;
  transition: background .15s, border-color .15s, transform .1s;
}
.voice-controls button:hover {
  background: #35373c !important;
  border-color: #7c8cff !important;
}
.voice-controls button.muted,
.voice-controls button.deafened {
  background: #4a1d1f !important;
  border-color: #f04444 !important;
  color: #f04444 !important;
}

body:not(.view-fullscreen) .sidebar {
  display: flex !important;
  flex-direction: column;
}
body:not(.view-fullscreen) .user-panel {
  display: flex !important;
}

/* Optymalizacja renderu */
#messages {
  content-visibility: auto;
  contain: content;
}
.message {
  contain: layout style;
}
.server-icon img,
.member-avatar img,
.message-avatar img {
  content-visibility: auto;
}
.channels, #dm-list, #members-list {
  contain: content;
}

/* Nawigacja widoków – twardy fallback */
#shop-view:not(.is-open),
#addons-view:not(.is-open),
#discover-view:not(.is-open),
#friends-view:not(.is-open),
#chat-view:not(.is-open) {
  display: none !important;
}
#shop-view.is-open,
#addons-view.is-open,
.addons-view.is-open,
#discover-view.is-open,
#friends-view.is-open,
#chat-view.is-open {
  display: flex !important;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.servers-bar {
  z-index: 50;
  position: relative;
  pointer-events: auto !important;
}
.servers-bar .server-icon {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* Szybkie, płynne widoki */
#shop-view.is-open,
#addons-view.is-open,
#discover-view.is-open,
#friends-view.is-open {
  animation: zyncedViewIn .2s ease-out;
}
@keyframes zyncedViewIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.server-icon.active {
  box-shadow: 0 0 0 2px #7c8cff !important;
}
/* mniej janku przy scrollu */
.messages, .discover-grid, .channels {
  content-visibility: auto;
  contain: content;
}

#icon-crop-modal {
  z-index: 10050 !important;
}
#icon-crop-modal .modal-box {
  z-index: 10051 !important;
}

/* NAV FULLSCREEN HARD */
body.view-fullscreen .sidebar,
body.view-shop .sidebar,
body.view-addons .sidebar,
body.view-discover .sidebar { display: none !important; }
body.view-fullscreen .user-panel,
body.view-shop .user-panel,
body.view-addons .user-panel,
body.view-discover .user-panel { display: none !important; }
body.view-fullscreen #shop-view.is-open,
body.view-fullscreen #addons-view.is-open,
body.view-fullscreen #discover-view.is-open {
  display: flex !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
}
body.view-fullscreen #friends-view,
body.view-fullscreen #chat-view { display: none !important; }
#servers-bar .server-icon { cursor: pointer; pointer-events: auto; }
#servers-bar .server-icon svg { pointer-events: none; }


/* GLOBAL ROUNDED – wszystko zaokrąglone */
:root {
  --radius: 10px;
  --radius-lg: 14px;
  --radius-sm: 8px;
  --radius-full: 999px;
}

* {
  border-radius: 0;
}

.server-icon,
.server-icon img,
.server-icon.home,
.server-icon.shop,
.server-icon.addons,
.server-icon.discover,
.server-icon.add {
  border-radius: 0!important;
}
.server-icon:hover,
.server-icon.active {
  border-radius: 0!important;
}

.modal-box,
.zynced-modal,
.settings-box,
.modal .modal-box {
  border-radius: 0!important;
}

.btn-primary,
.btn-secondary,
.btn-danger,
button.btn-primary,
button.btn-secondary {
  border-radius: 0!important;
}

.settings-input,
input.settings-input,
textarea.settings-input,
select.settings-input,
input[type="text"],
input[type="password"],
input[type="email"],
textarea {
  border-radius: 0!important;
}

.channel,
.channel-category,
.member,
.friend-row,
.dm-item,
.message,
.discover-card,
.addons-card,
.shop-card,
.template-card,
.user-panel,
.voice-user-item,
.voice-bar-modern,
#voice-bar,
.server-banner-preview,
.server-banner-bar,
.server-icon-preview,
.settings-avatar-large,
.msg-more-menu,
.channels-ctx-menu,
.server-dropdown-menu,
.mention-popup,
.gif-picker,
.emoji-picker,
.chat-input-bar,
#message-input,
.message-input-wrap,
.upload-preview,
.invite-code-box,
.role-side-item,
.role-editor,
.ss-member-row,
.discover-tag,
.shop-side-item,
.password-card,
.report-card {
  border-radius: 0!important;
}

.user-avatar,
.user-panel .user-avatar,
.member-avatar,
.message-avatar,
.friend-avatar,
.profile-avatar-wrap,
.profile-avatar-wrap > div,
.dp-avatar,
.voice-user-avatar,
.settings-avatar-large img,
.server-icon-preview img {
  border-radius: 0!important;
}

.server-banner-bar,
.server-banner-preview,
.dp-banner,
#profile-banner,
.settings-banner-preview {
  border-radius: 0!important;
}

::-webkit-scrollbar-thumb {
  border-radius: 0!important;
}

/* crop frames */
.crop-circle {
  border-radius: 0!important;
}
.crop-wide,
.crop-circle.crop-wide {
  border-radius: 0!important;
}

#friends-btn.server-icon.home {
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* friends icon svg */
.server-icon.home svg {
  width: 24px;
  height: 24px;
  display: block;
}

/* Drag & drop kanałów */
.channel-draggable {
  cursor: grab;
}
.channel-draggable:active {
  cursor: grabbing;
}
.channel.dragging {
  opacity: 0.45;
}
.category-channels {
  min-height: 8px;
  padding-bottom: 4px;
  border-radius: 0;
  transition: background .15s, outline .15s;
}
.category-channels.drag-over {
  background: rgba(124, 140, 255, 0.12);
  outline: 1px dashed #7c8cff;
}
.category-block {
  margin-bottom: 2px;
}

.channel-category {
  cursor: pointer;
  user-select: none;
}
.channel-category .cat-arrow {
  display: inline-block;
  width: 14px;
  transition: transform .15s;
}
.category-block.collapsed .cat-arrow {
  /* text set in JS */
}

.bot-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  background: #5865f2;
  color: #fff;
  padding: 1px 5px;
  border-radius: 0;
  vertical-align: middle;
  margin-left: 4px;
}
.member.is-bot .member-name { font-weight: 600; }
.bot-install-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #1e1f22;
  border: 1px solid #2a2a30;
  border-radius: 0;
  margin-bottom: 16px;
}
.bot-install-icon {
  width: 48px;
  height: 48px;
  border-radius: 0;
  background: #5865f2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.bot-install-hero strong { display: block; color: #f2f3f5; }
.bot-install-hero span { font-size: 12px; color: #8b8b96; }
#bot-install-select {
  width: 100%;
  background: #121214;
  color: #f2f3f5;
  border: 1px solid #2a2a30;
  padding: 10px;
  border-radius: 0;
}

.addon-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.addon-actions .btn-primary,
.addon-actions .btn-secondary {
  flex: 1;
  padding: 10px 12px;
  border-radius: 0;
  font-weight: 600;
}
.addon-status-hint {
  margin-top: 10px;
  font-size: 12px;
  color: #8b8b96;
}
#bot-config-server,
#bot-welcome-channel,
#bot-ticket-category {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.lang-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}
.lang-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #1e1f22;
  border: 1px solid #2a2a30;
  border-radius: 0;
  color: #f2f3f5;
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: border-color .15s, background .15s;
}
.lang-option:hover { border-color: #7c8cff; background: #232428; }
.lang-option.active {
  border-color: #5865f2;
  background: rgba(88,101,242,.12);
}
.lang-flag { font-size: 22px; }
.lang-name { flex: 1; font-weight: 600; }
.lang-check {
  opacity: 0;
  color: #5865f2;
  font-weight: 800;
}
.lang-option.active .lang-check { opacity: 1; }

.slash-popup, #slash-popup {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  margin-bottom: 8px;
  background: #1e1f22;
  border: 1px solid #2a2a30;
  border-radius: 0;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
  max-height: 260px;
  overflow-y: auto;
  z-index: 50;
  padding: 6px;
}
.slash-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: #f2f3f5;
  border-radius: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.slash-item:hover, .slash-item.active {
  background: #5865f2;
}
.slash-cmd {
  font-weight: 700;
  font-size: 14px;
}
.slash-desc {
  font-size: 12px;
  color: #b5bac1;
}
.slash-item:hover .slash-desc, .slash-item.active .slash-desc {
  color: rgba(255,255,255,.85);
}
.ticket-setup-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0;
}
.ticket-setup-btn {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  background: #1e1f22;
  border: 1px solid #2a2a30;
  border-radius: 0;
  color: #f2f3f5;
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.ticket-setup-btn:hover {
  border-color: #5865f2;
  background: #232428;
}
.ticket-setup-icon { font-size: 22px; }
.ticket-setup-btn strong { display: block; margin-bottom: 2px; }
.ticket-setup-btn small { color: #8b8b96; font-size: 12px; }
.ticket-panel-card {
  background: #1e1f22;
  border: 1px solid #2a2a30;
  border-left: 4px solid #5865f2;
  border-radius: 0;
  padding: 14px 16px;
  max-width: 420px;
  margin-top: 4px;
}
.ticket-panel-title { font-weight: 700; margin-bottom: 6px; }
.ticket-panel-body { color: #b5bac1; font-size: 14px; margin-bottom: 12px; }
.ticket-panel-btn { width: auto; padding: 8px 16px; }
.input-wrapper { position: relative; }

/* Zakładki znajomych (jak Discord) */
.friends-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 16px 20px 0;
}
.friends-header h3 {
  margin: 0;
  font-size: 16px;
}
.friends-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid #2a2a30;
  padding-bottom: 12px;
}
.friends-tab {
  background: transparent;
  border: none;
  color: #b5bac1;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.friends-tab:hover {
  background: rgba(255,255,255,.06);
  color: #f2f3f5;
}
.friends-tab.active {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.friends-tab-badge {
  background: #ed4245;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 0;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.friends-tab-panels {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px 20px;
}
.friends-section-label {
  font-size: 12px;
  font-weight: 700;
  color: #949ba4;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin: 8px 0 12px;
}
.add-friend-box-tab {
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.add-friend-box-tab input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 0;
  border: 1px solid #2a2a30;
  background: #1e1f22;
  color: #f2f3f5;
}


/* ===== MiroTalk SFU panel ===== */
#mirotalk-panel {
  position: fixed;
  right: 16px;
  bottom: 72px;
  width: min(420px, calc(100vw - 32px));
  height: min(320px, 40vh);
  background: #1e1f22;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 0;
  box-shadow: 0 16px 48px rgba(0,0,0,.5);
  z-index: 9500;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
#mirotalk-panel.open { display: none !important; } /* Discord-style: bez osobnego okna */
#mirotalk-panel .mirotalk-head {
  height: 36px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #2b2d31;
  color: #f2f3f5;
  font-size: 13px;
  font-weight: 600;
}
#mirotalk-panel .mirotalk-close {
  border: 0;
  background: transparent;
  color: #b5bac1;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 0;
}
#mirotalk-panel .mirotalk-close:hover { background: #ed4245; color: #fff; }
#mirotalk-panel iframe {
  flex: 1;
  width: 100%;
  border: 0;
  background: #111;
}

/* Użytkownicy pod kanałem głosowym (jak Discord) */
.channel-item.voice.active-voice .ch-name { color: var(--success); }
.voice-users-under {
  margin: 0 0 4px 28px;
  padding: 0;
  list-style: none;
}
.voice-users-under .vu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 0;
  font-size: 13px;
  color: var(--text-muted);
}
.voice-users-under .vu-item:hover { background: var(--bg-hover); color: var(--text); }
.voice-users-under .vu-av {
  width: 20px; height: 20px; border-radius: 0;
  display: grid; place-items: center; font-size: 10px; font-weight: 700; overflow: hidden;
  background: var(--accent); color: #fff; flex-shrink: 0;
}
.voice-users-under .vu-av img { width: 100%; height: 100%; object-fit: cover; }
.voice-users-under .vu-item.speaking .vu-av {
  box-shadow: 0 0 0 2px var(--success);
}


/* Lista osób pod kanałem głosowym – jak Discord */
.voice-under,
.voice-under-channel {
  display: block;
  padding: 2px 8px 6px 30px;
  min-height: 0;
}
.voice-under .vu,
.voice-under-channel .vu {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: default;
}
.voice-under .vu:hover,
.voice-under-channel .vu:hover {
  background: var(--bg-modifier);
  color: var(--text);
}
.voice-under .vu .av,
.voice-under-channel .vu .av {
  width: 24px;
  height: 24px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--accent);
}
.voice-under .vu .av img,
.voice-under-channel .vu .av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.voice-under .vu .vu-name,
.voice-under-channel .vu .vu-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.voice-under .vu.speaking .av,
.voice-under-channel .vu.speaking .av {
  box-shadow: 0 0 0 2px var(--success);
}
.channel.voice.in-voice .channel-name {
  color: var(--success);
}


/* ===== SOON (ex Dodatki) ===== */
.addons-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-app);
  min-width: 0;
  min-height: 0;
  overflow: auto;
}
.addons-header {
  padding: 24px 28px 8px;
  border-bottom: 1px solid var(--border-subtle);
}
.addons-header h2 { margin: 0 0 6px; font-size: 22px; font-weight: 700; }
.addons-header p { margin: 0; color: var(--text-muted); }
.addons-grid-single {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.addons-soon {
  text-align: center;
  max-width: 420px;
  padding: 40px 32px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.soon-badge {
  display: inline-block;
  padding: 6px 14px;
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #fff;
  background: linear-gradient(135deg, #5865F2, #a855f7);
  border-radius: 0;
}
.addons-soon h3 {
  margin: 0 0 10px;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.addons-soon p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

/* RShop-like ambient on fullscreen views */
body.view-addons #app,
body.view-shop #app,
body.view-discover #app {
  background: #0B0B0B;
}
body.view-addons .addons-view,
body.view-shop .shop-view,
body.view-discover .discover-view {
  background:
    radial-gradient(circle at 25% 20%, rgba(168,85,247,0.06), transparent 40%),
    radial-gradient(circle at 75% 70%, rgba(88,101,242,0.05), transparent 42%),
    #0B0B0B;
}

/* Ostrzejsze karty / modale */
.modal, .modal-box, .card, .discover-card, .shop-card, .settings-panel {
  border-radius: 0!important;
}
.btn-primary, .btn-secondary, button.primary {
  border-radius: 0!important;
}
input, textarea, select {
  border-radius: 0!important;
}





/* ===== NOWOCZESNE ZAOKRĄGLENIA (cała app) ===== */
:root {
  --radius: 10px;
  --radius-lg: 14px;
  --radius-full: 999px;
}

.server-icon {
  border-radius: 12px !important;
  overflow: hidden;
}
.server-icon:hover,
.server-icon.active {
  border-radius: 12px !important;
}
.server-icon.home .home-logo {
  border-radius: 12px !important;
}

.channel, .member, .dm-item, .message, .btn, .btn-primary, .btn-secondary,
button, input, textarea, select, .modal-box, .modal-content, .card,
.discover-card, .shop-card, .settings-panel, .dropdown-menu, .context-menu,
.login-box, .tab, .form-group input, .remember-card, .addons-soon {
  border-radius: var(--radius) !important;
}

/* Avatary okrągłe */
.avatar, .user-avatar, .member-avatar, .message-avatar, .voice-user-avatar,
.vu .av, .dm-call-tile-avatar, .brand-logo {
  border-radius: 50% !important;
}

/* Chat – zaokrąglenia */
#messages, .messages, .message-group, .msg-bubble, .chat-input-wrap,
#input-area, .input-area, #message-input, .message-input {
  border-radius: var(--radius) !important;
}
.chat-header {
  border-radius: 0 !important;
}



/* ===== STRONA LOGOWANIA – nowoczesny styl (RShop / blob) ===== */
#login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: auto;
  background: #0B0B0B;
  padding: 24px;
}
#login-screen::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 25%, rgba(168,85,247,0.12), transparent 42%),
    radial-gradient(circle at 80% 70%, rgba(88,101,242,0.10), transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.02), transparent 55%),
    #0B0B0B;
}
#login-screen::after {
  content: "";
  position: fixed;
  width: 420px;
  height: 420px;
  top: 10%;
  left: 12%;
  border-radius: 50%;
  background: rgba(168,85,247,0.08);
  filter: blur(70px);
  animation: zynced-blob 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes zynced-blob {
  0%, 100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(30px,-20px) scale(1.06); }
  66% { transform: translate(-20px,25px) scale(0.96); }
}
#login-screen .login-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: rgba(18,18,18,0.82);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px !important;
  padding: 36px 32px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
}
#login-screen .login-logo h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
#login-screen .login-logo .brand-logo {
  width: 72px;
  height: 72px;
  border-radius: 16px !important;
  object-fit: contain;
}
#login-screen .tabs {
  display: flex;
  gap: 8px;
  margin: 18px 0 20px;
  background: rgba(255,255,255,0.03);
  padding: 4px;
  border-radius: 12px !important;
}
#login-screen .tab {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  padding: 10px 12px;
  border-radius: 10px !important;
  font-weight: 600;
}
#login-screen .tab.active {
  background: rgba(88,101,242,0.25);
  color: #fff;
}
#login-screen input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  padding: 12px 14px;
  border-radius: 10px !important;
}
#login-screen button[type="submit"],
#login-screen .btn-primary {
  width: 100%;
  margin-top: 8px;
  padding: 12px 16px;
  border: 0;
  background: #5865F2;
  color: #fff;
  font-weight: 700;
  border-radius: 10px !important;
  transition: 0.2s ease;
}
#login-screen button[type="submit"]:hover,
#login-screen .btn-primary:hover {
  background: #4752C4;
  transform: translateY(-1px);
}


/* ===== FINAL: jednolite zaokrąglenia ===== */
:root {
  --radius: 10px;
  --radius-lg: 14px;
  --radius-full: 999px;
}

/* GÓRNY PASEK – BEZ zaokrągleń */
.chat-header,
#chat-header,
.server-header,
#server-header {
  border-radius: 0 !important;
}

/* DOLNY PASEK – ZAOKRĄGLONY profil / mic / słuchawki */
.user-panel {
  border-radius: 0 !important; /* sam pasek pełna szerokość */
}
.user-panel .user-avatar,
#user-avatar-btn {
  border-radius: 50% !important;
}
.user-panel .user-control-btn,
#user-mic-btn,
#user-headphones-btn,
#user-settings-btn {
  border-radius: 8px !important;
}
.user-panel .user-info {
  border-radius: 8px;
  padding: 2px 6px;
}
.user-panel .user-info:hover {
  background: rgba(255,255,255,0.04);
}

/* Reszta UI – zaokrąglone */
.server-icon { border-radius: 12px !important; }
.channel, .member, .dm-item, .message,
.btn, .btn-primary, .btn-secondary, button.primary,
input, textarea, select,
.modal-box, .modal-content, .card, .discover-card, .shop-card,
.settings-panel, .dropdown-menu, .context-menu, .login-box,
.tab, .voice-control-btn, .channel-hash {
  border-radius: var(--radius) !important;
}
.avatar, .member-avatar, .message-avatar, .voice-user-avatar, .vu .av {
  border-radius: 50% !important;
}
#message-input, .message-input, #input-area .input-wrap, .chat-input-box {
  border-radius: 12px !important;
}


/* SOON – na środku, bez ramki */
#addons-view.addons-view,
.addons-view {
  display: none;
  flex: 1;
  align-items: center;
  justify-content: center;
  background: #0B0B0B;
  min-height: 0;
}
body.view-addons #addons-view.addons-view,
body.view-addons .addons-view {
  display: flex !important;
}
.addons-soon-full {
  width: 100%;
  height: 100%;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.soon-only {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
  box-shadow: none !important;
  font-size: clamp(72px, 16vw, 160px) !important;
  font-weight: 900 !important;
  letter-spacing: 0.14em !important;
  color: #fff !important;
  text-align: center;
  line-height: 1;
}
.addons-header,
.addons-soon,
.soon-badge {
  display: none !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Avatar w dolnym pasku – bez klikania do ustawień (kursor domyślny) */
#user-avatar-btn,
.user-panel .user-avatar {
  cursor: default !important;
}
#user-info-btn,
.user-panel .user-info {
  cursor: default !important;
}
.user-panel .user-info:hover {
  background: transparent !important;
}


/* ===== USTAWIENIA – NA ŚRODKU + RESPONSYWNE ===== */
.account-settings-modal {
  position: fixed !important;
  inset: 0 !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(0,0,0,0.75) !important;
  z-index: 10000 !important;
  padding: 16px !important;
  overflow: auto !important;
}
.account-settings-modal .settings-box {
  width: min(720px, 100%) !important;
  max-width: 720px !important;
  max-height: min(90vh, 900px) !important;
  margin: auto !important;
  background: #121212 !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  border-radius: 14px !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-shadow: 0 24px 80px rgba(0,0,0,0.55) !important;
}
.account-settings-modal .settings-content {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  width: 100% !important;
  overflow: hidden !important;
}
.account-settings-modal .settings-sidebar {
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  padding: 14px 16px !important;
  border-right: none !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
  background: #0e0e0e !important;
  overflow-x: auto !important;
}
.account-settings-modal .settings-sidebar-category {
  display: none !important;
}
.account-settings-modal .settings-sidebar-btn {
  width: auto !important;
  flex: 0 0 auto !important;
  padding: 8px 14px !important;
  border-radius: 999px !important;
  text-align: center !important;
  white-space: nowrap !important;
}
.account-settings-modal .settings-main {
  flex: 1 !important;
  overflow-y: auto !important;
  padding: 20px 22px 28px !important;
  width: 100% !important;
}
.account-settings-modal .settings-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 16px 20px !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
}
.account-settings-modal .settings-body {
  max-width: 560px !important;
  margin: auto !important;
  width: 100% !important;
}
.account-settings-modal .settings-footer {
  justify-content: center !important;
  gap: 10px !important;
  padding: 14px 20px !important;
  border-top: 1px solid rgba(255,255,255,0.06) !important;
}


/* Responsywność – laptopy / małe ekrany */
@media (max-width: 1200px) {
  .members-panel { width: 200px !important; }
}
@media (max-width: 980px) {
  .members-panel { display: none !important; }
  .sidebar { width: 220px !important; }
}
@media (max-width: 768px) {
  .servers-bar { width: 56px !important; }
  .sidebar { width: 180px !important; }
  .account-settings-modal .settings-box {
    max-height: 100vh !important;
    height: 100% !important;
    border-radius: 0 !important;
    width: 100% !important;
  }
  .account-settings-modal { padding: 0 !important; }
  #login-screen .login-box { max-width: 100% !important; }
}
@media (max-width: 560px) {
  .sidebar { display: none !important; }
  .servers-bar { width: 52px !important; }
}


/* ===== USTAWIENIA – wyśrodkowane + responsywne ===== */
.account-settings-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10000 !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  padding: clamp(12px, 3vw, 28px) !important;
  overflow-y: auto !important;
  background: rgba(0,0,0,0.65) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-sizing: border-box !important;
}
.account-settings-modal[style*="display: flex"],
.account-settings-modal[style*="display:flex"],
.account-settings-modal.show,
.account-settings-modal.is-open {
  display: flex !important;
}
.account-settings-modal .settings-box {
  width: min(920px, 100%) !important;
  height: auto !important;
  max-width: 920px !important;
  max-height: min(86vh, 680px) !important;
  margin: auto !important;
  border-radius: 14px !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  background: #121212 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: 0 24px 80px rgba(0,0,0,0.55) !important;
}
.account-settings-modal .settings-content {
  display: flex !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  width: 100% !important;
  overflow: hidden !important;
}
.account-settings-modal .settings-sidebar {
  width: clamp(132px, 26vw, 210px) !important;
  flex-shrink: 0 !important;
  overflow-y: auto !important;
  border-right: 1px solid rgba(255,255,255,0.06) !important;
}
.account-settings-modal .settings-main {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow-y: auto !important;
}
.account-settings-modal .settings-body {
  max-width: 100% !important;
  width: 100% !important;
  padding: clamp(14px, 2.5vw, 28px) clamp(14px, 3vw, 32px) !important;
  box-sizing: border-box !important;
}
.account-settings-modal .settings-header {
  flex-shrink: 0 !important;
  padding: clamp(12px, 2vw, 20px) clamp(14px, 3vw, 28px) !important;
}
.account-settings-modal .settings-footer {
  flex-shrink: 0 !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  padding: clamp(12px, 2vw, 18px) clamp(14px, 3vw, 28px) !important;
}

/* Tablety */
@media (max-width: 900px) {
  .account-settings-modal .settings-box {
    width: min(100%, 640px) !important;
    max-height: min(90vh, 720px) !important;
  }
  .account-settings-modal .settings-sidebar {
    width: clamp(120px, 32vw, 180px) !important;
  }
}

/* Telefony / małe laptopy */
/* mobile settings disabled – desktop/laptop only */

/* Bardzo małe ekrany */
@media (max-width: 380px) {
  .account-settings-modal .settings-header h2 {
    font-size: 16px !important;
  }
  .account-settings-modal .settings-sidebar {
    max-height: 100px !important;
  }
}

/* Duże monitory */
@media (min-width: 1400px) {
  .account-settings-modal .settings-box {
    width: min(1000px, 92vw) !important;
    max-height: min(720px, 82vh) !important;
  }
}


/* ===== Karty serwerów (jak Disboard / screenshot) ===== */
.discover-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  gap: 18px !important;
  padding: 8px 4px 28px !important;
  align-items: stretch;
}
.discover-card.sg-card,
.sg-card {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  padding: 16px !important;
  background: #2b2d31 !important;
  border: 1px solid rgba(255,255,255,0.04) !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25) !important;
  transition: transform 0.15s ease, background 0.15s ease !important;
  min-height: 220px;
}
.sg-card:hover {
  background: #313338 !important;
  transform: translateY(-2px);
}
.sg-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sg-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px !important;
  overflow: hidden;
  flex-shrink: 0;
  background: #1e1f22;
  display: grid;
  place-items: center;
}
.sg-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px !important;
}
.sg-letter {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}
.sg-head { min-width: 0; flex: 1; }
.sg-meta-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  font-size: 12px;
  color: #b5bac1;
}
.sg-online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #dbdee1;
}
.sg-online i {
  width: 8px;
  height: 8px;
  border-radius: 50% !important;
  background: #23a559;
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(35,165,89,0.18);
}
.sg-time { color: #949ba4; font-weight: 500; }
.sg-name {
  margin: 0 !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  color: #f2f3f5 !important;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sg-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sg-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px !important;
  background: rgba(255,255,255,0.06);
  color: #dbdee1;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sg-tagline {
  margin: 0 !important;
  font-size: 13px;
  font-weight: 600;
  color: #f2f3f5;
  line-height: 1.35;
}
.sg-desc {
  margin: 0 !important;
  flex: 1;
  font-size: 13px;
  line-height: 1.45;
  color: #949ba4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sg-join {
  margin-top: auto;
  align-self: center;
  min-width: 140px;
  padding: 10px 22px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #1a1b1e !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  transition: 0.15s ease;
}
.sg-join:hover:not(:disabled) {
  background: #5865f2 !important;
  transform: translateY(-1px);
}
.sg-join:disabled {
  opacity: 0.55;
  cursor: default;
}
.sg-join-ico { font-size: 14px; opacity: 0.9; }

@media (max-width: 700px) {
  .discover-grid {
    grid-template-columns: 1fr !important;
  }
  .sg-card { min-height: 0; }
}


/* Panel ustawień – środek ekranu */
.account-settings-modal {
  align-items: center !important;
  justify-content: center !important;
  padding: clamp(12px, 3vw, 28px) !important;
}
.account-settings-modal .settings-box {
  margin: auto !important;
}



/* =========================================================
   RESPONSIVE – tylko komputer / laptop (bez mobile-first)
   Typowe: 1280, 1366, 1440, 1536, 1600, 1680, 1920, 2560
   ========================================================= */

/* Bazowy panel ustawień – środek, skalowalny */
.account-settings-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10000 !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  padding: 24px !important;
  background: rgba(0,0,0,0.65) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-sizing: border-box !important;
  overflow: auto !important;
}
.account-settings-modal[style*="display: flex"],
.account-settings-modal[style*="display:flex"],
.account-settings-modal.show,
.account-settings-modal.is-open {
  display: flex !important;
}
.account-settings-modal .settings-box {
  width: min(920px, calc(100vw - 48px)) !important;
  height: min(640px, calc(100vh - 48px)) !important;
  max-width: calc(100vw - 48px) !important;
  max-height: calc(100vh - 48px) !important;
  margin: auto !important;
  border-radius: 14px !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  background: #121212 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: 0 24px 80px rgba(0,0,0,0.55) !important;
}
.account-settings-modal .settings-content {
  display: flex !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  width: 100% !important;
  overflow: hidden !important;
  flex-direction: row !important;
}
.account-settings-modal .settings-sidebar {
  width: 200px !important;
  flex-shrink: 0 !important;
  overflow-y: auto !important;
  border-right: 1px solid rgba(255,255,255,0.06) !important;
  border-bottom: none !important;
  max-height: none !important;
  display: block !important;
  padding: 16px 12px !important;
}
.account-settings-modal .settings-main {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow-y: auto !important;
}
.account-settings-modal .settings-body {
  max-width: 100% !important;
  width: 100% !important;
  padding: 20px 28px !important;
  box-sizing: border-box !important;
}
.account-settings-modal .settings-header {
  flex-shrink: 0 !important;
  padding: 18px 28px !important;
}
.account-settings-modal .settings-footer {
  flex-shrink: 0 !important;
  padding: 14px 28px !important;
}

/* Małe laptopy / netbook 1280–1366 */
@media (max-width: 1366px) and (min-width: 1100px) {
  .account-settings-modal {
    padding: 18px !important;
  }
  .account-settings-modal .settings-box {
    width: min(860px, calc(100vw - 36px)) !important;
    height: min(600px, calc(100vh - 36px)) !important;
  }
  .account-settings-modal .settings-sidebar {
    width: 180px !important;
  }
  .account-settings-modal .settings-body {
    padding: 16px 22px !important;
  }
  .servers-bar { width: 68px; }
  .sidebar { width: 220px; }
}

/* Niskie ekrany (laptopy 768–800 wysokości) */
@media (max-height: 820px) {
  .account-settings-modal {
    padding: 12px !important;
  }
  .account-settings-modal .settings-box {
    height: min(560px, calc(100vh - 24px)) !important;
    max-height: calc(100vh - 24px) !important;
  }
  .account-settings-modal .settings-header {
    padding: 12px 20px !important;
  }
  .account-settings-modal .settings-body {
    padding: 14px 20px !important;
  }
  .account-settings-modal .settings-footer {
    padding: 10px 20px !important;
  }
  .account-settings-modal .settings-avatar-large {
    width: 72px !important;
    height: 72px !important;
    font-size: 28px !important;
    margin-bottom: 12px !important;
  }
}

/* Średnie laptopy 1440–1600 */
@media (min-width: 1440px) and (max-width: 1679px) {
  .account-settings-modal .settings-box {
    width: min(940px, calc(100vw - 48px)) !important;
    height: min(660px, calc(100vh - 48px)) !important;
  }
}

/* Full HD 1920 */
@media (min-width: 1680px) and (max-width: 2199px) {
  .account-settings-modal .settings-box {
    width: min(980px, calc(100vw - 64px)) !important;
    height: min(700px, calc(100vh - 64px)) !important;
  }
  .account-settings-modal .settings-sidebar {
    width: 220px !important;
  }
  .account-settings-modal {
    padding: 32px !important;
  }
}

/* 2K / duże monitory */
@media (min-width: 2200px) {
  .account-settings-modal {
    padding: 40px !important;
  }
  .account-settings-modal .settings-box {
    width: min(1080px, calc(100vw - 80px)) !important;
    height: min(760px, calc(100vh - 80px)) !important;
  }
  .account-settings-modal .settings-sidebar {
    width: 240px !important;
  }
  .account-settings-modal .settings-body {
    padding: 24px 36px !important;
  }
}

/* Wąskie okna laptopa (okno nie na pełny ekran) – nadal układ desktop */
@media (max-width: 1099px) and (min-width: 900px) {
  .account-settings-modal {
    padding: 14px !important;
  }
  .account-settings-modal .settings-box {
    width: calc(100vw - 28px) !important;
    height: min(580px, calc(100vh - 28px)) !important;
  }
  .account-settings-modal .settings-sidebar {
    width: 160px !important;
  }
  .sidebar { width: 200px; }
  .servers-bar { width: 64px; }
}

/* App layout – skalowanie paneli na laptopach */
@media (max-width: 1400px) {
  .members-panel, #members-panel {
    width: 200px !important;
  }
}
@media (max-width: 1200px) {
  .members-panel, #members-panel {
    width: 180px !important;
  }
  .sidebar {
    width: 210px !important;
  }
}
@media (max-height: 700px) {
  .user-panel {
    min-height: 48px !important;
    padding: 6px 10px !important;
  }
  .server-header {
    min-height: 40px !important;
  }
  .account-settings-modal .settings-box {
    height: calc(100vh - 16px) !important;
    max-height: calc(100vh - 16px) !important;
  }
}

/* Discover grid na laptopach */
@media (min-width: 1100px) and (max-width: 1500px) {
  .discover-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
  }
}
@media (min-width: 1501px) {
  .discover-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
  }
}


/* ===== USTAWIENIA: pełny ekran + zakładki u góry ===== */
.account-settings-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10000 !important;
  display: none;
  align-items: stretch !important;
  justify-content: stretch !important;
  padding: 0 !important;
  margin: 0 !important;
  background: #0B0B0B !important;
  backdrop-filter: none !important;
  overflow: hidden !important;
}
.account-settings-modal[style*="display: flex"],
.account-settings-modal[style*="display:flex"],
.account-settings-modal.show,
.account-settings-modal.is-open {
  display: flex !important;
}
.account-settings-modal .settings-box,
.account-settings-modal .modal-box.settings-box {
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: #0B0B0B !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
.account-settings-modal .settings-content {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
}
.account-settings-modal .settings-sidebar {
  order: 0;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  max-height: none !important;
  flex-shrink: 0 !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 2px !important;
  padding: 0 12px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  background: #111 !important;
  border-right: none !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  min-height: 52px !important;
}
.account-settings-modal .settings-sidebar-category {
  display: none !important;
}
.account-settings-modal .settings-sidebar-btn {
  width: auto !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 14px 18px !important;
  text-align: center !important;
  border-radius: 0 !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  background: transparent !important;
  color: #949ba4 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}
.account-settings-modal .settings-sidebar-btn:hover {
  color: #fff !important;
  background: rgba(255,255,255,0.04) !important;
}
.account-settings-modal .settings-sidebar-btn.active {
  color: #fff !important;
  border-bottom-color: #5865F2 !important;
  background: transparent !important;
  font-weight: 700 !important;
}
.account-settings-modal .settings-main {
  order: 1;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  min-width: 0 !important;
  overflow-y: auto !important;
  background: #0B0B0B !important;
  width: 100% !important;
}
.account-settings-modal .settings-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #0B0B0B !important;
  padding: 20px 32px !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
}
.account-settings-modal .settings-body {
  max-width: 720px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 24px 32px 40px !important;
  box-sizing: border-box !important;
}
.account-settings-modal .settings-footer {
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  padding: 16px 32px 28px !important;
  box-sizing: border-box;
}

@media (max-width: 1100px) {
  .account-settings-modal .settings-body,
  .account-settings-modal .settings-footer,
  .account-settings-modal .settings-header {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}
@media (max-height: 800px) {
  .account-settings-modal .settings-header {
    padding-top: 14px !important;
    padding-bottom: 14px !important;
  }
  .account-settings-modal .settings-sidebar-btn {
    padding: 12px 14px !important;
  }
}


/* ===== Shape picker (Ustawienia → Wygląd) ===== */
.shape-picker {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.shape-option {
  flex: 1;
  min-width: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 12px;
  background: rgba(255,255,255,0.03);
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  cursor: pointer;
  color: #b5bac1;
  transition: 0.15s ease;
}
.shape-option:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}
.shape-option.active {
  border-color: #5865F2;
  background: rgba(88,101,242,0.12);
  color: #fff;
}
.shape-preview {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #5865F2, #a855f7);
  display: block;
}
.shape-preview-rounded { border-radius: 50%; }
.shape-preview-square { border-radius: 4px; }
.shape-preview-diamond {
  border-radius: 6px;
  transform: rotate(45deg) scale(0.78);
}
.shape-label { font-size: 13px; font-weight: 700; }

/* Apply shapes globally */
html[data-shape="rounded"] {
  --shape-avatar: 50%;
  --shape-icon: 12px;
  --shape-btn: 10px;
  --shape-card: 14px;
  --shape-input: 10px;
}
html[data-shape="square"] {
  --shape-avatar: 4px;
  --shape-icon: 4px;
  --shape-btn: 4px;
  --shape-card: 6px;
  --shape-input: 4px;
}
html[data-shape="diamond"] {
  --shape-avatar: 8px;
  --shape-icon: 8px;
  --shape-btn: 8px;
  --shape-card: 10px;
  --shape-input: 8px;
}

/* Avatars */
html[data-shape] .avatar,
html[data-shape] .user-avatar,
html[data-shape] .member-avatar,
html[data-shape] .message-avatar,
html[data-shape] .voice-user-avatar,
html[data-shape] .vu .av,
html[data-shape] .profile-avatar-wrap,
html[data-shape] .settings-avatar-large,
html[data-shape] #user-avatar-btn,
html[data-shape] .sg-icon {
  border-radius: var(--shape-avatar) !important;
  overflow: hidden;
}
html[data-shape="diamond"] .avatar,
html[data-shape="diamond"] .user-avatar,
html[data-shape="diamond"] .member-avatar,
html[data-shape="diamond"] .message-avatar,
html[data-shape="diamond"] .voice-user-avatar,
html[data-shape="diamond"] .vu .av,
html[data-shape="diamond"] .profile-avatar-wrap,
html[data-shape="diamond"] .settings-avatar-large,
html[data-shape="diamond"] #user-avatar-btn,
html[data-shape="diamond"] .sg-icon {
  border-radius: 10px !important;
  transform: rotate(45deg) scale(0.86);
}
html[data-shape="diamond"] .avatar > *,
html[data-shape="diamond"] .user-avatar > *,
html[data-shape="diamond"] .member-avatar > *,
html[data-shape="diamond"] .message-avatar > *,
html[data-shape="diamond"] .voice-user-avatar > *,
html[data-shape="diamond"] .vu .av > *,
html[data-shape="diamond"] .profile-avatar-wrap > *,
html[data-shape="diamond"] .settings-avatar-large > *,
html[data-shape="diamond"] #user-avatar-btn > *,
html[data-shape="diamond"] .sg-icon > * {
  transform: rotate(-45deg) scale(1.16);
}

/* Server icons */
html[data-shape] .server-icon {
  border-radius: var(--shape-icon) !important;
}
html[data-shape="diamond"] .server-icon {
  border-radius: 8px !important;
  transform: rotate(45deg) scale(0.82);
}
html[data-shape="diamond"] .server-icon > * {
  transform: rotate(-45deg) scale(1.15);
}
html[data-shape="diamond"] .server-icon.add {
  transform: rotate(45deg) scale(0.82);
}

/* Buttons / cards / inputs (modern) */
html[data-shape] .btn,
html[data-shape] .btn-primary,
html[data-shape] .btn-secondary,
html[data-shape] .user-control-btn,
html[data-shape] input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
html[data-shape] textarea,
html[data-shape] select {
  border-radius: var(--shape-btn) !important;
}
html[data-shape] .discover-card,
html[data-shape] .sg-card,
html[data-shape] .shop-card,
html[data-shape] .login-box,
html[data-shape] .modal-box:not(.settings-box) {
  border-radius: var(--shape-card) !important;
}
html[data-shape="square"] .sg-join {
  border-radius: 4px !important;
}
html[data-shape="rounded"] .sg-join {
  border-radius: 999px !important;
}
html[data-shape="diamond"] .sg-join {
  border-radius: 8px !important;
}

/* Modern polish */
.login-box, .sg-card, .discover-card {
  backdrop-filter: blur(12px);
}


/* ===== Nowoczesny UI + kształty (ostateczne reguły) ===== */
:root {
  --shape-avatar: 50%;
  --shape-icon: 12px;
  --shape-btn: 10px;
  --shape-card: 14px;
  --shape-input: 10px;
  --bg-app: #0b0b0f;
  --bg-panel: #12131a;
  --bg-elev: #181922;
  --border-soft: rgba(255,255,255,0.07);
  --accent: #5865F2;
  --text: #f2f3f5;
  --muted: #949ba4;
}
html, body {
  background: var(--bg-app);
  color: var(--text);
}
.app, #app, .main-layout {
  background: transparent;
}

html[data-shape="rounded"] {
  --shape-avatar: 50%;
  --shape-icon: 12px;
  --shape-btn: 10px;
  --shape-card: 14px;
  --shape-input: 10px;
}
html[data-shape="square"] {
  --shape-avatar: 6px;
  --shape-icon: 6px;
  --shape-btn: 6px;
  --shape-card: 8px;
  --shape-input: 6px;
}
html[data-shape="diamond"] {
  --shape-avatar: 10px;
  --shape-icon: 10px;
  --shape-btn: 8px;
  --shape-card: 10px;
  --shape-input: 8px;
}

/* Avatar shapes – nadpisuje stare 50% !important */
html[data-shape] .ui-avatar,
html[data-shape] .avatar,
html[data-shape] .user-avatar,
html[data-shape] .member-avatar,
html[data-shape] .message-avatar,
html[data-shape] .voice-user-avatar,
html[data-shape] .vu .av,
html[data-shape] .profile-avatar-wrap,
html[data-shape] .settings-avatar-large,
html[data-shape] #user-avatar-btn,
html[data-shape] .user-panel .user-avatar,
html[data-shape] .sg-icon,
html[data-shape] .dm-item .avatar,
html[data-shape] .friend-avatar {
  border-radius: var(--shape-avatar) !important;
  overflow: hidden !important;
  transform: none !important;
}
html[data-shape] .ui-avatar > *,
html[data-shape] .avatar > *,
html[data-shape] .user-avatar > *,
html[data-shape] .member-avatar > *,
html[data-shape] .message-avatar > *,
html[data-shape] .voice-user-avatar > *,
html[data-shape] .vu .av > *,
html[data-shape] .settings-avatar-large > *,
html[data-shape] #user-avatar-btn > *,
html[data-shape] .user-panel .user-avatar > *,
html[data-shape] .sg-icon > * {
  transform: none !important;
}

html[data-shape="diamond"] .ui-avatar,
html[data-shape="diamond"] .avatar,
html[data-shape="diamond"] .user-avatar,
html[data-shape="diamond"] .member-avatar,
html[data-shape="diamond"] .message-avatar,
html[data-shape="diamond"] .voice-user-avatar,
html[data-shape="diamond"] .vu .av,
html[data-shape="diamond"] .profile-avatar-wrap,
html[data-shape="diamond"] .settings-avatar-large,
html[data-shape="diamond"] #user-avatar-btn,
html[data-shape="diamond"] .user-panel .user-avatar,
html[data-shape="diamond"] .sg-icon {
  border-radius: 10px !important;
  transform: rotate(45deg) scale(0.82) !important;
}
html[data-shape="diamond"] .ui-avatar > *,
html[data-shape="diamond"] .avatar > *,
html[data-shape="diamond"] .user-avatar > *,
html[data-shape="diamond"] .member-avatar > *,
html[data-shape="diamond"] .message-avatar > *,
html[data-shape="diamond"] .voice-user-avatar > *,
html[data-shape="diamond"] .vu .av > *,
html[data-shape="diamond"] .settings-avatar-large > *,
html[data-shape="diamond"] #user-avatar-btn > *,
html[data-shape="diamond"] .user-panel .user-avatar > *,
html[data-shape="diamond"] .sg-icon > * {
  transform: rotate(-45deg) scale(1.22) !important;
}

html[data-shape] .server-icon {
  border-radius: var(--shape-icon) !important;
}
html[data-shape="diamond"] .server-icon {
  border-radius: 10px !important;
  transform: rotate(45deg) scale(0.85) !important;
}
html[data-shape="diamond"] .server-icon > * {
  transform: rotate(-45deg) scale(1.18) !important;
}

html[data-shape] .btn,
html[data-shape] .btn-primary,
html[data-shape] .btn-secondary,
html[data-shape] input,
html[data-shape] textarea,
html[data-shape] select,
html[data-shape] .message-input,
html[data-shape] #message-input,
html[data-shape] .discover-card,
html[data-shape] .sg-card,
html[data-shape] .modal-box,
html[data-shape] .login-box {
  border-radius: var(--shape-btn) !important;
}
html[data-shape] .discover-card,
html[data-shape] .sg-card,
html[data-shape] .modal-box,
html[data-shape] .login-box {
  border-radius: var(--shape-card) !important;
}
html[data-shape] input,
html[data-shape] textarea,
html[data-shape] select,
html[data-shape] .message-input,
html[data-shape] #message-input {
  border-radius: var(--shape-input) !important;
}

/* Shape picker look */
.shape-picker {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 12px !important;
}
.shape-option {
  min-width: 0 !important;
  padding: 18px 12px !important;
  border-radius: 12px !important;
  background: rgba(255,255,255,0.04) !important;
  border: 2px solid rgba(255,255,255,0.08) !important;
}
.shape-option.active {
  border-color: #5865F2 !important;
  background: rgba(88,101,242,0.15) !important;
  box-shadow: 0 0 0 1px rgba(88,101,242,0.35);
}
.shape-preview {
  width: 52px !important;
  height: 52px !important;
  background: linear-gradient(135deg, #5865F2, #a855f7) !important;
}
.shape-save-hint {
  margin-top: 12px;
  font-size: 12px;
  color: #949ba4;
}

/* Nowoczesne panele */
.sidebar, .channels-panel, #dm-panel, .members-panel {
  background: var(--bg-panel);
  border-color: var(--border-soft);
}
.user-panel {
  background: #15161c !important;
  border-top: 1px solid var(--border-soft) !important;
}
.chat-header, .server-header {
  background: rgba(18,19,26,0.92);
  border-bottom: 1px solid var(--border-soft);
}


/* ===== Sklep nowoczesny + dekoracje ===== */
.shop-view, #shop-view.shop-view, body.view-shop #shop-view {
  flex: 1;
  overflow: auto;
  background: radial-gradient(1200px 600px at 10% -10%, rgba(88,101,242,.18), transparent 50%),
              radial-gradient(900px 500px at 90% 10%, rgba(168,85,247,.12), transparent 45%),
              #0b0b0f !important;
}
.shop-modern {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}
.shop-modern-hero h2 {
  font-size: 28px;
  font-weight: 800;
  margin: 8px 0;
}
.shop-modern-hero p {
  color: #949ba4;
  margin: 0 0 18px;
}
.shop-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}
.shop-tab {
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  color: #b5bac1;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}
.shop-tab.active {
  background: rgba(88,101,242,.25);
  color: #fff;
  border-color: rgba(88,101,242,.45);
}
.shop-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
  gap: 16px !important;
}
.shop-card.deco-card {
  background: #15161c;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: .15s ease;
}
.shop-card.deco-card:hover {
  transform: translateY(-2px);
  border-color: rgba(88,101,242,.35);
}
.shop-card.deco-card.equipped {
  border-color: #5865F2;
  box-shadow: 0 0 0 1px rgba(88,101,242,.35);
}
.shop-card-preview {
  height: 96px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #0e0f14;
  position: relative;
  margin-bottom: 4px;
}
.shop-card-preview-av {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #2b2d31;
  font-size: 24px;
}
.shop-card.deco-card h3 {
  margin: 0;
  font-size: 15px;
}
.shop-card.deco-card p {
  margin: 0;
  color: #949ba4;
  font-size: 13px;
  min-height: 36px;
}
.btn-shop.deco-action {
  margin-top: auto;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #5865F2;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.shop-card.equipped .deco-action {
  background: #23a559;
}

/* Dekoracje na avatarze */
#user-avatar-btn.deco-aurora,
.settings-avatar-large.deco-aurora,
#profile-avatar.deco-aurora {
  box-shadow: 0 0 0 3px #5865F2, 0 0 16px rgba(168,85,247,.65) !important;
}
#user-avatar-btn.deco-gold,
.settings-avatar-large.deco-gold,
#profile-avatar.deco-gold {
  box-shadow: 0 0 0 3px #f0b232, 0 0 14px rgba(240,178,50,.55) !important;
}
#user-avatar-btn.deco-neon,
.settings-avatar-large.deco-neon,
#profile-avatar.deco-neon {
  box-shadow: 0 0 0 3px #ff4c8f, 0 0 18px rgba(255,76,143,.6) !important;
  animation: deco-pulse 1.8s ease-in-out infinite;
}
#user-avatar-btn.deco-hex,
.settings-avatar-large.deco-hex,
#profile-avatar.deco-hex {
  clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0 50%);
  border-radius: 0 !important;
}
#user-avatar-btn.deco-flame,
.settings-avatar-large.deco-flame,
#profile-avatar.deco-flame {
  box-shadow: 0 0 0 3px #ff6a33, 0 0 18px rgba(255,106,51,.55) !important;
}
#user-avatar-btn.deco-ice,
.settings-avatar-large.deco-ice,
#profile-avatar.deco-ice {
  box-shadow: 0 0 0 3px #5dc7ff, 0 0 16px rgba(93,199,255,.55) !important;
}
@keyframes deco-pulse {
  0%,100% { filter: brightness(1); }
  50% { filter: brightness(1.15); }
}
.shop-card-preview.deco-aurora .shop-card-preview-av { box-shadow: 0 0 0 3px #5865F2, 0 0 12px rgba(168,85,247,.5); }
.shop-card-preview.deco-gold .shop-card-preview-av { box-shadow: 0 0 0 3px #f0b232, 0 0 12px rgba(240,178,50,.5); }
.shop-card-preview.deco-neon .shop-card-preview-av { box-shadow: 0 0 0 3px #ff4c8f, 0 0 12px rgba(255,76,143,.5); }
.shop-card-preview.deco-hex .shop-card-preview-av { clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0 50%); border-radius: 0; }
.shop-card-preview.deco-flame .shop-card-preview-av { box-shadow: 0 0 0 3px #ff6a33, 0 0 12px rgba(255,106,51,.5); }
.shop-card-preview.deco-ice .shop-card-preview-av { box-shadow: 0 0 0 3px #5dc7ff, 0 0 12px rgba(93,199,255,.5); }


/* Reakcje – czytelne i klikalne */
.reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.reaction {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: #dbdee1;
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 13px;
  cursor: pointer;
  line-height: 1.4;
}
.reaction:hover {
  background: rgba(88,101,242,0.15);
  border-color: rgba(88,101,242,0.35);
}
.reaction.active {
  background: rgba(88,101,242,0.22);
  border-color: #5865F2;
  color: #fff;
}
.reaction.add-react {
  font-weight: 700;
  min-width: 28px;
  justify-content: center;
}


/* GIF na avatarach/banerach – animacja działa */
#user-avatar-btn img,
.settings-avatar-large img,
#profile-avatar img,
.friend-avatar img,
.message-avatar img,
.server-icon img {
  image-rendering: auto;
}
.profile-banner,
#profile-banner,
#banner-preview,
#settings-banner-preview,
.server-banner-bar,
#server-banner-preview {
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

/* Usuń znajomego */
.friend-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-left: auto;
}
.friend-remove-btn {
  border: none;
  background: rgba(237,66,69,.15);
  color: #ed4245;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.friend-remove-btn:hover {
  background: #ed4245;
  color: #fff;
}
#profile-friend-btn.danger {
  color: #ed4245 !important;
}

/* Incoming call – Discord style */
#incoming-call-modal {
  z-index: 12000 !important;
  background: rgba(0,0,0,.72) !important;
  backdrop-filter: blur(8px);
}
#incoming-call-modal .incoming-call-box {
  position: relative;
  text-align: center;
  padding: 28px 24px 22px !important;
  min-width: 300px;
  border-radius: 16px !important;
  overflow: hidden;
}
#incoming-call-modal .incoming-call-pulse {
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 50% 30%, rgba(35,165,89,.25), transparent 55%);
  pointer-events: none;
  animation: callPulse 1.6s ease-in-out infinite;
}
@keyframes callPulse {
  0%,100% { opacity: .55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}
#incoming-call-modal .call-avatar {
  width: 96px !important;
  height: 96px !important;
  margin: 0 auto 14px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  box-shadow: 0 0 0 4px rgba(35,165,89,.45);
}
#incoming-call-modal .incoming-call-sub {
  color: #b5bac1;
  margin: 0 0 20px;
}
#incoming-call-modal .call-actions {
  display: flex !important;
  gap: 16px !important;
  justify-content: center !important;
}
#incoming-call-modal .btn-call {
  min-width: 120px;
  height: 48px;
  border-radius: 24px !important;
  border: none;
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  color: #fff;
}
#incoming-call-modal .btn-call.accept {
  background: #23a559 !important;
  box-shadow: 0 8px 24px rgba(35,165,89,.35);
}
#incoming-call-modal .btn-call.accept:hover {
  background: #2dc770 !important;
  filter: brightness(1.05);
}
#incoming-call-modal .btn-call.decline {
  background: #ed4245 !important;
}
#incoming-call-modal .btn-call.decline:hover {
  background: #f04747 !important;
}


/* FLUID UI – płynniejsze działanie */
html, body {
  scroll-behavior: auto;
}
#app, .main-layout, .chat-area, .sidebar, .servers-bar {
  transform: translateZ(0);
  backface-visibility: hidden;
}
#messages {
  contain: content;
  overflow-anchor: none;
  will-change: scroll-position;
}
.message {
  content-visibility: auto;
  contain-intrinsic-size: auto 72px;
}
.server-icon, .friend-row, .channel-item, .dm-item {
  contain: layout style;
}
.modal, .modal-box, .settings-box {
  will-change: opacity, transform;
}
button, .btn, .server-icon, .channel-item, .friend-row {
  transition: background-color .12s ease, color .12s ease, border-color .12s ease, opacity .12s ease;
}
/* mniej animacji w tle gdy prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
