/* ============================================================
   assets/css/style.css  –  bilmesinler.az
   Dark Romantic / Neon Pink theme
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Playfair+Display:ital,wght@0,700;1,500&display=swap');

/* ── CSS Dəyişənləri ──────────────────────────────────────── */
:root {
  --primary:   #e91e8c;
  --primary2:  #ff6b6b;
  --accent:    #ffd700;
  --bg:        #0a0a0f;
  --card:      #1a1a2e;
  --card2:     #16213e;
  --border:    rgba(233,30,140,.25);
  --text:      #f0f0f5;
  --muted:     #8888aa;
  --online:    #00e676;
  --danger:    #ff1744;
  --radius:    14px;
  --radius-sm: 8px;
  --shadow:    0 8px 32px rgba(233,30,140,.18);
  --font:      'Nunito', sans-serif;
  --font-disp: 'Playfair Display', serif;
  --transition: .22s cubic-bezier(.4,0,.2,1);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 0%,   rgba(233,30,140,.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 100%,  rgba(255,107,107,.06) 0%, transparent 60%);
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary2); }

img { max-width: 100%; display: block; }

input, textarea, select, button { font-family: inherit; }

/* ── Kaydırma çubuğu ──────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--card); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 99px; }

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 900;
  background: rgba(10,10,15,.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: .75rem 1.5rem; gap: 1rem;
}

.navbar-brand {
  font-family: var(--font-disp);
  font-size: 1.5rem;
  font-style: italic;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.navbar-links {
  display: flex; gap: .25rem; flex: 1;
  list-style: none; align-items: center;
}

.navbar-links a {
  color: var(--muted);
  font-weight: 600; font-size: .875rem;
  padding: .5rem .9rem;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: .4rem;
  transition: all var(--transition);
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--text);
  background: rgba(233,30,140,.15);
}

.navbar-right {
  display: flex; align-items: center; gap: .75rem; margin-left: auto;
}

.nav-avatar {
  width: 38px; height: 38px;
  border-radius: 50%; object-fit: cover;
  border: 2px solid var(--primary);
  cursor: pointer;
  transition: border-color var(--transition);
}
.nav-avatar:hover { border-color: var(--accent); }

.nav-balance {
  background: rgba(233,30,140,.12);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .3rem .9rem;
  font-size: .8rem; font-weight: 700;
  color: var(--accent);
  display: flex; align-items: center; gap: .3rem;
}

/* ── Container ────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.container-sm { max-width: 480px; margin: 0 auto; padding: 0 1.25rem; }

/* ── Card ──────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.card:hover { border-color: rgba(233,30,140,.5); box-shadow: var(--shadow); }

.card-glass {
  background: rgba(26,26,46,.65);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(233,30,140,.2);
  border-radius: var(--radius);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .625rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 700; font-size: .875rem;
  border: none; cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color: #fff;
  box-shadow: 0 4px 18px rgba(233,30,140,.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(233,30,140,.5); }
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: rgba(233,30,140,.1); }

.btn-ghost {
  background: rgba(255,255,255,.05);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.08);
}
.btn-ghost:hover { background: rgba(255,255,255,.1); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #d50000; }

.btn-gold {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #1a1a00; font-weight: 900;
}

.btn-sm { padding: .4rem .85rem; font-size: .8rem; }
.btn-lg { padding: .85rem 2rem; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

/* ── Form elemanları ───────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-size: .82rem; font-weight: 700; color: var(--muted); margin-bottom: .4rem; text-transform: uppercase; letter-spacing: .04em; }

.form-control {
  width: 100%;
  background: rgba(255,255,255,.05);
  border: 1.5px solid rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  padding: .7rem 1rem;
  color: var(--text);
  font-size: .92rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(233,30,140,.15);
}
.form-control::placeholder { color: var(--muted); }

select.form-control option { background: var(--card2); }

.form-hint { font-size: .76rem; color: var(--muted); margin-top: .3rem; }
.form-error { font-size: .78rem; color: var(--danger); margin-top: .3rem; display: none; }
.form-error.show { display: block; }

/* ── Badge ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .22rem .6rem;
  border-radius: 999px;
  font-size: .72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .04em;
}
.badge-primary { background: rgba(233,30,140,.2); color: var(--primary); border: 1px solid rgba(233,30,140,.3); }
.badge-gold    { background: rgba(255,215,0,.15);  color: var(--accent);  border: 1px solid rgba(255,215,0,.3); }
.badge-online  { background: rgba(0,230,118,.15);  color: var(--online);  border: 1px solid rgba(0,230,118,.3); }
.badge-danger  { background: rgba(255,23,68,.15);  color: var(--danger);  border: 1px solid rgba(255,23,68,.3); }

/* ── Online nöqtəsi ────────────────────────────────────────── */
.online-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--online);
  box-shadow: 0 0 0 3px rgba(0,230,118,.25);
  display: inline-block;
  animation: pulse-online 2s ease infinite;
}
@keyframes pulse-online { 0%,100%{opacity:1}50%{opacity:.6} }

