:root {
  --bg: #14070b;
  --card: #2a1219;
  --card-2: #3a1822;
  --line: rgba(255, 70, 90, 0.22);
  --red: #e10613;
  --red-2: #ff3b4e;
  --gold: #e8b84a;
  --text: #f8eef0;
  --muted: #c9a8b0;
  --green: #3dde6a;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 16px/1.45 "Segoe UI", sans-serif;
  background:
    radial-gradient(900px 420px at 0% 0%, rgba(180, 16, 36, 0.45), transparent 55%),
    radial-gradient(700px 380px at 100% 8%, rgba(120, 12, 28, 0.4), transparent 50%),
    linear-gradient(165deg, #2a0c14 0%, #0c0406 42%, #1a070c 100%);
}
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; }

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding: 14px 22px;
  background: linear-gradient(#1a0a0e, #12080b);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 22px; }
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Georgia, "Palatino Linotype", serif;
  font-style: italic;
  font-size: 36px;
  letter-spacing: 0.02em;
  color: #fff;
  text-decoration: none;
  text-shadow: 0 0 18px rgba(225, 6, 19, 0.55);
}
.mark {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 26px;
  color: #fff;
  background: radial-gradient(circle at 32% 28%, #ff6a76, #e10613 46%, #5c0410 78%);
  box-shadow: 0 0 0 2px #e8b84a, 0 8px 22px rgba(225, 6, 19, 0.55);
}
.top nav { display: flex; gap: 8px; }
.top nav a {
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 999px;
  background: #2c141b;
  border: 1px solid var(--line);
  font-weight: 700;
}
.top nav a:hover { background: var(--red); border-color: transparent; }

.stage {
  width: min(1280px, calc(100% - 28px));
  margin: 18px auto 40px;
  display: grid;
  grid-template-columns: 430px 1fr;
  gap: 18px;
  align-items: start;
}
.chat {
  position: sticky;
  top: 78px;
  background:
    radial-gradient(420px 180px at 50% 0%, rgba(225, 6, 19, 0.18), transparent 70%),
    linear-gradient(180deg, #1b0c10, #090406 70%);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 16px;
  min-height: 520px;
  display: flex;
  flex-direction: column;
}
.ribbons { display: flex; gap: 8px; margin-bottom: 12px; }
.ribbon {
  border: 0;
  cursor: pointer;
  background: var(--red);
  color: white;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
}
.ribbon.gold { background: linear-gradient(#f0cb6a, #c48922); color: #2a1608; }
.who { display: flex; gap: 12px; align-items: center; }
.who img {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  background: #000;
  border: 3px solid var(--red);
}
.kicker { color: var(--muted); }
.online { color: var(--green); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.online i, .meta i {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 8px var(--green); display: inline-block;
}
.log {
  flex: 1;
  margin: 14px 0;
  min-height: 220px;
  max-height: 340px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}
.bubble {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 14px;
  background: #2a141b;
  border: 1px solid rgba(255,255,255,0.04);
}
.bubble.mine { margin-left: auto; background: #5c1220; }
.read {
  align-self: flex-start;
  border: 0;
  cursor: pointer;
  color: white;
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 16px;
  background: linear-gradient(#ff3148, #b10512);
  box-shadow: 0 8px 18px rgba(225, 6, 19, 0.35);
}
.bubble.typing { display: flex; gap: 5px; width: 64px; }
.bubble.typing i {
  width: 7px; height: 7px; border-radius: 50%; background: #f1c3cb;
  animation: blink 1s infinite;
}
.bubble.typing i:nth-child(2) { animation-delay: .15s; }
.bubble.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .25; transform: translateY(2px); } }
#composer label { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.row { display: flex; gap: 8px; }
#msg {
  flex: 1;
  background: #12080b;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
#composer button, .go, .admin button {
  border: 0;
  border-radius: 10px;
  background: var(--red);
  color: white;
  font-weight: 700;
  padding: 10px 14px;
  cursor: pointer;
}
#composer button {
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
}
#composer button svg { width: 22px; height: 22px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
}
.card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
}
.card.hot { outline: 2px solid var(--gold); animation: rise .45s ease; }
@keyframes rise { from { transform: translateY(10px); } }
.card { cursor: pointer; }
.photo, .meta {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.photo { background: #000; }
.photo img { width: 100%; aspect-ratio: 3/4; object-fit: cover; object-position: center; display: block; background: #000; }
.locks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px; }
.lock {
  aspect-ratio: 1;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  background:
    linear-gradient(#1a1a1a, #050505);
  position: relative;
}
.lock::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 16px;
  height: 12px;
  transform: translate(-50%, -20%);
  border: 2px solid #f2f2f2;
  border-radius: 3px;
}
.lock::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 28%;
  width: 10px;
  height: 8px;
  transform: translateX(-50%);
  border: 2px solid #f2f2f2;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}
.meta {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px 10px;
}
.name { font-weight: 700; font-size: 14px; }
.writes {
  margin-left: auto;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: .02em;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0,0,0,.72);
  display: grid;
  place-items: center;
  padding: 18px;
}
.modal[hidden] { display: none; }
.sheet {
  width: min(440px, 100%);
  max-height: calc(100vh - 28px);
  overflow: auto;
  background: linear-gradient(180deg, #3a1520, #1a0b10);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 16px 16px;
  position: relative;
  box-shadow: var(--shadow);
}
.modal-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.modal-head img {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover; object-position: center;
  background: #000; border: 3px solid var(--red); flex: none;
}
.modal-head h2 { margin: 0 0 8px; }
.modal-head .go { width: auto; font-size: 16px; }
.extra {
  display: block; width: 100%; border: 0; padding: 0; cursor: pointer;
  background: #000; border-radius: 14px; overflow: hidden;
}
.switcher { display: grid; grid-template-columns: 42px 1fr 42px; gap: 8px; align-items: center; margin-top: 10px; }
.switcher > button:not(.extra) {
  height: 64px; border: 0; border-radius: 12px; cursor: pointer;
  background: #3a1822; color: white; font-size: 28px;
}
.extra { display: block; width: 100%; margin-top: 10px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.extra img { width: 100%; height: 280px; object-fit: cover; object-position: center; display: block; background: #000; border-radius: 12px; }
.shot-count { margin: 8px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.modal-locks { margin-top: 4px; }
.go { width: 100%; font-size: 18px; padding: 12px; }
.close {
  position: absolute; top: 8px; right: 10px;
  border: 0; background: transparent; color: white; font-size: 28px; cursor: pointer;
}
footer { text-align: center; color: var(--muted); padding: 10px 0 28px; font-size: 13px; }

.admin { display: grid; place-items: start center; padding: 28px 12px 60px; }
.admin-card {
  width: min(980px, 100%);
  background: #1c0d12;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}
.admin label { display: grid; gap: 6px; margin: 12px 0; color: var(--muted); }
.girl-link {
  grid-template-columns: 54px 1fr;
  align-items: center;
  column-gap: 10px;
}
.girl-link img { width: 54px; height: 54px; object-fit: cover; border-radius: 50%; grid-row: span 2; background: #000; }
.girl-link span { font-weight: 700; color: var(--text); }
.admin details { margin-top: 18px; color: var(--muted); }
.girl { border-top: 1px solid var(--line); padding-top: 12px; }
.girl summary { display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--text); font-weight: 700; }
.girl summary img { width: 42px; height: 42px; object-fit: cover; border-radius: 50%; background: #000; }
.girl .girl-link { grid-template-columns: 1fr; }
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; margin: 8px 0 16px; }
.pick { background: #14080c; border-radius: 12px; padding: 8px; }
.pick img { width: 100%; height: 150px; object-fit: cover; border-radius: 8px; background: #000; }
.pick label { display: flex; align-items: center; gap: 6px; margin: 6px 0; font-size: 13px; }
.pick .ghost { width: 100%; margin-top: 4px; }
.admin input, .admin textarea {
  width: 100%;
  background: #10080b;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}
.admin .ghost { background: transparent; border: 1px solid var(--line); margin-top: 10px; }
.ok { color: var(--green); }
.err { color: #ff8d98; }
.hint { color: var(--muted); }

@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; }
  .chat { position: sticky; top: 64px; min-height: 0; z-index: 15; }
  .log { min-height: 120px; max-height: 180px; }
  .brand { flex-wrap: wrap; justify-content: center; gap: 10px; }
  .logo { font-size: 28px; }
}
