/* ============================================================
   NeonCord — Discord benzeri sohbet arayüzü
   ============================================================ */

:root {
  --bg: #090b11;
  --bg-2: #0d1018;
  --panel: #11141e;
  --panel-2: #161a27;
  --panel-3: #1c2131;
  --line: #272d40;
  --line-soft: #1e2333;
  --text: #eef1fa;
  --text-2: #c3c9dc;
  --muted: #8790a8;
  --muted-2: #626b82;
  --accent: #ffd23f;
  --accent-2: #ffe98a;
  --accent-ink: #171204;
  --orange: #ff6b35;
  --green: #3ddc97;
  --red: #ff5c6c;
  --yellow: #ffc857;
  --blue: #4cc9f0;
  --rail: 78px;
  --sidebar: 302px;
  --members: 284px;
  --radius: 16px;
  --shadow: 0 24px 80px rgba(0, 0, 0, .45);
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1100px 700px at 12% -10%, rgba(255, 210, 63, .10), transparent 60%),
    radial-gradient(900px 600px at 100% 0%, rgba(124, 92, 255, .12), transparent 55%),
    var(--bg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.cursor-neon,
.cursor-neon * { cursor: url('/assets/cursor.svg') 3 2, auto !important; }
.cursor-neon input[type="text"],
.cursor-neon input[type="email"],
.cursor-neon input[type="password"],
.cursor-neon input[type="search"],
.cursor-neon textarea { cursor: url('/assets/cursor.svg') 3 2, text !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: rgba(255, 210, 63, .36); color: #fff; }

/* Kaydırma çubukları */
* { scrollbar-width: thin; scrollbar-color: #2d3448 transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2d3448; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #3b435c; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.text-strong { color: var(--text-2); }
.small { font-size: 12.5px; }
.danger-text { color: var(--red); }
.success-text { color: var(--green); }
.nowrap { white-space: nowrap; }
.grow { flex: 1; }
.divider { height: 1px; background: var(--line-soft); margin: 16px 0; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 20px; height: 20px; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
  vertical-align: middle;
}
.icon.fill { fill: currentColor; stroke: none; }
.icon.sm { width: 16px; height: 16px; }
.icon.lg { width: 24px; height: 24px; }

/* ============================================================
   Buttons & forms
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  font-weight: 650; font-size: 14px; line-height: 1;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--panel-3); border-color: #353d55; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  box-shadow: 0 8px 26px rgba(255, 210, 63, .18);
}
.btn.primary:hover { box-shadow: 0 10px 34px rgba(255, 210, 63, .28); filter: brightness(1.04); }
.btn.primary .icon { stroke: currentColor; }
.btn.danger { background: rgba(255, 92, 108, .12); border-color: rgba(255, 92, 108, .35); color: #ff9aa5; }
.btn.danger:hover { background: rgba(255, 92, 108, .2); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--panel-2); }
.btn.small { min-height: 34px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.btn.full { width: 100%; }
.btn .btn-spinner {
  display: none; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
.btn.loading .btn-label { display: none; }
.btn.loading .btn-spinner { display: inline-block; }

.icon-btn {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 10px; color: var(--muted); background: transparent;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.icon-btn.active { color: var(--text); background: rgba(124, 92, 255, .15); }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.field > span { color: var(--text-2); font-size: 12.5px; font-weight: 650; letter-spacing: .01em; }
.field input, .field textarea, .field select, .input {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  background: #0c0f17; color: var(--text); padding: 11px 13px;
  outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
  font-size: 14px;
}
.field textarea { resize: vertical; min-height: 92px; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus, .input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, .17);
  background: #0d1019;
}
.field input::placeholder, .field textarea::placeholder { color: #596176; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-hint { font-size: 12px; color: var(--muted); margin-top: -3px; }
.form-error, .form-info, .dev-code {
  margin-top: 14px; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.45;
}
.form-error { background: rgba(255, 92, 108, .12); border: 1px solid rgba(255, 92, 108, .28); color: #ffadb4; }
.form-info { background: rgba(76, 201, 240, .1); border: 1px solid rgba(76, 201, 240, .25); color: #a5e6f8; }
.dev-code {
  background: rgba(61, 220, 151, .09); border: 1px dashed rgba(61, 220, 151, .4);
  color: #9bf3ca; word-break: break-word;
}
.dev-code b { font-size: 18px; letter-spacing: .25em; color: #d9ffed; }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-2); margin-bottom: 12px; cursor: pointer; }
.check-row input { width: 17px; height: 17px; accent-color: var(--accent); }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
  border: 1px solid var(--line); background: var(--panel-2); border-radius: 9px;
  padding: 8px 11px; font-size: 12.5px; color: var(--text-2);
}
.choice.selected { border-color: var(--accent); color: #fff; background: rgba(124, 92, 255, .18); }
.link {
  border: 0; background: none; color: var(--accent-2); padding: 0;
  font-size: inherit; font-weight: 600;
}
.link:hover { text-decoration: underline; }

/* ============================================================
   Auth
   ============================================================ */
.auth-shell {
  height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(420px, .88fr);
  overflow: auto; background: var(--bg);
}
.auth-art {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center;
  padding: 54px 6vw;
  background:
    radial-gradient(800px 520px at 20% 20%, rgba(124, 92, 255, .25), transparent 65%),
    radial-gradient(600px 500px at 80% 80%, rgba(255, 107, 53, .14), transparent 70%),
    linear-gradient(145deg, #0b0e17, #0a0c12 55%, #0f0b16);
}
.auth-art::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 45%, #000 15%, transparent 72%);
  pointer-events: none;
}
.auth-art::after {
  content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%;
  border: 1px solid rgba(124, 92, 255, .15);
  box-shadow: 0 0 0 80px rgba(124, 92, 255, .025), 0 0 0 160px rgba(124, 92, 255, .018);
  top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none;
}
.auth-art-inner { position: relative; z-index: 1; max-width: 610px; width: 100%; }
.brand-row { display: flex; align-items: center; gap: 12px; margin-bottom: 42px; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, #9b82ff, #6d4df6 55%, #ff6b35 140%);
  color: #fff; font-weight: 900; font-size: 25px; letter-spacing: -.05em;
  box-shadow: 0 10px 30px rgba(124, 92, 255, .35), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.brand-mark.small { width: 44px; height: 44px; border-radius: 14px; font-size: 23px; }
.brand-name { font-size: 18px; letter-spacing: .32em; font-weight: 850; }
.brand-pill {
  font-size: 10px; letter-spacing: .14em; font-weight: 800; color: #ffb38f;
  border: 1px solid rgba(255, 107, 53, .35); background: rgba(255, 107, 53, .1);
  padding: 4px 7px; border-radius: 6px;
}
.auth-art h1 {
  font-size: clamp(44px, 5.4vw, 78px); line-height: .96; letter-spacing: -.055em;
  font-weight: 850; text-wrap: balance;
}
.auth-art h1 span {
  background: linear-gradient(100deg, #b9a8ff, #7c5cff 45%, #ff8a5c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-lead { margin-top: 20px; max-width: 470px; font-size: clamp(15px, 1.25vw, 17px); line-height: 1.6; color: #aeb5cb; }
.auth-preview { position: relative; height: 300px; margin-top: 34px; max-width: 500px; }
.preview-avatar { position: absolute; left: 34px; top: 64px; display: flex; flex-direction: column; align-items: center; gap: 12px; z-index: 2; }
.preview-status { font-size: 11px; color: #aab2c8; display: flex; align-items: center; gap: 6px; }
.preview-card {
  position: absolute; display: flex; align-items: center; gap: 11px;
  background: rgba(22, 26, 39, .74); border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 15px; padding: 12px 14px; min-width: 190px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35); backdrop-filter: blur(14px);
  animation: float 7s ease-in-out infinite;
}
.preview-card b { display: block; font-size: 12.5px; margin-bottom: 3px; }
.preview-card small { display: block; color: #939bb1; font-size: 11.5px; }
.preview-card.card-a { left: 180px; top: 34px; animation-delay: -1.2s; }
.preview-card.card-b { left: 220px; top: 128px; animation-delay: -3.5s; }
.preview-card.card-c { left: 152px; top: 220px; animation-delay: -5.2s; min-width: 205px; }
.mini-avatar {
  width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 13px; flex: 0 0 auto;
}
.feature-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.feature-chips span {
  display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: #aab2c8;
  border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .03);
  border-radius: 999px; padding: 7px 11px;
}
.feature-chips .icon { width: 14px; height: 14px; color: var(--accent-2); }
.auth-foot { margin-top: 34px; font-size: 11px; color: #5e667c; }

.auth-panel {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 42px 5vw; background:
    radial-gradient(600px 400px at 100% 0%, rgba(124, 92, 255, .08), transparent 65%),
    var(--bg-2);
  border-left: 1px solid rgba(255, 255, 255, .04);
}
.auth-card { width: min(420px, 100%); }
.auth-mobile-brand { display: none; align-items: center; gap: 11px; font-weight: 850; letter-spacing: .25em; font-size: 14px; margin-bottom: 30px; }
.auth-mobile-brand .brand-mark { width: 38px; height: 38px; font-size: 20px; border-radius: 11px; }
.auth-form { animation: fadeSlide .35s ease both; }
.auth-form h2 { font-size: 28px; letter-spacing: -.035em; margin-bottom: 8px; }
.auth-form > .muted { line-height: 1.55; margin-bottom: 26px; font-size: 13.5px; }
.auth-icon {
  width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: rgba(124, 92, 255, .13); border: 1px solid rgba(124, 92, 255, .28);
  color: var(--accent-2); margin-bottom: 18px;
}
.auth-links { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 9px; margin-top: 18px; color: var(--muted); font-size: 12.5px; }
.code-input { letter-spacing: .42em; text-align: center; font-size: 20px !important; font-weight: 750; }
.auth-bottom { width: min(420px, 100%); margin-top: 42px; text-align: center; color: #535b70; font-size: 10.5px; }

/* ============================================================
   App layout
   ============================================================ */
.app-shell {
  height: 100dvh; display: grid;
  grid-template-columns: var(--rail) var(--sidebar) minmax(0, 1fr) var(--members);
  background: var(--bg);
  overflow: hidden;
}
.app-shell.members-hidden { grid-template-columns: var(--rail) var(--sidebar) minmax(0, 1fr) 0; }
.app-shell.members-hidden .members-panel { display: none; }

/* Rail */
.rail {
  height: 100dvh; padding: 12px 0 10px; display: flex; flex-direction: column; align-items: center; gap: 9px;
  background: #070910; border-right: 1px solid rgba(255, 255, 255, .045); z-index: 20;
}
.rail-home { display: flex; align-items: center; justify-content: center; cursor: pointer; margin-bottom: 1px; }
.rail-home:hover { transform: translateY(-1px); }
.rail-divider { width: 32px; height: 1px; background: #232838; margin: 1px 0 2px; }
.guild-list { display: flex; flex-direction: column; align-items: center; gap: 9px; max-height: 48dvh; overflow-y: auto; overflow-x: hidden; padding: 2px 0; width: 100%; }
.rail-btn {
  position: relative; width: 48px; height: 48px; flex: 0 0 auto; border: 1px solid transparent; border-radius: 15px;
  display: flex; align-items: center; justify-content: center; background: #141826; color: #aab2c8;
  transition: border-radius .18s, background .18s, color .18s, transform .18s;
  font-weight: 800;
}
.rail-btn:hover, .rail-btn.active { border-radius: 18px; background: var(--accent); color: #fff; transform: translateY(-1px); }
.rail-btn.add { background: #111522; color: #49d99a; border-color: #1d2a2c; }
.rail-btn.add:hover { background: #1a9b6b; color: #fff; }
.rail-btn .icon { width: 22px; height: 22px; }
.rail-btn::before {
  content: ""; position: absolute; left: -14px; top: 50%; width: 4px; height: 0; border-radius: 0 5px 5px 0;
  background: #fff; transform: translateY(-50%); transition: height .18s;
}
.rail-btn.active::before, .rail-btn:hover::before { height: 24px; }
.rail-spacer { flex: 1; }
.rail-me { margin-top: 2px; cursor: pointer; }
.rail-me:hover { transform: translateY(-1px); }
.guild-icon {
  width: 48px; height: 48px; border-radius: 15px; border: 1px solid rgba(255, 255, 255, .07);
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 850; font-size: 16px;
  letter-spacing: -.03em; position: relative; overflow: hidden;
  transition: border-radius .18s, transform .18s, box-shadow .18s;
}
.guild-icon::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255, 255, 255, .18), transparent 55%); }
.guild-icon:hover, .guild-icon.active { border-radius: 18px; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.guild-icon.active::before {
  content: ""; position: absolute; left: -15px; top: 50%; width: 4px; height: 25px; border-radius: 0 5px 5px 0;
  background: #fff; transform: translateY(-50%); z-index: 2;
}
.guild-icon .guild-badge {
  position: absolute; right: -1px; bottom: -1px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--red); color: #fff; font-size: 10px; display: flex;
  align-items: center; justify-content: center; border: 2px solid #070910; z-index: 3;
}

/* Sidebar */
.sidebar {
  height: 100dvh; min-width: 0; display: flex; flex-direction: column;
  background: var(--panel); border-right: 1px solid var(--line-soft); position: relative; z-index: 15;
}
.sidebar-content { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.sidebar-header {
  min-height: 68px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-bottom: 1px solid var(--line-soft); box-shadow: 0 6px 18px rgba(0, 0, 0, .12); position: relative; z-index: 2;
}
.sidebar-title { min-width: 0; }
.sidebar-title b { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-title small { display: block; color: var(--muted); font-size: 10.5px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-head-actions { display: flex; align-items: center; gap: 3px; }
.sidebar-scroll { flex: 1; overflow-y: auto; padding: 10px 8px 16px; }
.sidebar-section { margin-bottom: 17px; }
.sidebar-label {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 10px; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; color: var(--muted-2);
  padding: 0 8px; margin: 4px 0 6px;
}
.sidebar-label button { border: 0; background: transparent; color: var(--muted); display: flex; padding: 3px; border-radius: 5px; }
.sidebar-label button:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.channel-item, .dm-item {
  width: 100%; border: 0; background: transparent; color: var(--muted); border-radius: 9px;
  display: flex; align-items: center; gap: 8px; padding: 8px 9px; margin: 2px 0;
  font-size: 14px; text-align: left; transition: background .13s, color .13s;
}
.channel-item .icon { width: 18px; height: 18px; color: #5f687f; }
.channel-item:hover, .dm-item:hover { background: rgba(255, 255, 255, .045); color: var(--text-2); }
.channel-item.active, .dm-item.active { background: rgba(124, 92, 255, .14); color: #fff; }
.channel-item.active .icon { color: var(--accent-2); }
.channel-name, .dm-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel-badge, .dm-badge {
  min-width: 18px; height: 18px; border-radius: 999px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--red); color: #fff; font-size: 10px; font-weight: 800;
}
.sidebar-invite {
  width: 100%; border: 1px dashed #343c53; background: rgba(124, 92, 255, .06); color: #b9b1ff;
  border-radius: 10px; padding: 9px 10px; display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 12px; font-weight: 650;
}
.sidebar-invite:hover { background: rgba(124, 92, 255, .12); }
.dm-item { padding: 7px 8px; gap: 10px; }
.dm-item .avatar-wrap { width: 33px; height: 33px; }
.dm-meta { flex: 1; min-width: 0; }
.dm-name { font-size: 13.5px; font-weight: 650; }
.dm-preview { font-size: 11.5px; color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.dm-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.dm-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(61, 220, 151, .65); }
.dm-dot.offline { background: #4b546c; box-shadow: none; }
.sidebar-empty { padding: 26px 14px; text-align: center; color: var(--muted-2); font-size: 12.5px; line-height: 1.5; }

/* User panel */
.user-panel {
  min-height: 62px; padding: 9px 10px; background: #0b0e16; border-top: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: 9px; flex: 0 0 auto;
}
.user-panel .avatar-wrap { flex: 0 0 auto; }
.user-panel-meta { flex: 1; min-width: 0; }
.user-panel-meta b { display: block; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-panel-meta small { display: block; color: var(--muted); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.user-panel-actions { display: flex; align-items: center; gap: 1px; }
.user-panel .icon-btn { width: 30px; height: 30px; }
.user-panel .icon-btn .icon { width: 17px; height: 17px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: #5b647b; }
.status-dot.online { background: var(--green); box-shadow: 0 0 9px rgba(61, 220, 151, .7); }

/* Main */
.main { height: 100dvh; min-width: 0; display: flex; background: var(--bg-2); position: relative; overflow: hidden; }
.chat-view { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.chat-header {
  min-height: 68px; padding: 0 18px; display: flex; align-items: center; gap: 14px;
  border-bottom: 1px solid var(--line-soft); background: rgba(13, 16, 24, .72);
  backdrop-filter: blur(12px); flex: 0 0 auto; position: relative; z-index: 5;
}
.chat-header-icon { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: rgba(124, 92, 255, .1); color: var(--accent-2); flex: 0 0 auto; }
.chat-header-icon .icon { width: 20px; height: 20px; }
.chat-header-info { min-width: 0; flex: 1; }
.chat-header-info b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-header-info small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-header-actions { display: flex; align-items: center; gap: 2px; }
.chat-header-actions .icon-btn { width: 34px; height: 34px; }
.chat-header-actions .icon-btn .icon { width: 18px; height: 18px; }
.mobile-menu-btn { display: none !important; }

.message-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-gutter: stable; }
.message-list { width: 100%; max-width: 1020px; margin: 0 auto; padding: 22px 16px 14px; min-height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.load-more-wrap { display: flex; justify-content: center; padding: 0 0 16px; }
.load-more-wrap .btn { font-size: 11.5px; }
.date-divider { display: flex; align-items: center; gap: 12px; color: var(--muted-2); font-size: 10.5px; font-weight: 700; letter-spacing: .04em; margin: 18px 8px 10px; }
.date-divider::before, .date-divider::after { content: ""; height: 1px; background: var(--line-soft); flex: 1; }
.unread-divider { display: flex; align-items: center; gap: 10px; color: #ff7aa8; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; margin: 16px 8px 8px; }
.unread-divider::before, .unread-divider::after { content: ""; height: 1px; flex: 1; }
.unread-divider::before { background: linear-gradient(90deg, transparent, #ff7aa8); }
.unread-divider::after { background: linear-gradient(90deg, #ff7aa8, transparent); }
.msg {
  position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px;
  padding: 5px 10px; margin: 1px 0; border-radius: 10px; transition: background .13s;
}
.msg:hover { background: rgba(255, 255, 255, .025); }
.msg.grouped { padding-top: 1px; }
.msg.grouped .msg-avatar { visibility: hidden; height: 0; min-height: 0; }
.msg.grouped .msg-main { margin-top: -4px; }
.msg-avatar { width: 40px; height: 40px; border: 0; background: none; padding: 0; align-self: start; }
.msg-avatar .avatar-wrap { width: 40px; height: 40px; }
.msg-main { min-width: 0; }
.msg-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px; margin-bottom: 2px; }
.msg-author { border: 0; background: none; padding: 0; color: var(--text); font-weight: 750; font-size: 13.5px; }
.msg-author:hover { text-decoration: underline; }
.msg-time { color: var(--muted-2); font-size: 10px; }
.msg-role { font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 5px; border-radius: 4px; background: rgba(124, 92, 255, .16); color: #bdb1ff; }
.msg-role.owner { background: rgba(255, 200, 87, .14); color: var(--yellow); }
.msg-role.mod { background: rgba(61, 220, 151, .12); color: var(--green); }
.msg-text { font-size: 14px; line-height: 1.55; color: #d9deec; word-wrap: break-word; overflow-wrap: anywhere; }
.msg-text code { background: #080a10; border: 1px solid #252b3d; border-radius: 5px; padding: 1px 5px; font-size: .88em; color: #c7d0ff; font-family: Consolas, "Courier New", monospace; }
.msg-text pre { background: #080a10; border: 1px solid #252b3d; border-radius: 9px; padding: 10px 12px; overflow-x: auto; margin: 6px 0; }
.msg-text pre code { border: 0; background: none; padding: 0; }
.msg-text .mention { color: #c2b7ff; background: rgba(124, 92, 255, .15); border-radius: 4px; padding: 0 4px; }
.msg-text a { color: #89c9ff; }
.msg-edited { font-size: 9.5px; color: var(--muted-2); margin-left: 2px; }
.msg-reply {
  display: flex; align-items: center; gap: 7px; margin: 2px 0 4px; color: var(--muted); font-size: 11.5px;
  min-width: 0; border-left: 2px solid #3b445d; padding-left: 8px;
}
.msg-reply b { color: var(--text-2); font-weight: 700; }
.msg-reply span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-actions {
  position: absolute; right: 10px; top: -15px; display: flex; align-items: center; gap: 1px;
  background: #1b2030; border: 1px solid #30384f; border-radius: 9px; padding: 2px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .3); opacity: 0; pointer-events: none; transform: translateY(3px);
  transition: opacity .13s, transform .13s; z-index: 4;
}
.msg:hover .msg-actions, .msg:focus-within .msg-actions { opacity: 1; pointer-events: auto; transform: translateY(0); }
.msg-actions button { width: 27px; height: 27px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.msg-actions button:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.msg-actions .icon { width: 15px; height: 15px; }
.reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.reaction {
  display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 2px 7px;
  border: 1px solid #2c3348; background: #141827; border-radius: 7px; font-size: 12px; color: var(--text-2);
  transition: border-color .13s, background .13s;
}
.reaction:hover { border-color: #4c5671; background: #1a1f31; }
.reaction.mine { border-color: rgba(124, 92, 255, .6); background: rgba(124, 92, 255, .13); color: #d5ccff; }
.reaction b { font-size: 10.5px; font-weight: 750; }
.msg-attachment { margin-top: 6px; max-width: min(460px, 100%); }
.msg-attachment img, .msg-attachment video { display: block; max-width: 100%; max-height: 380px; border-radius: 11px; border: 1px solid #262e42; background: #07090f; }
.msg-attachment audio { width: min(360px, 100%); height: 40px; margin-top: 4px; }
.msg-attachment .file-card {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  background: #121624; border: 1px solid #293046; color: var(--text-2); font-size: 12px;
}
.msg-embed { margin-top: 7px; max-width: min(420px, 100%); }
.msg-embed img { display: block; max-width: 100%; max-height: 340px; border-radius: 11px; border: 1px solid #262e42; }
.typing-bar { min-height: 22px; padding: 0 22px; font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.typing-dots { display: inline-flex; gap: 3px; align-items: center; }
.typing-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--accent-2); animation: typingBounce 1.2s infinite; }
.typing-dots i:nth-child(2) { animation-delay: .15s; }
.typing-dots i:nth-child(3) { animation-delay: .3s; }

/* Empty / welcome */
.empty-state { margin: auto; max-width: 560px; padding: 34px 20px; text-align: center; color: var(--muted); }
.empty-state .empty-icon {
  width: 66px; height: 66px; margin: 0 auto 18px; border-radius: 20px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, rgba(124, 92, 255, .2), rgba(255, 107, 53, .08));
  border: 1px solid rgba(124, 92, 255, .22); color: #c3b6ff;
}
.empty-state .empty-icon .icon { width: 30px; height: 30px; }
.empty-state h3 { font-size: 22px; letter-spacing: -.03em; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 13.5px; line-height: 1.6; }
.empty-state .btn { margin-top: 18px; }
.welcome-block { margin: auto 0 10px; padding: 20px 12px; }
.welcome-block .welcome-badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: 11px; color: #c4b8ff;
  border: 1px solid rgba(124, 92, 255, .25); background: rgba(124, 92, 255, .09);
  padding: 5px 9px; border-radius: 999px; margin-bottom: 14px;
}
.welcome-block h2 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.045em; margin-bottom: 8px; }
.welcome-block p { color: var(--muted); font-size: 13.5px; line-height: 1.6; max-width: 600px; }

/* Composer */
.composer-wrap { flex: 0 0 auto; width: 100%; max-width: 1020px; margin: 0 auto; padding: 0 16px 14px; position: relative; }
.composer {
  display: flex; align-items: flex-end; gap: 3px; padding: 6px; border-radius: 15px;
  background: #151927; border: 1px solid #2b3247; box-shadow: 0 12px 34px rgba(0, 0, 0, .22);
  transition: border-color .15s, box-shadow .15s;
}
.composer:focus-within { border-color: #4b3f88; box-shadow: 0 12px 34px rgba(0, 0, 0, .25), 0 0 0 3px rgba(124, 92, 255, .1); }
.composer textarea {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; resize: none;
  padding: 9px 6px 10px; max-height: 160px; min-height: 38px; line-height: 1.45; font-size: 14px;
}
.composer textarea::placeholder { color: #5f687e; }
.composer-btn {
  width: 36px; height: 36px; flex: 0 0 auto; border: 0; border-radius: 10px; background: transparent;
  color: #78829b; display: flex; align-items: center; justify-content: center; transition: background .13s, color .13s;
}
.composer-btn:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.composer-btn.recording { color: var(--red); background: rgba(255, 92, 108, .14); }
.composer-btn.gif-btn { font-size: 10px; font-weight: 900; letter-spacing: .02em; }
.composer-btn.gif-btn .icon { width: 22px; height: 22px; }
.composer-send {
  width: 38px; height: 38px; flex: 0 0 auto; border: 0; border-radius: 11px;
  background: linear-gradient(140deg, var(--accent), #5b3df0); color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(124, 92, 255, .3);
  transition: transform .13s, box-shadow .13s, opacity .13s;
}
.composer-send:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(124, 92, 255, .45); }
.composer-send:disabled { opacity: .45; transform: none; box-shadow: none; }
.composer-send .icon { width: 19px; height: 19px; transform: translateX(1px); }
.reply-preview, .attachment-preview {
  margin-bottom: 7px; border-radius: 10px; padding: 9px 11px; position: relative;
  background: #121624; border: 1px solid #293148; display: flex; align-items: center; gap: 9px;
}
.reply-preview { border-left: 3px solid var(--accent); color: var(--muted); font-size: 12px; }
.reply-preview b { color: var(--text-2); }
.reply-preview span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-preview button, .attachment-preview .remove {
  margin-left: auto; border: 0; background: transparent; color: var(--muted); padding: 4px; border-radius: 6px;
}
.reply-preview button:hover, .attachment-preview .remove:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.attachment-preview img { width: 46px; height: 46px; border-radius: 7px; object-fit: cover; border: 1px solid #2d354b; }
.attachment-preview .att-meta { flex: 1; min-width: 0; font-size: 12px; }
.attachment-preview .att-meta b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.attachment-preview .att-meta small { color: var(--muted-2); }
.attachment-preview audio { max-width: 260px; height: 36px; }
.recording-bar { margin-top: 7px; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: rgba(255, 92, 108, .08); border: 1px solid rgba(255, 92, 108, .24); font-size: 12px; }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); animation: pulse 1.2s infinite; }
.recording-bar .btn { margin-left: 0; }
.recording-bar .btn:first-of-type { margin-left: auto; }

/* Members */
.members-panel {
  height: 100dvh; min-width: 0; background: #0e111a; border-left: 1px solid var(--line-soft);
  overflow-y: auto; padding: 0 8px 18px; z-index: 10;
}
.members-head {
  position: sticky; top: 0; z-index: 2; min-height: 68px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 8px; background: rgba(14, 17, 26, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-soft);
  font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.members-head .count { font-size: 10px; color: var(--muted-2); letter-spacing: 0; }
.member-group-label { font-size: 9.5px; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; color: var(--muted-2); padding: 15px 8px 6px; }
.member-item {
  width: 100%; display: flex; align-items: center; gap: 9px; padding: 6px 8px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); text-align: left; transition: background .13s, color .13s;
}
.member-item:hover { background: rgba(255, 255, 255, .045); color: var(--text-2); }
.member-item.offline { opacity: .58; }
.member-item .avatar-wrap { width: 31px; height: 31px; }
.member-info { flex: 1; min-width: 0; }
.member-info b { display: block; font-size: 12.5px; color: #d7dceb; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.member-info small { display: block; color: var(--muted-2); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-role-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.member-role-dot.owner { background: var(--yellow); }
.member-role-dot.mod { background: var(--green); }

/* ============================================================
   Feed (TikTok benzeri dikey akış)
   ============================================================ */
.feed-view { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #07090f; }
.feed-header {
  min-height: 78px; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-bottom: 1px solid var(--line-soft); background: rgba(10, 12, 19, .82); backdrop-filter: blur(12px); flex: 0 0 auto;
}
.feed-header h2 { font-size: 20px; letter-spacing: -.03em; }
.feed-header p { font-size: 12px; margin-top: 2px; }
.feed-actions { display: flex; gap: 8px; }
.feed-scroll { flex: 1; overflow-y: auto; scroll-snap-type: y proximity; padding: 18px; }
.feed-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }

/* Uygulama yüklenme ekranı (Discord benzeri) */
.app-loading {
  position: fixed; inset: 0; z-index: 9999;
  background: #07090f; display: flex; align-items: center; justify-content: center;
  transition: opacity .4s ease;
}
.app-loading.hidden { opacity: 0; pointer-events: none; }
.app-loading-inner { text-align: center; }
.app-loading-logo {
  width: 80px; height: 80px; margin: 0 auto 24px;
  background: linear-gradient(135deg, #7c5cff, #ff6b35); border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; font-weight: 900; color: #fff; font-family: 'Segoe UI', sans-serif;
  animation: appLogoPulse 2s ease-in-out infinite;
}
.app-loading-spinner {
  width: 40px; height: 40px; margin: 0 auto 16px;
  border: 3px solid rgba(124, 92, 255, .2); border-top-color: #7c5cff;
  border-radius: 50%; animation: appSpin .8s linear infinite;
}
.app-loading-text { font-size: 16px; font-weight: 600; color: #f3f5fc; margin-bottom: 4px; }
.app-loading-sub { font-size: 12px; color: #aab2c8; }
@keyframes appLogoPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes appSpin { to { transform: rotate(360deg); } }

.events-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.event-card { display: flex; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #10131f; }
.event-card.live { border-color: rgba(52, 211, 153, .55); box-shadow: 0 0 0 1px rgba(52, 211, 153, .28); }
.event-date { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 64px; padding: 8px; border-radius: 12px; background: #161a2b; }
.event-date b { font-size: 22px; letter-spacing: -.02em; }
.event-date span { font-size: 10px; letter-spacing: .08em; color: var(--text-2); }
.event-date small { font-size: 11px; color: var(--text-2); margin-top: 2px; }
.event-body { flex: 1; min-width: 0; }
.event-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.event-badge { font-size: 10px; padding: 2px 8px; border-radius: 999px; background: #1c2036; color: var(--text-2); display: inline-flex; align-items: center; gap: 4px; }
.event-badge.live { background: #0f3d2e; color: #34d399; }
.event-desc { color: var(--text-2); font-size: 13px; margin: 6px 0; white-space: pre-wrap; }
.event-meta { display: flex; gap: 12px; align-items: center; font-size: 12px; color: var(--text-2); margin-bottom: 10px; flex-wrap: wrap; }
.event-meta span { display: inline-flex; align-items: center; gap: 6px; }
.event-actions { display: flex; gap: 8px; }
.event-empty { text-align: center; color: var(--text-2); padding: 40px 12px; }
.check-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); margin: 10px 0; }

/* Yarışma (Competition) */
.competition-card { border: 1px solid var(--line); border-radius: 14px; background: #10131f; padding: 16px; margin-top: 12px; }
.comp-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.comp-header h3 { font-size: 15px; margin: 0; }
.comp-header p { margin: 4px 0 0; font-size: 12px; }
.comp-status-badge { font-size: 10px; padding: 2px 8px; border-radius: 999px; background: #1c2036; color: var(--text-2); text-transform: capitalize; }
.comp-status-badge.status-active { background: #0f3d2e; color: #34d399; }
.comp-status-badge.status-judging { background: #3d360f; color: #fbbf24; }
.comp-status-badge.status-finished { background: #3d1f0f; color: #ffd23f; }
.comp-status-badge.status-waiting { background: #1c2036; color: var(--text-2); }
.comp-speaking { padding: 8px 12px; border-radius: 10px; background: #1c2036; color: #34d399; font-size: 13px; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.comp-participants { display: flex; flex-direction: column; gap: 8px; }
.comp-participant { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #161a2b; }
.comp-participant.current { border-color: rgba(52, 211, 153, .55); background: #0f3d2e; }
.comp-part-info { flex: 1; min-width: 0; }
.comp-part-name { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.comp-part-meta { font-size: 11px; color: var(--text-2); margin-top: 2px; }
.comp-score { color: #34d399; font-weight: 600; }
.comp-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.comp-countdown { font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.comp-winner { margin-top: 12px; padding: 12px; border-radius: 10px; background: #1c2036; border: 1px solid #ffd23f; color: #ffd23f; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.comp-winner code { background: #10131f; padding: 2px 8px; border-radius: 6px; font-size: 12px; }
.comp-score-form .field { margin-bottom: 10px; }
.comp-form .field { margin-bottom: 10px; }

.voice-peer.locked { opacity: .8; }
.voice-peer-admin { background: none; border: 0; color: inherit; cursor: pointer; display: inline-flex; align-items: center; padding: 0 2px; }
.voice-peer-admin:hover { color: #fff; }
.voice-admin-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px 0; }
.voice-admin-bar small { color: var(--text-2); font-size: 10px; }
.voice-locked-note { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #fbbf24; padding: 6px 10px 0; }

/* Profil adı stilleri */
.font-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-bottom: 12px; }
.font-option { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #161a2b; color: var(--text); font-size: 13px; cursor: pointer; transition: border-color .15s, background .15s; text-align: center; }
.font-option:hover { border-color: #7c5cff; }
.font-option.selected { border-color: #7c5cff; background: rgba(124, 92, 255, .12); }
.effect-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; margin-bottom: 12px; }
.effect-option { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #161a2b; color: var(--text); font-size: 12px; cursor: pointer; transition: border-color .15s, background .15s; text-align: center; }
.effect-option:hover { border-color: #7c5cff; }
.effect-option.selected { border-color: #7c5cff; background: rgba(124, 92, 255, .12); }
.feed-post {
  position: relative; scroll-snap-align: start; min-height: calc(100dvh - 150px); border-radius: 24px; overflow: hidden;
  background: linear-gradient(160deg, #141829, #0c0f17 60%); border: 1px solid #252b3d;
  display: flex; flex-direction: column; justify-content: flex-end; box-shadow: 0 26px 70px rgba(0, 0, 0, .3);
}
.feed-post.no-media { background: radial-gradient(800px 400px at 20% 0%, rgba(124, 92, 255, .22), transparent 70%), linear-gradient(160deg, #171b2d, #0b0e16); }
.feed-media { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #05060a; }
.feed-media img { width: 100%; height: 100%; object-fit: contain; }
.feed-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(4, 5, 9, .94) 0%, rgba(4, 5, 9, .35) 42%, rgba(4, 5, 9, .05) 75%); pointer-events: none; }
.feed-content { position: relative; z-index: 2; padding: 30px 34px 34px; max-width: 620px; }
.feed-author { display: flex; align-items: center; gap: 11px; margin-bottom: 15px; }
.feed-author .avatar-wrap { width: 42px; height: 42px; }
.feed-author b { display: block; font-size: 14px; }
.feed-author small { color: #aab2c8; font-size: 11px; }
.feed-text { font-size: clamp(18px, 2vw, 25px); line-height: 1.38; font-weight: 650; letter-spacing: -.025em; color: #f3f5fc; text-shadow: 0 2px 20px rgba(0, 0, 0, .4); white-space: pre-wrap; overflow-wrap: anywhere; }
.feed-rail { position: absolute; right: 18px; bottom: 108px; z-index: 3; display: flex; flex-direction: column; gap: 11px; align-items: center; }
.feed-action {
  width: 50px; height: 50px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(8, 10, 16, .55); backdrop-filter: blur(8px); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  transition: transform .15s, background .15s;
}
.feed-action:hover { transform: scale(1.06); background: rgba(124, 92, 255, .28); }
.feed-action .icon { width: 21px; height: 21px; }
.feed-action b { font-size: 9px; font-weight: 700; }
.feed-action.liked { color: #ff6b8a; background: rgba(255, 92, 108, .18); border-color: rgba(255, 92, 108, .35); }
.feed-action.liked .icon { fill: currentColor; }
.feed-menu { position: absolute; right: 18px; top: 18px; z-index: 4; }
.feed-menu .icon-btn { background: rgba(8, 10, 16, .48); backdrop-filter: blur(8px); color: #fff; }
.feed-empty { margin: auto; padding: 40px; }
.feed-loading { padding: 28px; text-align: center; color: var(--muted); font-size: 12px; }
.feed-post .deco-bg {
  position: absolute; inset: 0; opacity: .35; background:
    radial-gradient(500px 400px at 80% 20%, rgba(124, 92, 255, .4), transparent 70%),
    radial-gradient(400px 300px at 10% 80%, rgba(255, 107, 53, .2), transparent 70%);
}

/* ============================================================
   Avatars and animated decorations
   ============================================================ */
.avatar-wrap {
  --size: 40px;
  width: var(--size); height: var(--size); position: relative; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; flex: 0 0 auto; vertical-align: middle; isolation: isolate;
}
.avatar-wrap.xs { --size: 20px; }
.avatar-wrap.sm { --size: 28px; }
.avatar-wrap.md { --size: 40px; }
.avatar-wrap.lg { --size: 64px; }
.avatar-wrap.xl { --size: 96px; }
.avatar-wrap.xxl { --size: 142px; }
.avatar-wrap .avatar {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: flex; align-items: center; justify-content: center;
  background: #252b3d; color: #fff; font-weight: 800; font-size: calc(var(--size) * .38); letter-spacing: -.04em;
  position: relative; z-index: 1; border: 2px solid #11141e; overflow: hidden;
}
.avatar-wrap .avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-wrap[class*="deco-"] { padding: 3px; }
.avatar-wrap[class*="deco-"] .avatar { border: 2px solid #0d1018; }
.avatar-wrap[class*="deco-"]::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 0;
  background: var(--deco-gradient);
}
.avatar-wrap[class*="deco-"]::after {
  content: ""; position: absolute; inset: -3px; border-radius: inherit; z-index: -1;
  background: var(--deco-gradient); filter: blur(10px); opacity: .42; animation: decoGlow 3s ease-in-out infinite;
}
.avatar-wrap.deco-alev { --deco-gradient: conic-gradient(from 0deg, #ff3d00, #ffb300, #ff6b35, #ff2d55, #ff8a00, #ff3d00); }
.avatar-wrap.deco-aurora { --deco-gradient: conic-gradient(from 40deg, #7c5cff, #4cc9f0, #3ddc97, #7c5cff); }
.avatar-wrap.deco-neon { --deco-gradient: conic-gradient(from 0deg, #ff00e5, #7c5cff, #00e5ff, #ff00e5); }
.avatar-wrap.deco-yildiz { --deco-gradient: conic-gradient(from 90deg, #ffd166, #fff3c4, #ff9f1c, #ffd166); }
.avatar-wrap.deco-buz { --deco-gradient: conic-gradient(from 0deg, #4cc9f0, #d6f6ff, #4361ee, #4cc9f0); }
.avatar-wrap.deco-halka { --deco-gradient: conic-gradient(from 0deg, #ffd166, #b8860b, #fff0b3, #ffd166); }
.avatar-wrap.deco-gul { --deco-gradient: conic-gradient(from 20deg, #ff5c8a, #ffb3c6, #c9184a, #ff5c8a); }
.avatar-wrap.deco-orman { --deco-gradient: conic-gradient(from 0deg, #3ddc97, #1b7f5c, #b8ffdd, #3ddc97); }
.avatar-wrap .online-dot {
  position: absolute; right: 1px; bottom: 1px; width: 26%; height: 26%; min-width: 9px; min-height: 9px;
  border-radius: 50%; background: var(--green); border: 2px solid #0e111a; z-index: 3;
}
.avatar-fallback { user-select: none; }

/* ============================================================
   Modals
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(3, 5, 10, .74); backdrop-filter: blur(9px); animation: fadeIn .16s ease both;
}
.modal-card {
  width: min(560px, 100%); max-height: min(88dvh, 940px); display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid #30374c; border-radius: 20px; box-shadow: var(--shadow);
  animation: modalIn .22s cubic-bezier(.2, .8, .2, 1) both; overflow: hidden;
}
.modal-card.wide { width: min(900px, 100%); }
.modal-card.xwide { width: min(1180px, 100%); }
.modal-card.small { width: min(420px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line-soft); flex: 0 0 auto; }
.modal-head h3 { font-size: 19px; letter-spacing: -.03em; }
.modal-head p { color: var(--muted); font-size: 12px; margin-top: 4px; line-height: 1.45; }
.modal-close { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); color: var(--muted); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.modal-close:hover { color: var(--text); background: var(--panel-3); }
.modal-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.modal-body.flush { padding: 0; }
.modal-foot { padding: 14px 22px 20px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line-soft); flex: 0 0 auto; }
.modal-foot .left { margin-right: auto; }
.modal-section-title { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; color: var(--muted-2); margin: 20px 0 9px; }
.modal-section-title:first-child { margin-top: 0; }

/* Settings / admin tabs */
.tab-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: 420px; }
.tab-side { padding: 16px 12px; border-right: 1px solid var(--line-soft); background: #0e1119; }
.tab-btn {
  width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); font-size: 13px; text-align: left; margin-bottom: 2px; font-weight: 600;
}
.tab-btn .icon { width: 17px; height: 17px; }
.tab-btn:hover { background: rgba(255, 255, 255, .04); color: var(--text-2); }
.tab-btn.active { background: rgba(124, 92, 255, .14); color: #fff; }
.tab-btn.danger { color: #ff9aa5; }
.tab-content { padding: 22px; overflow-y: auto; min-width: 0; }
@media (max-width: 700px) {
  .tab-layout { grid-template-columns: 1fr; }
  .tab-side { display: flex; overflow-x: auto; gap: 5px; padding: 10px; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .tab-btn { width: auto; white-space: nowrap; margin: 0; }
  .tab-content { padding: 16px; }
}

.profile-modal-head { position: relative; padding: 22px 22px 0; }
.profile-banner { height: 105px; border-radius: 14px; background: radial-gradient(400px 160px at 20% 0%, rgba(124, 92, 255, .7), transparent 70%), linear-gradient(120deg, #20263d, #111522); border: 1px solid #2b3349; }
.profile-main { display: flex; align-items: flex-end; gap: 14px; padding: 0 22px; margin-top: -43px; position: relative; z-index: 1; }
.profile-main .avatar-wrap { filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .4)); }
.profile-main-info { padding-bottom: 4px; min-width: 0; }
.profile-main-info h3 { font-size: 23px; letter-spacing: -.04em; }
.profile-main-info p { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.profile-body { padding: 18px 22px 22px; }
.profile-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 5px; font-size: 9.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: rgba(124, 92, 255, .14); color: #c8bcff; border: 1px solid rgba(124, 92, 255, .22); }
.badge.owner { background: rgba(255, 200, 87, .12); color: var(--yellow); border-color: rgba(255, 200, 87, .25); }
.badge.admin { background: rgba(255, 92, 108, .1); color: #ff9aa5; border-color: rgba(255, 92, 108, .22); }
.badge.mod { background: rgba(61, 220, 151, .1); color: var(--green); border-color: rgba(61, 220, 151, .22); }
.badge.gray { background: rgba(255, 255, 255, .05); color: var(--muted); border-color: var(--line); }
.profile-bio { color: var(--text-2); font-size: 13px; line-height: 1.6; margin: 10px 0 14px; white-space: pre-wrap; }
.profile-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.fact { border: 1px solid var(--line); background: #0e111a; padding: 8px 10px; border-radius: 9px; font-size: 11.5px; color: var(--muted); }
.fact b { color: var(--text-2); }

.decoration-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.decoration-option { border: 1px solid var(--line); background: #0e111a; border-radius: 12px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 7px; color: var(--muted); font-size: 10.5px; }
.decoration-option:hover { border-color: #414b68; color: var(--text-2); }
.decoration-option.selected { border-color: var(--accent); background: rgba(124, 92, 255, .12); color: #d9d1ff; }
.decoration-option .avatar-wrap { --size: 42px; }
.color-row { display: flex; flex-wrap: wrap; gap: 7px; }
.color-swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }
.color-swatch.selected { border-color: #fff; }

/* Lists inside modals */
.list-item { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.list-item:last-child { border-bottom: 0; }
.list-item .avatar-wrap { flex: 0 0 auto; }
.list-item-info { flex: 1; min-width: 0; }
.list-item-info b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item-info small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; line-height: 1.4; overflow-wrap: anywhere; }
.list-item-actions { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.empty-inline { padding: 24px 0; text-align: center; color: var(--muted-2); font-size: 12px; }

/* report */
.report-target { padding: 11px 13px; background: #0e111a; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; color: var(--muted); line-height: 1.5; margin-bottom: 16px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 140px; overflow-y: auto; }

/* Emoji / GIF picker */
.emoji-tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; max-height: 300px; overflow-y: auto; }
.emoji-grid button { aspect-ratio: 1; border: 0; border-radius: 8px; background: transparent; font-size: 23px; display: flex; align-items: center; justify-content: center; }
.emoji-grid button:hover { background: rgba(255, 255, 255, .07); transform: scale(1.12); }
.gif-search { display: flex; gap: 7px; margin-bottom: 12px; }
.gif-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-height: 390px; overflow-y: auto; }
.gif-grid button { padding: 0; border: 0; background: #07090f; border-radius: 8px; overflow: hidden; aspect-ratio: 1.25; }
.gif-grid img { width: 100%; height: 100%; object-fit: cover; }
.gif-grid button:hover { outline: 2px solid var(--accent); }

/* Admin */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 10px; margin-bottom: 18px; }
.stat-card { border: 1px solid var(--line); background: linear-gradient(150deg, #151a28, #0f121b); border-radius: 13px; padding: 14px; }
.stat-card b { display: block; font-size: 24px; letter-spacing: -.04em; margin-top: 4px; }
.stat-card span { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 750; }
.stat-card.accent b { color: var(--accent-2); }
.stat-card.green b { color: var(--green); }
.stat-card.red b { color: var(--red); }
.discord-card { border: 1px solid var(--line); background: #0e111a; border-radius: 13px; padding: 14px; margin-bottom: 18px; }
.discord-card .status-line { display: flex; align-items: center; gap: 7px; font-size: 12.5px; margin-bottom: 6px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 620px; }
th { text-align: left; padding: 10px 12px; background: #0e111a; color: var(--muted); font-size: 9.5px; text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td .action-row { display: flex; flex-wrap: wrap; gap: 4px; }
td .action-row .btn { min-height: 26px; padding: 0 7px; font-size: 10.5px; border-radius: 6px; }
.admin-user-cell { display: flex; align-items: center; gap: 8px; }
.admin-user-cell .avatar-wrap { width: 27px; height: 27px; }
.admin-user-cell b { display: block; font-size: 12px; }
.admin-user-cell small { color: var(--muted-2); font-size: 10px; }
.role-select { min-height: 28px; padding: 2px 6px; font-size: 11px; border-radius: 6px; border: 1px solid var(--line); background: #0e111a; }
.report-card { border: 1px solid var(--line); border-radius: 12px; padding: 13px; margin-bottom: 10px; background: #0e111a; }
.report-card-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.report-card-head b { font-size: 12.5px; }
.report-card p { font-size: 12px; color: var(--text-2); line-height: 1.5; }
.report-snapshot { margin: 8px 0; padding: 8px 10px; border-radius: 8px; background: #090b12; border: 1px solid #202638; font-size: 11.5px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.audit-item { display: flex; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 11.5px; }
.audit-item:last-child { border-bottom: 0; }
.audit-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-top: 5px; flex: 0 0 auto; }
.audit-info { flex: 1; min-width: 0; }
.audit-info b { color: var(--text-2); font-weight: 650; }
.audit-info small { display: block; color: var(--muted-2); margin-top: 2px; overflow-wrap: anywhere; }
.admin-toolbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.admin-toolbar .input { flex: 1; min-width: 160px; }
.notice { border: 1px solid rgba(76, 201, 240, .25); background: rgba(76, 201, 240, .07); color: #a9dff0; border-radius: 10px; padding: 10px 12px; font-size: 11.5px; line-height: 1.5; margin-bottom: 14px; }
.notice.warn { border-color: rgba(255, 200, 87, .28); background: rgba(255, 200, 87, .06); color: #f1d89a; }
.notice.danger { border-color: rgba(255, 92, 108, .28); background: rgba(255, 92, 108, .06); color: #ffadb4; }

/* Context menu modal list */
.menu-list { display: flex; flex-direction: column; gap: 3px; }
.menu-list button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); text-align: left; font-size: 13px; }
.menu-list button:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.menu-list button.danger { color: #ff9aa5; }
.menu-list .icon { width: 17px; height: 17px; }
.quick-reactions { display: flex; gap: 4px; margin-top: 4px; padding-top: 9px; border-top: 1px solid var(--line-soft); }
.quick-reactions button { width: 38px; height: 36px; border: 1px solid var(--line); background: #0e111a; border-radius: 8px; font-size: 19px; display: flex; align-items: center; justify-content: center; }
.quick-reactions button:hover { border-color: var(--accent); background: rgba(124, 92, 255, .12); }

/* Discover */
.discover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 11px; }
.discover-card { border: 1px solid var(--line); background: #0f121b; border-radius: 13px; padding: 14px; display: flex; flex-direction: column; gap: 9px; }
.discover-card-head { display: flex; align-items: center; gap: 9px; }
.discover-card h4 { font-size: 13px; }
.discover-card p { color: var(--muted); font-size: 11.5px; line-height: 1.45; min-height: 32px; }
.discover-card .meta { display: flex; justify-content: space-between; color: var(--muted-2); font-size: 10.5px; }
.discover-card .btn { width: 100%; }

/* Toasts */
.toast-root { position: fixed; right: 18px; bottom: 18px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast {
  pointer-events: auto; min-width: 220px; max-width: min(380px, calc(100vw - 36px)); padding: 11px 14px;
  border-radius: 11px; background: #1b2130; border: 1px solid #343c52; color: var(--text-2);
  font-size: 12.5px; line-height: 1.45; box-shadow: 0 16px 40px rgba(0, 0, 0, .38);
  display: flex; align-items: flex-start; gap: 9px; animation: toastIn .24s ease both;
}
.toast.success { border-color: rgba(61, 220, 151, .35); background: #10231d; color: #bdf7dc; }
.toast.error { border-color: rgba(255, 92, 108, .38); background: #251317; color: #ffc2c8; }
.toast.info { border-color: rgba(76, 201, 240, .32); background: #0e2029; color: #b7e9f8; }
.toast .icon { width: 17px; height: 17px; margin-top: 1px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 2100; background: rgba(0, 0, 0, .9); display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; animation: fadeIn .15s ease; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 30px 100px rgba(0, 0, 0, .6); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1320px) {
  :root { --sidebar: 282px; --members: 252px; }
}
@media (max-width: 1160px) {
  :root { --members: 0px; --sidebar: 276px; }
  .members-panel { display: none; }
  .app-shell { grid-template-columns: var(--rail) var(--sidebar) minmax(0, 1fr); }
  .app-shell.members-visible { grid-template-columns: var(--rail) var(--sidebar) minmax(0, 1fr) 252px; }
  .app-shell.members-visible .members-panel { display: block; }
}
@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; overflow-y: auto; }
  .auth-art { display: none; }
  .auth-panel { min-height: 100dvh; padding: 34px 22px; justify-content: center; }
  .auth-mobile-brand { display: flex; }
  .auth-bottom { margin-top: 26px; }
}
@media (max-width: 860px) {
  :root { --rail: 66px; --sidebar: 286px; }
  .app-shell { grid-template-columns: var(--rail) minmax(0, 1fr); }
  .sidebar {
    position: fixed; left: var(--rail); top: 0; bottom: 0; width: var(--sidebar); transform: translateX(-104%);
    transition: transform .22s ease; z-index: 60; box-shadow: 18px 0 50px rgba(0, 0, 0, .4);
  }
  .app-shell.sidebar-open .sidebar { transform: translateX(0); }
  .app-shell.members-visible { grid-template-columns: var(--rail) minmax(0, 1fr) 250px; }
  .app-shell.members-visible .sidebar { transform: translateX(-104%); }
  .mobile-menu-btn { display: inline-flex !important; }
  .rail { z-index: 70; }
  .main { grid-column: 2; }
  .sidebar-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 55; }
  .chat-header { min-height: 62px; padding: 0 12px; }
  .composer-wrap { padding: 0 10px 10px; }
  .message-list { padding: 16px 8px 12px; }
  .msg { grid-template-columns: 36px minmax(0, 1fr); gap: 9px; padding: 4px 7px; }
  .msg-avatar .avatar-wrap { width: 36px; height: 36px; }
  .msg-actions { opacity: 1; pointer-events: auto; position: static; margin-top: 4px; width: max-content; background: transparent; border: 0; box-shadow: none; padding: 0; transform: none; }
  .msg-actions button { width: 26px; height: 26px; background: rgba(255, 255, 255, .04); }
  .feed-scroll { padding: 10px; }
  .feed-post { min-height: calc(100dvh - 128px); border-radius: 18px; }
  .feed-content { padding: 22px 20px 24px; }
  .feed-rail { right: 10px; bottom: 98px; }
  .feed-action { width: 44px; height: 44px; }
  .feed-header { padding: 11px 14px; min-height: 66px; }
  .feed-header h2 { font-size: 18px; }
  .feed-actions .btn { min-height: 36px; padding: 0 10px; font-size: 12px; }
}
@media (max-width: 620px) {
  :root { --rail: 58px; }
  .rail { padding-top: 9px; gap: 7px; }
  .rail-btn, .guild-icon { width: 42px; height: 42px; border-radius: 13px; }
  .rail-btn:hover, .rail-btn.active, .guild-icon:hover, .guild-icon.active { border-radius: 15px; }
  .rail-divider { width: 26px; }
  .brand-mark.small { width: 38px; height: 38px; font-size: 20px; border-radius: 12px; }
  .sidebar { width: min(84vw, 300px); }
  .chat-header-actions .icon-btn { width: 31px; height: 31px; }
  .chat-header-icon { display: none; }
  .chat-header-info b { font-size: 14px; }
  .chat-header-info small { font-size: 10.5px; }
  .composer { border-radius: 13px; }
  .composer-btn { width: 32px; height: 34px; }
  .composer-send { width: 35px; height: 35px; }
  .composer textarea { font-size: 13.5px; padding-left: 3px; }
  .composer-wrap { padding: 0 7px 7px; }
  .msg-text { font-size: 13.5px; }
  .feed-header p { display: none; }
  .feed-actions .btn.ghost { display: none; }
  .feed-post { min-height: calc(100dvh - 118px); }
  .feed-text { font-size: 17px; }
  .feed-content { padding: 18px 16px 20px; }
  .feed-author .avatar-wrap { width: 36px; height: 36px; }
  .feed-rail { bottom: 92px; }
  .feed-action { width: 41px; height: 41px; }
  .feed-action .icon { width: 18px; height: 18px; }
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-card { width: 100%; max-height: 93dvh; border-radius: 20px 20px 0 0; }
  .modal-card.wide, .modal-card.xwide { width: 100%; }
  .modal-head { padding: 16px 16px 12px; }
  .modal-body { padding: 16px; }
  .modal-foot { padding: 12px 16px 16px; }
  .toast-root { right: 10px; bottom: 10px; left: 10px; align-items: stretch; }
  .toast { max-width: none; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .emoji-grid { grid-template-columns: repeat(7, 1fr); }
  .gif-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-main { padding: 0 16px; }
  .profile-body { padding: 14px 16px 18px; }
  .profile-modal-head { padding: 16px 16px 0; }
  .profile-banner { height: 82px; }
  .profile-main { margin-top: -36px; }
  .profile-main .avatar-wrap.xxl { --size: 104px; }
  .discover-grid { grid-template-columns: 1fr; }
}
@media (max-width: 390px) {
  .feed-rail { right: 8px; bottom: 86px; gap: 7px; }
  .feed-action b { display: none; }
  .feed-content { padding: 16px 14px 18px; }
  .chat-header-actions .icon-btn[data-action="toggle-members"] { display: none !important; }
}

/* ============================================================
   Utilities & motion
   ============================================================ */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes decoGlow { 0%, 100% { opacity: .3; transform: scale(.98); } 50% { opacity: .6; transform: scale(1.04); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.85); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeSlide { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }
@keyframes typingBounce { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-3px); opacity: 1; } }
@keyframes likePop { 0% { transform: scale(1); } 45% { transform: scale(1.35); } 100% { transform: scale(1); } }
.like-pop { animation: likePop .35s ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after {
  animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important;
}
body.motion-off *, body.motion-off *::before, body.motion-off *::after {
  animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important;
}
body.cursor-off, body.cursor-off * { cursor: auto !important; }
body.cursor-off input[type="text"], body.cursor-off input[type="email"], body.cursor-off input[type="password"], body.cursor-off input[type="search"], body.cursor-off textarea { cursor: text !important; }
body.compact-messages .msg { padding-top: 2px; padding-bottom: 2px; }
body.compact-messages .msg-main { margin-top: 0; }

/* ============================================================
   NeonCord 1.1 — yeni özellikler
   ============================================================ */
.badge.tester { background: rgba(255, 210, 63, .12); color: #ffe98a; border-color: rgba(255, 210, 63, .3); }
.badge.nsfw, .badge.red { background: rgba(255, 92, 108, .12); color: #ff9aa5; border-color: rgba(255, 92, 108, .3); }
.badge.tiny { padding: 1px 4px; font-size: 8px; }
.avatar-wrap { position: relative; }
.avatar-tester {
  position: absolute; right: -3px; bottom: -3px; width: 15px; height: 15px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-ink);
  font-size: 8px; font-weight: 900; border: 2px solid var(--bg); z-index: 2;
}
.msg-tag {
  display: inline-flex; padding: 1px 5px; border-radius: 4px; background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line); color: var(--text-2); font-size: 9px; font-weight: 800; letter-spacing: .04em;
}
.msg-bot {
  display: inline-flex; align-items: center; gap: 3px; padding: 1px 5px; border-radius: 4px;
  background: rgba(76, 201, 240, .12); color: #8fdcf9; border: 1px solid rgba(76, 201, 240, .24);
  font-size: 8.5px; font-weight: 800; letter-spacing: .06em;
}
.msg-receipt {
  display: inline-flex; align-items: center; gap: 3px; margin: 2px 0 0; color: var(--muted-2);
  font-size: 10px; font-weight: 600; letter-spacing: .02em;
}
.msg-receipt .icon { color: var(--accent); }
.msg.nsfw-msg .msg-text { filter: blur(0); }

/* +18 içerik kapısı */
.nsfw-wrap { position: relative; overflow: hidden; border-radius: 12px; margin-top: 6px; max-width: 460px; }
.nsfw-wrap .nsfw-content { filter: blur(20px) saturate(.5); transform: scale(1.04); pointer-events: none; user-select: none; }
.nsfw-wrap.revealed .nsfw-content { filter: none; transform: none; pointer-events: auto; user-select: auto; }
.nsfw-cover {
  position: absolute; inset: 0; width: 100%; min-height: 120px; border: 1px solid var(--line);
  border-radius: 12px; background: rgba(9, 11, 17, .72); color: var(--text); display: flex;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px; backdrop-filter: blur(2px);
}
.nsfw-cover:hover { border-color: rgba(255, 92, 108, .45); }
.nsfw-wrap.revealed .nsfw-cover { display: none; }
.nsfw-icon { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 8px; border-radius: 10px; background: rgba(255, 92, 108, .16); color: #ff9aa5; border: 1px solid rgba(255, 92, 108, .35); font-weight: 900; }
.nsfw-cover small { color: var(--muted); font-size: 10px; }
.nsfw-mini { margin-left: auto; color: #ff9aa5; font-size: 8.5px; font-weight: 900; border: 1px solid rgba(255, 92, 108, .28); border-radius: 4px; padding: 1px 3px; }
.chat-header-icon.nsfw-icon { color: #ff9aa5; background: rgba(255, 92, 108, .1); }

/* Discord / NeonCord davet kartı */
.embed-card {
  position: relative; display: flex; max-width: 480px; margin-top: 7px; border-radius: 11px;
  background: linear-gradient(180deg, #161b28, #111520); border: 1px solid #2c3449; overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
}
.embed-bar { width: 4px; flex: 0 0 4px; background: var(--embed-accent, var(--accent)); }
.embed-body { min-width: 0; padding: 12px 14px 13px; flex: 1; }
.embed-head { display: flex; align-items: center; gap: 10px; }
.embed-icon { width: 42px; height: 42px; border-radius: 11px; object-fit: cover; background: #1d2334; }
.embed-icon-fallback { display: grid; place-items: center; font-weight: 900; color: #fff; background: linear-gradient(145deg, #5865f2, #3f4ac1); }
.embed-title-wrap { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.embed-provider { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.embed-title { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.embed-description { color: var(--text-2); font-size: 12px; line-height: 1.5; margin-top: 8px; }
.embed-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 10.5px; margin-top: 8px; }
.embed-join {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; padding: 6px 10px;
  border-radius: 7px; background: var(--embed-accent, var(--accent)); color: #111; font-size: 11.5px; font-weight: 800;
}
.embed-join:hover { text-decoration: none; filter: brightness(1.08); }
.embed-card.embed-nsfw { position: relative; }

/* Genel link önizleme kartı */
a.embed-card { text-decoration: none; color: inherit; transition: border-color .15s ease; }
a.embed-card:hover { border-color: #3c4763; }
.embed-link .embed-icon-fallback { background: linear-gradient(145deg, #7c5cff, #4b3fb0); font-size: 18px; }
.embed-link .embed-title-wrap { flex: 1; }
.embed-image { display: block; width: 100%; margin-top: 10px; border-radius: 9px; max-height: 220px; object-fit: cover; background: #1d2334; }
.link-embeds { display: flex; flex-direction: column; }

/* Profil bannerı ve ayarlar */
.profile-banner-media { background-size: cover !important; background-position: center !important; }
.settings-prof-head {
  height: 180px; margin: -20px -20px 0; position: relative;
  background: radial-gradient(500px 160px at 25% 0%, rgba(255, 210, 63, .3), transparent 70%), linear-gradient(120deg, #22283b, #121622);
  border-bottom: 1px solid var(--line); background-size: cover; background-position: center;
}
.settings-prof-avatar { position: absolute; left: 50%; bottom: -40px; transform: translateX(-50%); }
.settings-prof-avatar .avatar-wrap { border: 4px solid var(--panel); border-radius: 50%; background: var(--panel); width: 80px; height: 80px; }
.settings-prof-head .settings-prof-avatar { z-index: 2; }
.rich-presence {
  display: flex; align-items: flex-start; gap: 9px; padding: 10px 11px; margin-bottom: 12px;
  border-radius: 10px; border: 1px solid rgba(61, 220, 151, .2); background: rgba(61, 220, 151, .055);
}
.rich-presence .icon { color: var(--green); flex: 0 0 auto; margin-top: 2px; }
.rich-presence div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rich-presence b { font-size: 12px; }
.rich-presence small { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; }

/* Sesli sohbet */
.voice-dock {
  position: fixed; right: 18px; bottom: 18px; z-index: 120; width: 292px;
  border-radius: 15px; border: 1px solid rgba(255, 210, 63, .26); background: rgba(13, 16, 24, .96);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .52), 0 0 0 1px rgba(255, 210, 63, .05);
  backdrop-filter: blur(16px); padding: 12px; animation: modalIn .22s ease;
}
.voice-dock-head { display: flex; align-items: center; gap: 9px; }
.voice-dock-head b { display: block; font-size: 12.5px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice-dock-head small { color: var(--muted); font-size: 10px; }
.voice-pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(61, 220, 151, .1); animation: pulse 1.6s infinite; }
.voice-pulse.connecting { background: var(--yellow); box-shadow: 0 0 0 4px rgba(255, 200, 87, .1); }
.voice-peers { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; min-height: 24px; }
.voice-peer { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); }
.voice-peer .avatar-wrap { --size: 24px; }
.voice-peer .icon { color: #ff9aa5; width: 11px; height: 11px; }
.voice-controls { display: flex; justify-content: flex-end; gap: 6px; }
.voice-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .06); color: var(--text); display: grid; place-items: center;
}
.voice-btn:hover { background: rgba(255, 255, 255, .12); }
.voice-btn.danger { background: rgba(255, 92, 108, .14); border-color: rgba(255, 92, 108, .3); color: #ff9aa5; }
.voice-btn .icon { width: 15px; height: 15px; }
.channel-item.voice .icon { flex: 0 0 auto; }
.channel-item.voice-active { border-color: rgba(61, 220, 151, .28); background: rgba(61, 220, 151, .07); }
.voice-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); margin-left: auto; animation: pulse 1.8s infinite; }
.voice-count { margin-left: auto; font-size: 9px; color: var(--green); font-weight: 800; }
.call-btn.active { color: var(--green); border-color: rgba(61, 220, 151, .3); background: rgba(61, 220, 151, .1); }
.incoming-call { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 8px 6px 4px; }
.incoming-call h3 { font-size: 18px; margin-top: 4px; }
.incoming-call p { color: var(--muted); font-size: 12px; }
.incoming-actions { display: flex; justify-content: center; gap: 8px; margin-top: 14px; width: 100%; }
.incoming-actions .btn { flex: 1; justify-content: center; }
.call-btn { animation: callRing 1.6s infinite; }

/* Geliştirici merkezi */
.dev-hero {
  border-radius: 14px; padding: 16px; margin-bottom: 16px;
  background: radial-gradient(500px 200px at 0% 0%, rgba(255, 210, 63, .16), transparent 65%), linear-gradient(140deg, #1b2132, #10131d);
  border: 1px solid rgba(255, 210, 63, .18);
}
.dev-hero h3 { font-size: 17px; margin-bottom: 5px; }
.dev-hero p { color: var(--muted); font-size: 12px; line-height: 1.55; }
.dev-token { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px; border-radius: 9px; border: 1px dashed rgba(255, 210, 63, .27); background: rgba(255, 210, 63, .045); margin: 10px 0; }
.dev-token code { font-family: ui-monospace, Consolas, monospace; color: #ffe98a; font-size: 11px; overflow-wrap: anywhere; flex: 1; min-width: 180px; }
.dev-code-block { position: relative; background: #090c13; border: 1px solid var(--line); border-radius: 10px; margin: 8px 0 14px; overflow: hidden; }
.dev-code-block pre { margin: 0; padding: 13px; overflow-x: auto; font-family: ui-monospace, Consolas, monospace; font-size: 11px; line-height: 1.55; color: #c9d3ee; }
.dev-code-block .dev-copy { position: absolute; right: 7px; top: 7px; }
.dev-steps { counter-reset: devstep; display: flex; flex-direction: column; gap: 8px; }
.dev-step { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, .02); }
.dev-step::before { counter-increment: devstep; content: counter(devstep); flex: 0 0 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 11px; font-weight: 900; }
.dev-step b { font-size: 12px; }
.dev-step p { color: var(--muted); font-size: 11px; margin-top: 2px; line-height: 1.5; }
.dev-tabs { display: flex; gap: 5px; flex-wrap: wrap; margin: 10px 0; }
.dev-tab { padding: 5px 9px; border-radius: 7px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 11px; }
.dev-tab.selected { background: rgba(255, 210, 63, .12); color: var(--accent-2); border-color: rgba(255, 210, 63, .3); }
.dev-activities { display: flex; flex-wrap: wrap; gap: 6px; }
.dev-activities .btn { min-height: 30px; font-size: 11px; }

/* Admin ekleri */
.admin-subtabs { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 14px; }
.admin-subtab { border: 1px solid var(--line); background: transparent; color: var(--muted); padding: 5px 9px; border-radius: 7px; font-size: 11px; }
.admin-subtab.selected { color: var(--accent-2); border-color: rgba(255, 210, 63, .28); background: rgba(255, 210, 63, .09); }
.invite-code { font-family: ui-monospace, Consolas, monospace; color: var(--accent-2); font-size: 12px; letter-spacing: .05em; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row small { color: var(--muted); display: block; font-size: 10.5px; margin-top: 2px; }

@keyframes callRing {
  0%, 100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, .3); }
  50% { box-shadow: 0 0 0 7px rgba(61, 220, 151, 0); }
}

@media (max-width: 620px) {
  .voice-dock { right: 10px; left: 10px; bottom: 10px; width: auto; }
  .settings-prof-head { margin: -16px -16px 0; height: 180px; }
  .settings-prof-avatar { left: 50%; transform: translateX(-50%); bottom: -40px; }
  .settings-prof-avatar { left: 16px; }
  .embed-card { max-width: 100%; }
}