/* ── Avatar ────────────────────────────────────────────────── */
.avatar {
  border-radius: 50%; object-fit: cover;
  border: 2.5px solid var(--border);
}
.avatar-sm  { width: 36px;  height: 36px; }
.avatar-md  { width: 56px;  height: 56px; }
.avatar-lg  { width: 90px;  height: 90px; }
.avatar-xl  { width: 130px; height: 130px; border-width: 3px; border-color: var(--primary); }

/* ── Profil kart (axtarış/match) ───────────────────────────── */
.profile-card {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
  aspect-ratio: 3/4;
  background: var(--card2);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}
.profile-card:hover { transform: translateY(-6px) scale(1.02); box-shadow: 0 20px 48px rgba(233,30,140,.2); }
.profile-card img { width: 100%; height: 100%; object-fit: cover; }
.profile-card-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(10,10,15,.95) 0%, transparent 100%);
  padding: 3rem 1rem 1rem;
}
.profile-card-name { font-size: 1.1rem; font-weight: 800; }
.profile-card-meta { font-size: .8rem; color: var(--muted); }

.action-btns {
  position: absolute; bottom: 1rem; right: 1rem;
  display: flex; gap: .5rem;
}

.btn-like, .btn-skip {
  width: 46px; height: 46px; border-radius: 50%;
  border: none; cursor: pointer; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--transition), box-shadow var(--transition);
}
.btn-like { background: rgba(233,30,140,.9); color: #fff; box-shadow: 0 4px 16px rgba(233,30,140,.4); }
.btn-skip { background: rgba(255,255,255,.1); color: var(--muted); }
.btn-like:hover { transform: scale(1.15); box-shadow: 0 6px 20px rgba(233,30,140,.6); }
.btn-skip:hover { transform: scale(1.1); background: rgba(255,255,255,.15); }

/* ── Grid layoutlar ────────────────────────────────────────── */
.grid-profiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 1.25rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }

/* ── Auth sayfaları ────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(ellipse 70% 70% at 0% 0%,   rgba(233,30,140,.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 100% 100%, rgba(255,107,107,.08) 0%, transparent 60%),
    var(--bg);
}

.auth-card {
  width: 100%; max-width: 440px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.5);
  padding: 2.5rem;
  box-shadow: 0 24px 64px rgba(0,0,0,.4);
  animation: fadeSlideUp .45s ease;
}

.auth-logo {
  text-align: center; margin-bottom: 1.75rem;
}
.auth-logo-icon { font-size: 3rem; line-height: 1; }
.auth-logo-name {
  font-family: var(--font-disp);
  font-size: 1.8rem; font-style: italic;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.auth-logo-sub { font-size: .78rem; color: var(--muted); margin-top: .15rem; letter-spacing: .06em; text-transform: uppercase; }

.auth-divider {
  display: flex; align-items: center; gap: .75rem;
  margin: 1.5rem 0; color: var(--muted); font-size: .8rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── Mesaj / Alert ─────────────────────────────────────────── */
