/* ============================================================
   RAAZ — design system
   Midnight purple + neon pink. Mobile-first.
   ============================================================ */
:root {
  --bg: #0d0918;
  --bg2: #151026;
  --card: #1b1430;
  --card2: #221a3d;
  --line: #2c2350;
  --text: #f2ecff;
  --muted: #a79ec7;
  --pink: #ff4d8d;
  --orange: #ff9a3d;
  --teal: #3ddad7;
  --green: #4ade80;
  --red: #ff5d5d;
  --grad: linear-gradient(135deg, var(--pink), var(--orange));
  --radius: 18px;
  --shadow: 0 10px 40px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  min-height: 100vh;
  line-height: 1.6;
}

.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 400px at 15% -5%, rgba(255, 77, 141, .16), transparent 60%),
    radial-gradient(700px 500px at 90% 10%, rgba(120, 80, 255, .14), transparent 60%),
    radial-gradient(500px 500px at 50% 110%, rgba(255, 154, 61, .08), transparent 60%);
}

.wrap { max-width: 720px; margin: 0 auto; padding: 0 18px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(13, 9, 24, .75);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo-emoji { font-size: 26px; }
.logo-text { font-weight: 800; font-size: 22px; letter-spacing: .5px; }
.logo-urdu { font-family: "Noto Nastaliq Urdu", serif; font-size: 18px; color: var(--pink); }
.admin-badge { font-size: 11px; background: var(--grad); padding: 3px 10px; border-radius: 99px; letter-spacing: 1px; }

/* ---------- buttons ---------- */
.btn {
  border: 0; cursor: pointer; font-family: inherit; font-weight: 700;
  padding: 11px 22px; border-radius: 99px; font-size: 15px;
  transition: transform .15s, box-shadow .15s, opacity .15s;
  color: #fff; text-decoration: none; display: inline-block;
}
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--grad); box-shadow: 0 6px 24px rgba(255, 77, 141, .35); }
.btn-primary:hover { box-shadow: 0 8px 30px rgba(255, 77, 141, .5); }
.btn-lg { padding: 15px 34px; font-size: 17px; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--pink); }
.btn-block { width: 100%; margin-top: 10px; }
.btn-danger { background: var(--red); }
.btn-small { padding: 7px 14px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 52px 0 30px; }
.hero h1 { font-size: clamp(32px, 7vw, 52px); font-weight: 800; line-height: 1.15; margin-bottom: 12px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); max-width: 480px; margin: 0 auto 24px; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 10px; margin: 8px 0 18px; overflow-x: auto; padding-bottom: 4px; }
.tab {
  background: var(--card); border: 1px solid var(--line); color: var(--muted);
  padding: 9px 18px; border-radius: 99px; font-family: inherit; font-weight: 600;
  font-size: 14px; cursor: pointer; white-space: nowrap;
}
.tab.active { background: var(--grad); color: #fff; border-color: transparent; }

/* ---------- feed cards ---------- */
.feed { display: flex; flex-direction: column; gap: 14px; padding-bottom: 30px; }
.card {
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
  animation: rise .35s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.alias { font-weight: 700; font-size: 14px; color: var(--teal); }
.time { font-size: 12px; color: var(--muted); }
.card-text { font-size: 17px; white-space: pre-wrap; word-wrap: break-word; margin-bottom: 14px; }
.card-actions { display: flex; gap: 8px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
  color: var(--text); border-radius: 99px; padding: 7px 14px;
  font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.pill:hover { border-color: var(--pink); }
.pill.liked { background: rgba(255, 77, 141, .15); border-color: var(--pink); color: var(--pink); }
.pill.reported { opacity: .45; pointer-events: none; }
.pill.spacer { margin-left: auto; }

.status-chip { font-size: 11px; font-weight: 800; letter-spacing: 1px; padding: 4px 12px; border-radius: 99px; text-transform: uppercase; }
.st-pending { background: rgba(255,154,61,.15); color: var(--orange); }
.st-flagged { background: rgba(255,93,93,.15); color: var(--red); }
.st-approved { background: rgba(74,222,128,.15); color: var(--green); }

/* ---------- modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(5, 3, 12, .7); backdrop-filter: blur(6px); padding: 0;
}
.modal-card {
  background: var(--bg2); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 24px 24px 0 0; padding: 24px; width: 100%; max-width: 560px;
  animation: slideup .25s ease both; max-height: 92vh; overflow-y: auto;
}
@keyframes slideup { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 640px) { .modal { align-items: center; padding: 20px; } .modal-card { border-radius: 24px; border-bottom: 1px solid var(--line); } }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.modal-head h2 { font-size: 22px; }
textarea, input[type="text"], input[type="email"], input[type="password"] {
  width: 100%; background: var(--card); border: 1px solid var(--line); color: var(--text);
  border-radius: 14px; padding: 14px; font-family: inherit; font-size: 16px; resize: vertical;
}
textarea:focus, input:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255,77,141,.15); }
.modal-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; min-height: 22px; }
.warn { color: var(--red); font-size: 13px; font-weight: 600; }

/* ---------- misc ---------- */
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.notice { background: rgba(255,154,61,.1); border: 1px solid var(--orange); border-radius: 14px; padding: 14px 16px; margin-bottom: 18px; font-size: 14px; }
.notice code { background: rgba(0,0,0,.3); padding: 2px 6px; border-radius: 6px; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty-emoji { font-size: 48px; margin-bottom: 10px; }
.loading { text-align: center; color: var(--muted); padding: 30px; }
#loadMore { display: block; margin: 0 auto 40px; }

.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--card2); border: 1px solid var(--pink); color: var(--text);
  padding: 13px 22px; border-radius: 99px; font-weight: 600; font-size: 14px;
  z-index: 200; box-shadow: var(--shadow); max-width: 90vw; text-align: center;
  animation: rise .25s ease both;
}

.footer { border-top: 1px solid var(--line); padding: 26px 0 40px; margin-top: 20px; font-size: 14px; }
.footer a { color: var(--pink); }

/* ---------- admin ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 24px 0; }
.panel h1, .panel h2 { margin-bottom: 8px; }
.field { display: block; margin: 14px 0; }
.field span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.row { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin: 24px 0 6px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-align: center; }
.stat b { font-size: 26px; display: block; }
.stat span { font-size: 12px; color: var(--muted); }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { background: rgba(255,93,93,.12); border: 1px solid var(--red); color: var(--text); border-radius: 99px; padding: 6px 8px 6px 14px; font-size: 13px; display: inline-flex; gap: 8px; align-items: center; }
.chip button { background: none; border: 0; color: var(--red); cursor: pointer; font-size: 14px; }
.list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.list-item { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; word-break: break-all; }
