/*
 * eSevgili — Sugo-ilhamlı Dizayn Sistemi
 * Tünd mor/qara fon · Neon-çəhrayı aksent · Gradient kartlar · Cam-şüşə effektlər
 */

/* ── Qlobal Token-lər ───────────────────────────────────────────────── */
:root {
  /* Əsas rənglər */
  --bg:          #0e0818;
  --bg2:         #130d20;
  --surface:     #1a1228;
  --surface2:    #221a35;
  --surface3:    #2a2040;
  --border:      #2e2248;
  --border2:     #3d3060;

  /* Mətn */
  --dark:        #f0e8ff;
  --mid:         #c4aee8;
  --muted:       #7a6898;
  --subtle:      #4a3868;

  /* Aksent — Sugo neon çəhrayı */
  --rose:        #ff3e7f;
  --rose-dark:   #cc2060;
  --rose-pale:   rgba(255,62,127,.1);
  --rose-glow:   0 0 20px rgba(255,62,127,.35);

  /* İkinci aksent — mor */
  --purple:      #9b59f5;
  --purple-dark: #7b30e0;
  --purple-pale: rgba(155,89,245,.12);
  --purple-glow: 0 0 20px rgba(155,89,245,.3);

  /* Qızıl */
  --gold:        #ffcc44;
  --gold-pale:   rgba(255,204,68,.12);

  /* Yaşıl */
  --green:       #2ecc71;
  --green-pale:  rgba(46,204,113,.12);

  /* Gradient-lər */
  --grad-main:   linear-gradient(135deg, #ff3e7f 0%, #9b59f5 100%);
  --grad-dark:   linear-gradient(135deg, #1a0830 0%, #0e0818 100%);
  --grad-card:   linear-gradient(160deg, #1e1535 0%, #150f28 100%);
  --grad-gold:   linear-gradient(135deg, #ffcc44 0%, #ff8c00 100%);
  --grad-purple: linear-gradient(135deg, #9b59f5 0%, #6b35c5 100%);

  /* Tipografiya */
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Kölgə */
  --shadow-sm:   0 2px 8px rgba(0,0,0,.3);
  --shadow-md:   0 4px 20px rgba(0,0,0,.4);
  --shadow-lg:   0 8px 40px rgba(0,0,0,.5);
  --shadow-rose: 0 4px 24px rgba(255,62,127,.25);

  /* Radius */
  --r-sm:  8px;
  --r-md:  14px;
  --r-lg:  20px;
  --r-xl:  28px;
  --r-full: 9999px;
}

/* ── Reset & Base ───────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-family: var(--font);
  background: var(--bg);
  color: var(--dark);
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--dark);
  min-height: 100vh;
  display: flex;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--font); }
input, textarea, select { font-family: var(--font); }

/* ── Sidebar (Desktop) ──────────────────────────────────────────────── */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #130d20 0%, #0e0818 100%);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 600;
}

.sb-logo {
  padding: 16px 14px 10px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #1a0830, #0e0818);
  flex-shrink: 0;
}

.sb-logo img { width: 130px; height: auto; display: block; margin: 0 auto; }

/* Dil seçimi */
.sb-lang-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 4px; margin-top: 10px; }
.lang-pill {
  display: flex; align-items: center; justify-content: center; gap: 3px;
  padding: 4px 2px; border-radius: 8px; font-size: .64rem; font-weight: 600;
  border: 1px solid var(--border2); color: var(--muted); text-decoration: none;
  background: var(--surface2); transition: all .18s;
}
.lang-pill img { width: 16px; height: 11px; border-radius: 2px; }
.lang-pill:hover, .lang-act {
  border-color: var(--rose) !important;
  color: var(--rose) !important;
  background: var(--rose-pale) !important;
}

.sb-scroll { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.sb-scroll::-webkit-scrollbar { width: 0; }

.sb-divider { height: 1px; background: var(--border); margin: 6px 12px; }

/* Sidebar linklər */
.sb-link-solo {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 14px; margin: 2px 8px; border-radius: var(--r-md);
  font-size: .83rem; color: var(--mid); font-weight: 500;
  transition: all .18s; text-decoration: none;
}
.sb-link-solo:hover, .sb-link-solo.act {
  background: var(--rose-pale);
  color: var(--rose);
}
.sb-link-solo.act {
  border-left: 3px solid var(--rose);
  padding-left: 11px;
  font-weight: 700;
}

.sb-bdg {
  background: var(--grad-main);
  color: #fff; font-size: .54rem; font-weight: 700;
  padding: 2px 6px; border-radius: var(--r-full);
  margin-left: auto; flex-shrink: 0;
}

/* Dropdown kategoriyalar */
.sb-cat {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; margin: 2px 8px; border-radius: var(--r-md);
  font-size: .82rem; font-weight: 700; color: var(--mid);
  cursor: pointer; user-select: none;
  transition: all .18s; border: none; background: none;
  width: calc(100% - 16px); text-align: left;
}
.sb-cat:hover, .sb-cat.open { background: var(--rose-pale); color: var(--rose); }
.sb-arrow { margin-left: auto; font-size: .72rem; transition: transform .25s; }
.sb-cat.open .sb-arrow { transform: rotate(180deg); }
.sb-dropdown { display: none; }
.sb-dropdown.open { display: block; }

.sb-sub {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 12px 7px 28px; margin: 0 8px; border-radius: var(--r-sm);
  font-size: .79rem; color: var(--mid); font-weight: 500;
  transition: all .15s; text-decoration: none;
  border-left: 2px solid transparent;
}
.sb-sub:hover, .sb-sub.act { background: var(--rose-pale); color: var(--rose); }
.sb-sub.act { border-left-color: var(--rose); font-weight: 700; padding-left: 25px; }

/* Sidebar kapanma düyməsi (mobil) */
.sb-close {
  display: none; position: absolute; top: 10px; right: 10px;
  width: 28px; height: 28px; border-radius: 50%;
  border: none; background: var(--surface3); color: var(--mid);
  font-size: .9rem; align-items: center; justify-content: center; z-index: 20;
}

/* RadioSmart */
.sb-sticky-bottom { flex-shrink: 0; border-top: 1px solid var(--border); background: var(--surface); }
.rsw {
  margin: 6px 10px 8px;
  border-radius: var(--r-md);
  background: linear-gradient(160deg, #1c0a18 0%, #2a0e28 100%);
  border: 1px solid rgba(255,62,127,.25);
  overflow: hidden; flex-shrink: 0;
}
.rsw-head {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; cursor: pointer; user-select: none;
}
.rsw-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--rose); flex-shrink: 0;
  animation: rsDot 1.4s ease-in-out infinite;
}
@keyframes rsDot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.3;transform:scale(.6)} }
.rsw-title { font-size: .7rem; font-weight: 800; color: #ffb0c8; letter-spacing: .04em; flex: 1; }
.rsw-arr { font-size: .62rem; color: var(--rose); transition: transform .25s; }
.rsw.rsc .rsw-arr { transform: rotate(180deg); }
.rsw.rsc .rsw-body { display: none; }
.rsw-rail-row { display: flex; align-items: center; gap: 3px; padding: 6px 8px 3px; }
.rsw-railbtn {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid rgba(255,62,127,.3);
  background: rgba(255,62,127,.1); color: #ffb0c8;
  font-size: .9rem; cursor: pointer; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0; padding: 0;
}
.rsw-railbtn:hover { background: rgba(255,62,127,.25); }
.rsw-rail { display: flex; gap: 5px; flex: 1; overflow: hidden; }
.rsw-logo {
  width: 38px; height: 38px; border-radius: 10px;
  border: 2px solid rgba(255,255,255,.08); background: #fff;
  flex-shrink: 0; cursor: pointer; overflow: hidden;
  transition: all .2s; display: flex; align-items: center;
  justify-content: center; font-size: 1.1rem; position: relative;
}
.rsw-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.rsw-logo.on { border-color: var(--rose); box-shadow: 0 0 10px rgba(255,62,127,.5); transform: scale(1.08); }
.rsw-logo::after {
  content: "▶"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.5); color: #fff; font-size: .85rem;
  border-radius: 8px; opacity: 0; transition: opacity .2s;
}
.rsw-logo.on::after { content: "⏸"; background: rgba(255,62,127,.7); }
.rsw-logo:hover::after { opacity: 1; }
.rsw-info { padding: 1px 10px 6px; text-align: center; }
.rsw-name { font-size: .75rem; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rsw-track { font-size: .6rem; color: #c0a0b0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }

/* ── Ana məzmun sahəsi ──────────────────────────────────────────────── */
.main-wrap {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  overflow-x: hidden;
}

/* Səhifə başlıqları */
.section-title {
  font-size: .95rem; font-weight: 800;
  color: var(--dark); margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ── Ümumi kart stilləri ────────────────────────────────────────────── */
.card {
  background: var(--grad-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

/* ── Düymələr ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 22px; border: none; border-radius: var(--r-full);
  font-size: .88rem; font-weight: 700; cursor: pointer;
  transition: all .2s; white-space: nowrap;
}
.btn-primary {
  background: var(--grad-main);
  color: #fff;
  box-shadow: var(--shadow-rose);
}
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-secondary {
  background: var(--surface2);
  color: var(--mid);
  border: 1px solid var(--border2);
}
.btn-secondary:hover { border-color: var(--rose); color: var(--rose); }

/* ── Avatar ─────────────────────────────────────────────────────────── */
.av {
  border-radius: 50%; overflow: hidden;
  background: var(--surface3); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--rose);
}
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Form elementləri ───────────────────────────────────────────────── */
input[type=text], input[type=email], input[type=password],
input[type=number], input[type=search], textarea, select {
  background: var(--surface2);
  border: 1.5px solid var(--border2);
  border-radius: var(--r-md);
  color: var(--dark);
  padding: 10px 14px;
  font-size: .88rem;
  outline: none;
  transition: border-color .18s;
  width: 100%;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(255,62,127,.1);
}
input::placeholder, textarea::placeholder { color: var(--muted); }

/* ── Modal ──────────────────────────────────────────────────────────── */
.modal-bg {
  position: fixed; inset: 0; z-index: 5000;
  background: rgba(0,0,0,.7);
  display: none; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-bg.open { display: flex; }
.modal-box {
  background: var(--grad-card);
  border: 1px solid var(--border2);
  border-radius: var(--r-xl);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  width: 440px; max-width: 94vw;
  animation: modalIn .25s ease;
}
@keyframes modalIn { from{transform:scale(.92);opacity:0} to{transform:scale(1);opacity:1} }

/* ── Badge & Tag-lər ────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: var(--r-full);
  font-size: .65rem; font-weight: 700;
}
.badge-rose   { background: var(--rose-pale);   color: var(--rose);   border: 1px solid rgba(255,62,127,.25); }
.badge-purple { background: var(--purple-pale);  color: var(--purple); border: 1px solid rgba(155,89,245,.25); }
.badge-gold   { background: var(--gold-pale);    color: var(--gold);   border: 1px solid rgba(255,204,68,.25); }
.badge-green  { background: var(--green-pale);   color: var(--green);  border: 1px solid rgba(46,204,113,.25); }

/* ── Canlı nöqtə ────────────────────────────────────────────────────── */
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--rose); display: inline-block;
  animation: livePulse 1.4s ease-in-out infinite;
}
@keyframes livePulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.3;transform:scale(.6)} }

/* ── Profil kartı ───────────────────────────────────────────────────── */
.pcard {
  background: var(--grad-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden; position: relative;
  transition: transform .2s, border-color .2s;
}
.pcard:hover { transform: translateY(-3px); border-color: var(--rose); box-shadow: var(--shadow-rose); }
.pcard-img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.pcard-body { padding: 12px; }
.pcard-name { font-size: .9rem; font-weight: 800; color: var(--dark); }
.pcard-meta { font-size: .74rem; color: var(--muted); margin-top: 3px; }

/* ── Feat kart (dashboard için) ─────────────────────────────────────── */
.feat-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px; margin-bottom: 22px;
}
.feat-card {
  background: var(--grad-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px; position: relative; overflow: hidden;
  text-decoration: none; color: var(--dark);
  transition: transform .2s, box-shadow .2s;
  display: block;
}
.feat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--rose); }
.feat-card-bg { position: absolute; right: -12px; top: -12px; font-size: 4rem; opacity: .08; pointer-events: none; }
.feat-card-icon { font-size: 2rem; margin-bottom: 10px; }
.feat-card-title { font-size: .92rem; font-weight: 800; color: var(--dark); margin-bottom: 4px; }
.feat-card-desc { font-size: .74rem; color: var(--muted); line-height: 1.5; }

/* ── Responsive (Mobil) ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    position: fixed; left: -280px; top: 0;
    height: 100vh; width: 260px; z-index: 1050;
    transition: left .28s ease;
    box-shadow: 4px 0 32px rgba(0,0,0,.5);
  }
  .sidebar.mob-open { left: 0; }
  .sb-close { display: flex !important; }
  .feat-cards { grid-template-columns: 1fr; }
}

/* ── Topbar (ticker) ────────────────────────────────────────────────── */
.topbar {
  background: linear-gradient(90deg, #1a0030, #0e0818, #1a0030);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 500;
}

/* ── Profil səhifəsi ────────────────────────────────────────────────── */
.prof-hero {
  background: linear-gradient(180deg, #1e0838 0%, #130d20 60%, var(--bg) 100%);
  padding: 32px 28px 24px;
}
.prof-stats { display: flex; gap: 24px; }
.prof-stat { text-align: center; }
.prof-stat-val { font-size: 1.3rem; font-weight: 900; color: var(--dark); }
.prof-stat-lbl { font-size: .72rem; color: var(--muted); margin-top: 2px; }

/* ── Mesaj söhbəti ──────────────────────────────────────────────────── */
.bbl-them {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--dark);
  border-radius: 18px 18px 18px 4px;
}
.bbl-mine {
  background: var(--grad-main);
  color: #fff;
  border-radius: 18px 18px 4px 18px;
  box-shadow: 0 2px 12px rgba(255,62,127,.3);
}

/* ── Scroll-bar ─────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── Yüklənmə animasiyası ───────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--surface2) 25%, var(--surface3) 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
@keyframes fpSpin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}