.alert {
  border-radius: var(--radius-sm);
  padding: .85rem 1.1rem;
  font-size: .87rem; font-weight: 600;
  margin-bottom: 1rem;
  display: flex; align-items: flex-start; gap: .5rem;
  animation: fadeSlideUp .25s ease;
}
.alert-error   { background: rgba(255,23,68,.1);   border: 1px solid rgba(255,23,68,.3);   color: #ff6b6b; }
.alert-success { background: rgba(0,230,118,.1);   border: 1px solid rgba(0,230,118,.3);  color: #69f0ae; }
.alert-info    { background: rgba(33,150,243,.1);  border: 1px solid rgba(33,150,243,.3); color: #64b5f6; }
.alert-warn    { background: rgba(255,193,7,.1);   border: 1px solid rgba(255,193,7,.3);  color: #ffd54f; }

/* ── Hədiyyə animasiyası ───────────────────────────────────── */
.gift-fly {
  position: fixed;
  font-size: 2.5rem;
  pointer-events: none;
  z-index: 9999;
  animation: giftFly 1.2s ease forwards;
}
@keyframes giftFly {
  0%   { transform: scale(.2) translateY(50px); opacity: 0; }
  40%  { transform: scale(1.3) translateY(-30px); opacity: 1; }
  70%  { transform: scale(1) translateY(-60px); opacity: 1; }
  100% { transform: scale(.5) translateY(-120px); opacity: 0; }
}

/* ── Animasyonlar ──────────────────────────────────────────── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.fade-in  { animation: fadeIn .3s ease; }
.slide-up { animation: fadeSlideUp .4s ease; }

/* ── Loader ────────────────────────────────────────────────── */
.spinner {
  width: 22px; height: 22px;
  border: 2.5px solid rgba(233,30,140,.25);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  display: inline-block;
}

/* ── Toast bildirim ────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  z-index: 9999; display: flex; flex-direction: column; gap: .5rem;
}
.toast {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .85rem 1.2rem;
  min-width: 240px; max-width: 340px;
  font-size: .87rem; font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  animation: fadeSlideUp .3s ease;
  display: flex; align-items: center; gap: .6rem;
  cursor: pointer;
}
.toast.removing { animation: fadeOut .3s ease forwards; }
@keyframes fadeOut { to { opacity:0; transform:translateX(30px); } }

/* ── Stat kartları (admin/dashboard) ───────────────────────── */
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: .5rem;
  position: relative; overflow: hidden;
}
.stat-card::after {
  content: attr(data-icon);
  position: absolute; right: 1rem; top: 50%;
  transform: translateY(-50%);
  font-size: 3rem; opacity: .08;
}
.stat-label { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.stat-value { font-size: 2rem; font-weight: 900; line-height: 1; }
.stat-delta { font-size: .78rem; color: var(--online); font-weight: 600; }
.stat-delta.neg { color: var(--danger); }

/* ── Tablo ─────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: .87rem; }
thead th { background: var(--card2); padding: .85rem 1rem; text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
tbody tr { border-top: 1px solid var(--border); transition: background var(--transition); }
tbody tr:hover { background: rgba(233,30,140,.05); }
tbody td { padding: .85rem 1rem; }

/* ── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  animation: fadeIn .2s ease;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.3);
  padding: 2rem;
  width: 100%; max-width: 500px;
  max-height: 90vh; overflow-y: auto;
  animation: fadeSlideUp .3s ease;
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.modal-title  { font-size: 1.15rem; font-weight: 800; }
.modal-close  { background: none; border: none; color: var(--muted); font-size: 1.4rem; cursor: pointer; padding: .2rem; line-height: 1; }
.modal-close:hover { color: var(--text); }

/* ── Tab ───────────────────────────────────────────────────── */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.tab-btn {
  padding: .65rem 1.1rem; font-weight: 700; font-size: .875rem;
  background: none; border: none; cursor: pointer; color: var(--muted);
  border-bottom: 2.5px solid transparent; margin-bottom: -1px;
  transition: all var(--transition);
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Chat arayüzü ──────────────────────────────────────────── */
.chat-layout { display: flex; height: calc(100vh - 62px); overflow: hidden; }

.chat-sidebar {
  width: 300px; flex-shrink: 0;
  background: var(--card2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.chat-sidebar-header { padding: 1rem; border-bottom: 1px solid var(--border); }
.chat-list { flex: 1; overflow-y: auto; }
.chat-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem 1rem;
  cursor: pointer; border-bottom: 1px solid rgba(255,255,255,.04);
  transition: background var(--transition);
  position: relative;
}
.chat-item:hover, .chat-item.active { background: rgba(233,30,140,.08); }
.chat-item-info { flex: 1; min-width: 0; }
.chat-item-name { font-weight: 700; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item-last { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-unread {
  background: var(--primary); color: #fff;
  border-radius: 999px; font-size: .7rem; font-weight: 800;
  min-width: 18px; height: 18px; display: flex; align-items: center; justify-content: center;
  padding: 0 .35rem;
}

.chat-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.chat-header { padding: .85rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .75rem; }
.chat-messages { flex: 1; overflow-y: auto; padding: 1.25rem; display: flex; flex-direction: column; gap: .5rem; }

.msg { display: flex; gap: .6rem; max-width: 70%; animation: fadeSlideUp .2s ease; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg-bubble {
  background: var(--card2);
  border-radius: 14px 14px 14px 4px;
  padding: .6rem .95rem;
  font-size: .9rem; line-height: 1.5;
  border: 1px solid var(--border);
  word-break: break-word;
}
.msg.mine .msg-bubble {
  background: linear-gradient(135deg, rgba(233,30,140,.35), rgba(255,107,107,.25));
  border-color: rgba(233,30,140,.3);
  border-radius: 14px 14px 4px 14px;
}
.msg-time { font-size: .68rem; color: var(--muted); align-self: flex-end; padding-bottom: .1rem; }

.chat-input-area {
  padding: .85rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex; gap: .6rem; align-items: flex-end;
}
.chat-input {
  flex: 1;
  background: rgba(255,255,255,.05);
  border: 1.5px solid rgba(255,255,255,.1);
  border-radius: 22px;
  padding: .65rem 1.1rem;
  color: var(--text); font-size: .9rem;
  outline: none; resize: none;
  max-height: 100px; min-height: 42px;
  transition: border-color var(--transition);
}
.chat-input:focus { border-color: var(--primary); }

.typing-indicator {
  font-size: .78rem; color: var(--muted);
  padding: .25rem 1.25rem;
  font-style: italic;
}

/* ── Sayfa başlığı ─────────────────────────────────────────── */
.page-header { padding: 2rem 0 1rem; }
.page-title  { font-size: 1.6rem; font-weight: 900; }
.page-sub    { color: var(--muted); font-size: .9rem; margin-top: .25rem; }

/* ── Mobil ─────────────────────────────────────────────────── */
.hamburger { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }
#nav-menu-mobile { display: none; }

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .navbar-links { display: none; }
  .grid-profiles { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .chat-sidebar { position: absolute; left: -300px; z-index: 50; height: 100%; transition: left var(--transition); }
  .chat-sidebar.open { left: 0; }
  .auth-card { padding: 1.75rem 1.25rem; }
  .stat-value { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .grid-profiles { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* ── Boost aura ────────────────────────────────────────────── */
.boosted-aura { box-shadow: 0 0 0 3px var(--accent), 0 0 20px rgba(255,215,0,.3); }

/* ── Premium rozet ─────────────────────────────────────────── */
.premium-star::after { content: ' ⭐'; }

/* ── Boş durum ─────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 4rem 2rem;
  color: var(--muted);
}
.empty-state-icon { font-size: 4rem; margin-bottom: 1rem; opacity: .5; }
.empty-state-title { font-size: 1.15rem; font-weight: 700; color: var(--text); margin-bottom: .5rem; }
