:root { --bg0: #08070f; --bg1: #0e0c19; --bg2: #141123; --bg3: #1b1730; --line: rgba(255,255,255,.07); --text: #eeecf8; --muted: #9a96b4; --dim: #6d6987;
  --acc: #8b5cf6; --acc2: #ec4899; --ok: #22c55e; --bad: #ef4444; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg0); color: var(--text); font: 15px/1.45 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
#app { height: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.boot { height: 100%; display: grid; place-items: center; font: 800 28px Sora; color: var(--acc); }
.av { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; font: 700 14px Inter; flex: none; }
.av.sm { width: 32px; height: 32px; font-size: 12px; } .av.xs { width: 22px; height: 22px; font-size: 9px; }
.btn { padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg3); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn.primary { border: 0; background: linear-gradient(90deg, var(--acc), var(--acc2)); color: #fff; box-shadow: 0 10px 28px -12px rgba(236,72,153,.8); }
.btn.wide { width: 100%; } .btn:disabled { opacity: .6; }
.ib { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; flex: none; }
.ib:hover { background: rgba(255,255,255,.07); color: var(--text); } .ib.off { color: var(--bad); } .ib.danger { color: var(--bad); }
.ib .i { width: 18px; height: 18px; }
input, textarea { font: inherit; color: var(--text); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 99; padding: 12px 18px; border-radius: 12px; background: #2a2440; border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0,0,0,.5); transition: opacity .4s; }
.toast.out { opacity: 0; }
.loading, .empty { color: var(--muted); text-align: center; padding: 40px 16px; }

/* giriş */
.auth { min-height: 100%; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 40px; padding: 40px clamp(16px, 6vw, 90px);
  background: radial-gradient(60% 70% at 15% 20%, rgba(139,92,246,.35), transparent 60%), radial-gradient(50% 60% at 90% 90%, rgba(236,72,153,.25), transparent 60%), var(--bg0); }
.auth-art h2 { font: 800 clamp(36px, 5vw, 64px)/1.05 Sora; letter-spacing: -1.5px; margin: 0 0 16px; }
.auth-art h2 span { background: linear-gradient(90deg, #c4b5fd, #f472b6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-art p { color: var(--muted); font-size: 17px; max-width: 480px; } .auth-art ul { list-style: none; padding: 0; display: grid; gap: 10px; font-weight: 600; }
.auth-card { width: 100%; max-width: 440px; justify-self: center; display: flex; flex-direction: column; gap: 14px; padding: 32px; border-radius: 20px; background: rgba(20,17,35,.85); border: 1px solid var(--line); backdrop-filter: blur(14px); box-shadow: 0 30px 80px -30px rgba(0,0,0,.8); }
.auth-card.center { text-align: center; align-items: center; grid-column: 1 / -1; }
.auth-card h1 { margin: 0; font: 800 26px Sora; } .auth-card .sub { margin: 0; color: var(--muted); }
.brand { display: flex; align-items: baseline; gap: 8px; } .brand b { font: 800 22px Sora; color: #fff; } .brand i { font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: linear-gradient(90deg, var(--acc), var(--acc2)); text-transform: uppercase; letter-spacing: .06em; }
.auth-card label, .m-body label { display: flex; flex-direction: column; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.auth-card input, .m-body input { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg0); outline: none; font-size: 15px; }
.auth-card input:focus, .m-body input:focus { border-color: var(--acc); }
.auth-card a { color: #c4b5fd; font-size: 14px; } .err { color: #fca5a5; margin: 0; min-height: 1em; font-size: 14px; }
.dav { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; color: #fff; font: 800 18px Sora; background: var(--c, var(--acc)); }
.dav.big { width: 84px; height: 84px; border-radius: 26px; font-size: 28px; }

/* yerleşim */
.shell { height: 100%; display: grid; grid-template-columns: 72px 248px 1fr 240px; }
.rail { background: var(--bg0); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0; overflow-y: auto; scrollbar-width: none; }
.rail-g, .rail-home, .rail-add { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--bg3); font: 700 15px Inter; cursor: pointer; border: 0; transition: border-radius .2s, background .2s; flex: none; color: var(--text); }
.rail-g { background: var(--c); } .rail-g:hover, .rail-g.on, .rail-home:hover, .rail-home.on { border-radius: 16px; }
.rail-home { background: linear-gradient(135deg, var(--acc), var(--acc2)); color: #fff; } .rail-add { color: var(--ok); } .rail-add:hover { background: var(--ok); color: #fff; border-radius: 16px; }
.rail-g::before { content: ''; position: absolute; left: -12px; width: 4px; height: 0; border-radius: 0 4px 4px 0; background: #fff; transition: height .2s; }
.rail-g.on::before { height: 36px; } .rail-g.un::before { height: 8px; } .rail-g:hover::before { height: 20px; }
.rail-sep { width: 32px; height: 2px; border-radius: 2px; background: var(--line); flex: none; }
.side { background: var(--bg1); display: flex; flex-direction: column; min-height: 0; }
.side-h { display: flex; align-items: center; gap: 4px; height: 52px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--line); box-shadow: 0 1px 8px rgba(0,0,0,.25); }
.side-h b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15.5px; }
.side-note { color: var(--muted); padding: 16px; margin: 0; flex: 1; }
.chans { flex: 1; overflow-y: auto; padding: 8px; }
.cat { display: flex; align-items: center; justify-content: space-between; padding: 16px 8px 4px; font-size: 11.5px; font-weight: 700; color: var(--dim); letter-spacing: .04em; }
.cat button { background: none; border: 0; color: var(--dim); cursor: pointer; padding: 0; display: grid; } .cat button:hover { color: var(--text); } .cat .i { width: 16px; height: 16px; }
.ch { position: relative; display: flex; align-items: center; gap: 6px; padding: 7px 8px; margin: 1px 0; border-radius: 7px; color: var(--muted); font-weight: 500; cursor: pointer; }
.ch .i { width: 18px; height: 18px; color: var(--dim); } .ch span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch:hover { background: rgba(255,255,255,.05); color: var(--text); } .ch.on { background: rgba(139,92,246,.18); color: #fff; } .ch.un { color: #fff; font-weight: 700; }
.ch.un::before { content: ''; position: absolute; left: -8px; width: 4px; height: 8px; border-radius: 0 4px 4px 0; background: #fff; }
.ch em { font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 99px; background: rgba(34,197,94,.2); color: #86efac; }
.ch .x { display: none; background: none; border: 0; color: var(--dim); cursor: pointer; padding: 0; } .ch:hover .x { display: grid; } .ch .x .i { width: 15px; height: 15px; } .ch .x:hover { color: var(--bad); }
.vch.on > .ch { color: #86efac; }
.vusers { padding: 2px 0 6px 30px; display: grid; gap: 2px; }
.vu { display: flex; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 6px; font-size: 13.5px; color: var(--muted); }
.vu .av { box-shadow: 0 0 0 2px transparent; transition: box-shadow .12s; } .vu.speak .av { box-shadow: 0 0 0 2px var(--ok); } .vu.speak { color: var(--text); }
.vu span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .vm { display: grid; color: var(--bad); } .vm .i { width: 14px; height: 14px; }
.vbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-top: 1px solid var(--line); background: rgba(34,197,94,.06); }
.vbar b.ok { color: #4ade80; font-size: 13.5px; display: block; } .vbar small { color: var(--muted); }
.me { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 10px; background: #0b0a14; }
.me-n { flex: 1; min-width: 0; display: flex; flex-direction: column; } .me-n b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .me-n small { color: var(--muted); font-size: 12px; }

/* sohbet */
.chat { background: var(--bg2); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-h { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 16px; border-bottom: 1px solid var(--line); box-shadow: 0 1px 8px rgba(0,0,0,.2); }
.chat-h .i { color: var(--dim); } .chat-h b { font-size: 15.5px; } .gname { color: var(--dim); font-size: 13px; margin-left: 6px; } .mob { display: none; }
.msgs { flex: 1; overflow-y: auto; padding: 16px 0 8px; }
.welcome { padding: 16px 20px 20px; } .welcome .wh { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--bg3); }
.welcome .wh .i { width: 34px; height: 34px; } .welcome h2 { margin: 12px 0 4px; font: 800 26px Sora; } .welcome p { margin: 0; color: var(--muted); }
.msg { position: relative; display: flex; gap: 14px; padding: 6px 20px 2px; margin-top: 12px; }
.msg.cont { margin-top: 0; padding-top: 1px; } .msg:hover { background: rgba(0,0,0,.14); }
.msg .mt { width: 40px; flex: none; font-size: 10.5px; color: var(--dim); text-align: right; padding-top: 3px; opacity: 0; } .msg.cont:hover .mt { opacity: 1; }
.mb { min-width: 0; flex: 1; } .mh { display: flex; align-items: baseline; gap: 8px; } .mh b { font-weight: 700; } .mh small { color: var(--dim); font-size: 12px; }
.body { white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; color: #dcd9ec; } .body a { color: #93c5fd; } .body a:hover { text-decoration: underline; }
.mdel { position: absolute; right: 16px; top: -8px; display: none; background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; color: var(--muted); padding: 4px; cursor: pointer; }
.msg:hover .mdel { display: grid; } .mdel:hover { color: var(--bad); } .mdel .i { width: 16px; height: 16px; }
.composer { display: flex; align-items: flex-end; gap: 8px; margin: 0 16px; padding: 8px 8px 8px 16px; border-radius: 12px; background: var(--bg3); }
.composer textarea { flex: 1; resize: none; border: 0; background: none; outline: none; padding: 6px 0; max-height: 200px; font-size: 15px; }
.send { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 9px; background: linear-gradient(135deg, var(--acc), var(--acc2)); color: #fff; cursor: pointer; } .send .i { width: 17px; height: 17px; }
.typing { height: 22px; padding: 2px 20px; font-size: 12.5px; color: var(--muted); }

/* üyeler */
.members { background: var(--bg1); overflow-y: auto; padding: 8px 8px 16px; }
.members h4 { margin: 16px 8px 6px; font-size: 11.5px; color: var(--dim); letter-spacing: .04em; }
.mem { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 7px; } .mem:hover { background: rgba(255,255,255,.05); } .mem.off { opacity: .45; }
.mav { position: relative; } .mav .st { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: #4b5563; border: 3px solid var(--bg1); } .mav .st.on { background: var(--ok); }
.mn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; } .mn b { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .mn em { font-style: normal; font-size: 12px; }
.mem .x { display: none; background: none; border: 0; color: var(--dim); cursor: pointer; } .mem:hover .x { display: grid; } .mem .x:hover { color: var(--bad); } .mem .x .i { width: 15px; height: 15px; }

/* keşfet */
.disc { background: var(--bg2); overflow-y: auto; padding: 0 0 40px; grid-column: 3 / -1; }
.disc-hero { margin: 16px; padding: clamp(28px, 5vw, 56px); border-radius: 20px; text-align: center; background: radial-gradient(70% 90% at 20% 10%, rgba(139,92,246,.55), transparent 60%), radial-gradient(60% 80% at 90% 90%, rgba(236,72,153,.4), transparent 60%), var(--bg3); }
.disc-hero h1 { font: 800 clamp(30px, 4.5vw, 50px) Sora; margin: 0 0 10px; letter-spacing: -1px; } .disc-hero h1 span { color: #f9a8d4; } .disc-hero p { color: #d4d0ea; margin: 0 0 18px; }
.disc-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); padding: 0 16px; }
.dcard { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 0 16px 16px; border-radius: 16px; background: var(--bg1); border: 1px solid var(--line); overflow: hidden; }
.dcard .dbn { height: 80px; margin: 0 -16px; background: linear-gradient(135deg, var(--c), #1b1730); } .dcard .dav { margin-top: -28px; border: 4px solid var(--bg1); background: var(--c); }
.dcard h3 { margin: 4px 0 0; font-size: 16px; } .dcard p { margin: 0; color: var(--muted); font-size: 13.5px; flex: 1; } .dcard small { color: var(--dim); } .dcard .btn { margin-top: 8px; }

/* pencere */
.modal-bg { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.6); backdrop-filter: blur(3px); }
.modal { width: 100%; max-width: 440px; border-radius: 16px; background: var(--bg2); border: 1px solid var(--line); padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.modal h3 { margin: 0 0 12px; font: 800 20px Sora; } .m-body { display: grid; gap: 12px; } .m-body .sub { color: var(--muted); margin: 0; }
.m-body .chk { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; color: var(--text); letter-spacing: 0; font-weight: 500; }
.m-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

@media (max-width: 1100px) { .shell { grid-template-columns: 72px 240px 1fr; } .members { display: none; } }
@media (max-width: 800px) {
  .shell { grid-template-columns: 64px 1fr; } .side { display: none; } .shell.show-side .side { display: flex; position: fixed; left: 64px; top: 0; bottom: 0; width: min(300px, 80vw); z-index: 20; box-shadow: 20px 0 50px rgba(0,0,0,.5); }
  .rail-g, .rail-home, .rail-add { width: 44px; height: 44px; } .mob { display: grid; } .disc { grid-column: 2 / -1; }
  .auth { grid-template-columns: 1fr; } .auth-art { display: none; } .msg { padding-left: 12px; padding-right: 12px; } .composer { margin: 0 8px; }
}
