/* Kirk Img — app styles. Dark Kirk-red theme, self-contained (no shared theme). */
:root {
  --bg: #0b0c10;
  --panel: #13151b;
  --panel-2: #191c23;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, .62);
  --muted-2: rgba(255, 255, 255, .4);
  --red: #e5383b;
  --red-hi: #ef4a4d;
  --red-soft: rgba(229, 56, 59, .16);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; background: var(--bg); scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background: radial-gradient(820px 480px at 50% -12%, var(--red-soft), transparent 70%), var(--bg);
  color: var(--text);
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { -webkit-user-drag: none; }

/* ── Header ───────────────────────────────────────────────────────────── */
header.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 14px 20px;
  background: rgba(11, 12, 16, .78);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.02em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand span b { color: var(--red); }
.nav .links { display: flex; gap: 6px; margin-left: 8px; }
.nav .links a {
  padding: 7px 12px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--muted);
  transition: background .15s, color .15s;
}
.nav .links a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav .links a.active { background: var(--red-soft); color: #ffb3b3; }
.nav .spacer { flex: 1; }
#accountBtn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px;
  border-radius: 980px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .05);
  color: #fff; font: 600 13.5px "Figtree", system-ui, sans-serif; cursor: pointer;
  transition: background .15s;
}
#accountBtn:hover { background: rgba(255, 255, 255, .12); }
#accountBtn img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(229, 56, 59, .7); }

/* ── Layout ───────────────────────────────────────────────────────────── */
main { max-width: 1040px; margin: 0 auto; padding: 28px 20px 80px; }
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: 30px; font-weight: 600; letter-spacing: -.03em; }
.page-head p { color: var(--muted); margin-top: 8px; font-size: 15px; }
.hidden { display: none !important; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 11px; border: 0; cursor: pointer;
  background: var(--red); color: #fff; font: 600 15px "Figtree", system-ui, sans-serif;
  transition: background .15s, opacity .15s;
}
.btn:hover { background: var(--red-hi); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2); }
.btn.ghost:hover { background: rgba(255, 255, 255, .12); }
.btn.small { height: 34px; padding: 0 14px; font-size: 13px; border-radius: 9px; }

/* ── Uploader ─────────────────────────────────────────────────────────── */
.uploader {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  padding: 22px; box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
}
.dropzone {
  border: 2px dashed var(--line-2); border-radius: 14px; padding: 34px 20px; text-align: center;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.drag { border-color: rgba(229, 56, 59, .7); background: rgba(229, 56, 59, .06); }
.dropzone .big { font-size: 16px; font-weight: 600; }
.dropzone .sub { color: var(--muted-2); font-size: 13px; margin-top: 6px; }
.preview-wrap { display: flex; gap: 18px; margin-top: 4px; }
.preview-wrap .thumb {
  flex: 0 0 180px; height: 180px; border-radius: 12px; overflow: hidden; background: var(--panel-2);
  border: 1px solid var(--line); display: grid; place-items: center;
}
.preview-wrap .thumb img { max-width: 100%; max-height: 100%; }
.fields { flex: 1; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
label.fld { font-size: 13px; font-weight: 500; color: var(--muted); display: block; margin-bottom: 6px; }
input[type=text], textarea {
  width: 100%; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px;
  color: #fff; padding: 11px 13px; font: 400 15px "Figtree", system-ui, sans-serif; outline: none;
  transition: border-color .15s, box-shadow .15s; resize: vertical;
}
input[type=text]:focus, textarea:focus { border-color: rgba(229, 56, 59, .7); box-shadow: 0 0 0 3px rgba(229, 56, 59, .18); }
.count { font-size: 12px; color: var(--muted-2); text-align: right; margin-top: 4px; }
.upload-actions { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.err { color: #ff8a80; font-size: 13.5px; }
.ok { color: #7be3a0; font-size: 13.5px; }

/* share result */
.share { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); display: none; }
.share.show { display: block; }
.share .row { display: flex; gap: 8px; }
.share input { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 13px; }

/* ── Image grid (feed / wall / mine) ──────────────────────────────────── */
.grid { columns: 3 280px; column-gap: 16px; }
.card {
  position: relative; break-inside: avoid; margin-bottom: 16px; border-radius: 14px; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); display: block;
  transition: transform .15s, border-color .15s;
}
.card:hover { transform: translateY(-2px); border-color: rgba(229, 56, 59, .5); }
.card img { display: block; width: 100%; height: auto; background: var(--panel-2); }
.card .meta { padding: 11px 13px; }
.card .meta .t { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .meta .by { display: flex; align-items: center; gap: 7px; margin-top: 7px; font-size: 12.5px; color: var(--muted); }
.card .meta .by img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }
.card .del {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 8px; border: 0;
  background: rgba(10, 11, 15, .72); color: #ff8a80; cursor: pointer; font-size: 15px; line-height: 1;
  display: none; align-items: center; justify-content: center; backdrop-filter: blur(4px);
}
.card:hover .del { display: flex; }
.card .del:hover { background: rgba(229, 56, 59, .9); color: #fff; }

/* ── Wall header ──────────────────────────────────────────────────────── */
.wall-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.wall-head img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(229, 56, 59, .6); background: var(--panel); }
.wall-head h1 { font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.wall-head p { color: var(--muted); font-size: 14px; margin-top: 2px; }

/* ── States ───────────────────────────────────────────────────────────── */
.empty, .signin-cta {
  text-align: center; padding: 60px 20px; color: var(--muted);
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
}
.empty h3, .signin-cta h3 { color: #fff; font-size: 19px; margin-bottom: 8px; }
.signin-cta .btn { margin-top: 18px; }
.sentinel { height: 40px; }
.loading { text-align: center; color: var(--muted-2); padding: 20px; font-size: 14px; }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(5, 6, 9, .9); display: none;
  align-items: center; justify-content: center; padding: 30px; cursor: zoom-out;
}
.lightbox.show { display: flex; }
.lightbox img { max-width: 94vw; max-height: 90vh; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .7); }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: #13151b; border: 1px solid var(--line-2); color: #fff; padding: 11px 18px; border-radius: 11px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 200;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 640px) {
  .preview-wrap { flex-direction: column; }
  .preview-wrap .thumb { flex: none; width: 100%; height: 220px; }
  .nav .links a { padding: 7px 9px; }
  .page-head h1 { font-size: 24px; }
}
