@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500;700&family=Pixelify+Sans:wght@400;500;600;700&family=Press+Start+2P&display=swap');

:root { color: #fff3ff; background: #351142; font-family: "Pixelify Sans", monospace; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #351142; }
header { height: 70px; display: flex; justify-content: flex-end; align-items: center; padding: 0 7vw; }
button { border: 0; font: inherit; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
button:hover { transform: translateY(-2px); }
button:disabled { cursor: default; opacity: .7; transform: none; }
.login-link, .logout { background: transparent; color: #d6a4de; text-decoration: underline; text-underline-offset: 4px; font-size: .9rem; }
main { width: min(100% - 32px, 820px); margin: 12px auto 64px; }
.boqz { text-align: center; }
.hero-image { width: min(100%, 320px); display: block; margin: 0 auto 20px; image-rendering: pixelated; }
h1, h2 { margin: 0; font-family: "Press Start 2P", monospace; letter-spacing: 1px; }
h1 { color: #d6a4de; font-size: clamp(2rem, 7vw, 4rem); line-height: 1.18; text-shadow: 4px 4px 0 #20092a; }
.reveal-stack { max-width: 740px; margin: 28px auto 0; }
.confession-card { position: relative; display: flex; align-items: center; justify-content: center; min-height: 190px; margin: 18px auto; padding: 30px 30px 108px; background: #482058; color: #fff3ff; border: 4px solid #9f69a7; box-shadow: 7px 7px 0 #20092a; font-family: "DM Mono", monospace; font-size: clamp(1.4rem, 3vw, 1.65rem); line-height: 1.5; }
.confession-card p { margin: 0; white-space: pre-wrap; text-align: center; }
.confession-name { position: absolute; bottom: 24px; left: 50%; width: max-content; max-width: calc(100% - 48px); padding: .3em .55em; transform: translateX(-50%); background: #d6a4de; color: #351142; box-shadow: 4px 4px 0 #20092a; font: inherit; font-weight: 700; line-height: 1.25; opacity: 0; transition: opacity 1.4s ease; }
.confession-name.is-visible { opacity: 1; }
.reveal-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }
.reveal-button, .save-button { color: #351142; background: #d6a4de; padding: 14px 23px; font-weight: 700; border: 3px solid #20092a; box-shadow: 4px 4px 0 #20092a; }
.name-reveal-button { background: #e3b9d4; }
.reveal-button:active, .save-button:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #20092a; }
.clear-button { margin: 20px auto 0; display: block; color: #d6a4de; background: transparent; font-size: .88rem; text-decoration: underline; text-underline-offset: 4px; }
.reveal-count { margin: 20px auto -10px; color: #e3b9d4; font-size: .95rem; }
.hint { color: #e3b9d4; font-size: .95rem; margin-top: 21px; }

.admin-panel { text-align: left; background: #fff8ec; color: #351142; padding: clamp(24px, 6vw, 42px); border: 5px solid #6d357d; box-shadow: 9px 9px 0 #20092a; font-family: "DM Mono", monospace; }
.admin-heading, .list-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.eyebrow { margin: 0 0 9px; color: #9a5b87; text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; }
h2 { font-size: 1.55rem; line-height: 1.3; }
.instructions { font-size: 1rem; line-height: 1.45; }
.instructions code { color: #9a5b87; }
.admin-panel textarea, .admin-panel input { width: 100%; border: 3px solid #6d357d; padding: 12px; font: inherit; color: #351142; background: #fffdf7; }
.admin-panel textarea { resize: vertical; }
.admin-actions { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.admin-actions .save-button { font-size: .95rem; }
.admin-actions span { font-size: .9rem; }
.list-heading { align-items: center; margin-top: 36px; }
.list-heading h3 { margin: 0; font-size: 1.25rem; }
.list-heading .clear-button { color: #59276c; margin: 0; }
.table-wrap { overflow-x: auto; }
.confession-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: .95rem; }
.confession-table th { color: #9a5b87; text-align: left; }
.confession-table th, .confession-table td { padding: 12px 9px; border-bottom: 1px dashed #6d357d; vertical-align: top; }
.status { font-size: .8rem; font-weight: 700; color: #59276c; text-transform: uppercase; }
.row-actions { display: flex; flex-wrap: wrap; gap: 7px; min-width: 165px; }
.row-actions-cell { min-width: 165px; }
.row-actions button { background: #9a5b87; color: #351142; padding: 7px 8px; font-size: .78rem; }
.row-actions .delete-button { background: #a02e50; }
.empty-state { color: #76506f; text-align: center; }

dialog { width: min(100% - 32px, 360px); padding: 0; border: 4px solid #6d357d; box-shadow: 8px 8px 0 #20092a; background: #fff8ec; color: #351142; font-family: "DM Mono", monospace; }
dialog::backdrop { background: rgba(0, 0, 0, .78); }
dialog form { position: relative; padding: 34px; }
.close { position: absolute; right: 9px; top: 5px; font-size: 1.5rem; color: #351142; background: transparent; }
.login-error { min-height: 18px; color: #ff91a7; font-size: .85rem; }
.login-error + .save-button { width: 100%; margin-top: 5px; }
label { display: block; margin: 24px 0 7px; font-size: .9rem; font-weight: 700; }

@media (max-width: 550px) {
  header { padding: 0 24px; }
  .hero-image { max-width: 280px; }
  .confession-card { min-height: 175px; padding: 24px 24px 96px; }
  .confession-table th:nth-child(2), .confession-table td:nth-child(2) { min-width: 180px; }
}
.archive-button { margin: 20px auto 0; color: #351142; background: #e3b9d4; padding: 8px 13px; font-size: .8rem; font-weight: 700; border: 2px solid #20092a; box-shadow: 3px 3px 0 #20092a; }
.archive-button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #20092a; }
.archive-dialog { width: min(100% - 32px, 760px); }
.archive-dialog form { position: relative; padding: 34px; }
.unread-row { background: #ded6df; color: #7b7180; }
.blurred-confession { display: inline-block; filter: blur(3px); letter-spacing: .15em; color: #766c7a; user-select: none; }
