/* static/ui.css — общие стили сайта (подключены на /trends и /login; остальные страницы пока со своими) */
:root{
  --bg:#0a0a10; --surface:#14141d; --surface2:#1c1c28; --text:#f5f5f8; --muted:#a4a4b8;
  --border:rgba(255,255,255,.09); --glass:rgba(16,16,24,.72); --field:rgba(255,255,255,.06);
  --accent:#ffc247; --accent-grad:linear-gradient(135deg,#ffd166 0%,#ff9f43 100%); --accent-ink:#241603;
  --violet:#8b6cff; --danger:#ff6b6b; --ok:#3ddc97;
  --shadow:0 18px 50px rgba(0,0,0,.45);
  --radius:20px;
  color-scheme: dark;
}
:root[data-theme="light"]{
  --bg:#f7f2e8; --surface:#fffaf0; --surface2:#f1e9d9; --text:#1c1a14; --muted:#6c6657;
  --border:rgba(40,30,10,.12); --glass:rgba(255,250,240,.82); --field:rgba(255,255,255,.75);
  --shadow:0 18px 50px rgba(80,60,20,.18);
  color-scheme: light;
}
*{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{
  margin:0; min-height:100vh; color:var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(1000px 520px at 12% -6%, rgba(255,194,71,.16), transparent 60%),
    radial-gradient(900px 520px at 92% 4%, rgba(139,108,255,.16), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
:root[data-theme="light"] body{
  background:
    radial-gradient(900px 480px at 10% -8%, rgba(255,194,71,.30), transparent 60%),
    radial-gradient(800px 480px at 95% 0%, rgba(255,150,120,.18), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
a{ color:inherit; text-decoration:none; }
button{ font:inherit; color:inherit; }
.wrap{ max-width:1200px; margin:0 auto; padding:16px 20px 64px; }

/* шапка */
.nav{
  display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
  padding:10px 12px 10px 14px; border-radius:18px; border:1px solid var(--border);
  background:var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  position:sticky; top:12px; z-index:30;
}
.brand{ display:flex; align-items:center; gap:10px; font-weight:800; letter-spacing:-.01em; }
.brand .logo{ width:34px; height:34px; border-radius:11px; display:grid; place-items:center; font-size:19px;
  background:var(--accent-grad); box-shadow:0 6px 16px rgba(255,159,67,.35); }
.links{ display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.pill{ display:inline-flex; align-items:center; gap:6px; padding:8px 13px; border-radius:999px; border:1px solid transparent;
  background:transparent; font-size:14px; font-weight:500; color:var(--muted); cursor:pointer; white-space:nowrap;
  transition: background .15s, color .15s, border-color .15s; }
.pill:hover{ color:var(--text); background:var(--field); }
.pill.active{ color:var(--text); background:var(--field); border-color:var(--border); font-weight:650; }
.pill.solid{ color:var(--accent-ink); background:var(--accent-grad); font-weight:700; }
.pill.solid:hover{ filter:brightness(1.06); color:var(--accent-ink); }
.pill.icon{ padding:8px 11px; }

/* кнопки и поля */
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:9px; width:100%; padding:14px 18px; border-radius:15px;
  border:1px solid var(--border); background:var(--field); font-weight:700; font-size:16px; cursor:pointer;
  transition: transform .12s, filter .15s, background .15s, box-shadow .15s; }
.btn:hover{ background:var(--surface2); }
.btn:active{ transform: translateY(1px); }
.btn[disabled]{ opacity:.55; cursor:default; }
.btn.primary{ color:var(--accent-ink); background:var(--accent-grad); border-color:transparent; box-shadow:0 10px 26px rgba(255,159,67,.28); }
.btn.primary:hover{ filter:brightness(1.05); }
.btn.tg{ color:#fff; background:linear-gradient(135deg,#34b7f1,#1d8fd6); border-color:transparent; box-shadow:0 10px 26px rgba(29,143,214,.30); }
.btn.tg:hover{ filter:brightness(1.06); }
.btn svg{ flex:0 0 auto; }
.input{ width:100%; padding:14px 15px; border-radius:15px; border:1px solid var(--border); background:var(--field);
  color:var(--text); font-size:16px; outline:none; transition:border-color .15s, box-shadow .15s; }
.input::placeholder{ color:var(--muted); opacity:.8; }
.input:focus{ border-color:var(--accent); box-shadow:0 0 0 4px rgba(255,194,71,.16); }
.hint{ color:var(--muted); font-size:13.5px; line-height:1.45; }
.err{ color:var(--danger); font-size:14px; line-height:1.4; }
.spinner{ display:inline-block; width:16px; height:16px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:sp .8s linear infinite; }
@keyframes sp{ to{ transform:rotate(360deg); } }
@media (prefers-reduced-motion: reduce){ *{ animation-duration:.01ms !important; transition-duration:.01ms !important; } }
@media (max-width:640px){
  .wrap{ padding:12px 14px 56px; }
  .nav{ position:static; padding:10px 12px; }                 /* на телефоне шапка не липнет: иначе съедает пол-экрана */
  .links{ width:100%; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; margin:0 -2px; padding:2px; }
  .links::-webkit-scrollbar{ display:none; }
  .pill{ padding:7px 11px; font-size:13.5px; flex:0 0 auto; }
  .links .pill.solid, .links .pill.icon{ order:-1; }          /* «Войти»/баланс и тема — первыми, чтобы не уезжали за край */
}
