/* BoBo member site - login, member and admin pages. Black and red theme, same tokens as style.css. */
:root {
  --bg: #050506;
  --red: #ff2d3d;
  --text: #f5f5f7;
  --text-2: rgba(245, 245, 247, .62);
  --glass: rgba(18, 18, 20, .78);
  --glass-edge: rgba(255, 255, 255, .10);
  --radius: 16px;
  --page-max-width: 920px;
  --gutter: 16px;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; }
a { color: var(--red); }

.site-header {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px var(--gutter); background: rgba(5, 5, 6, .92); border-bottom: 1px solid var(--glass-edge);
}
.site-header .brand { color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: .02em; }
.site-header .brand b { color: var(--red); font-weight: 700; }
.site-header nav { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 14px; }
.site-header nav a { color: var(--text-2); text-decoration: none; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--text); }

main.page { max-width: var(--page-max-width); margin: 0 auto; padding: 24px var(--gutter) 64px; }
h1 { font-size: 26px; margin: 8px 0 4px; }
h2 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--red); margin: 0 0 10px; }
.lead { color: var(--text-2); margin: 0 0 18px; }

.card { background: var(--glass); border: 1px solid var(--glass-edge); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.card + .card { margin-top: 0; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13px; color: var(--text-2); }
input[type="text"], input[type="password"], input[type="email"], textarea, select {
  width: 100%; font: inherit; color: var(--text); background: rgba(255, 255, 255, .04);
  border: 1px solid var(--glass-edge); border-radius: 10px; padding: 10px 12px;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.btn {
  appearance: none; border: 1px solid var(--glass-edge); background: rgba(255, 255, 255, .06); color: var(--text);
  font: inherit; font-size: 14px; border-radius: 10px; padding: 9px 14px; cursor: pointer; text-decoration: none; display: inline-block;
}
.btn:hover { background: rgba(255, 255, 255, .12); }
.btn-red { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
.btn-red:hover { background: #ff5865; }
.btn-small { padding: 6px 10px; font-size: 13px; }
.btn-danger { color: #ff8a93; }

.error { color: #ff8a93; font-size: 14px; min-height: 1.4em; margin: 6px 0; }
.ok { color: #7ee8a6; font-size: 14px; min-height: 1.4em; margin: 6px 0; }
.muted { color: var(--text-2); font-size: 13px; }

.badge { display: inline-block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--glass-edge); color: var(--text-2); }
.badge.members { color: var(--red); border-color: rgba(255, 45, 61, .5); }
.badge.public { color: #7ee8a6; border-color: rgba(126, 232, 166, .4); }

.post { border-top: 1px solid var(--glass-edge); padding: 14px 0; }
.post:first-child { border-top: 0; padding-top: 0; }
.post h3 { margin: 0 0 4px; font-size: 17px; }
.post p { margin: 6px 0 0; white-space: pre-wrap; }
.post-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--text-2); font-size: 13px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--glass-edge); vertical-align: top; }
th { color: var(--text-2); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.table-wrap { overflow-x: auto; }

.secret { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: rgba(255, 45, 61, .08); border: 1px solid rgba(255, 45, 61, .4); border-radius: 10px; padding: 10px 12px; margin: 8px 0; display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } h1 { font-size: 22px; } }

/* Dropdowns: the open list uses the dark theme (light text on a dark list, never black on black). */
select { color-scheme: dark; }
select option, select optgroup { background: #121214; color: #f5f5f7; }

/* Code posts and the code window */
.code-area { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.5; min-height: 180px; white-space: pre; tab-size: 4; }
pre.code {
  margin: 8px 0 0; padding: 12px; background: #0b0b0d; border: 1px solid var(--glass-edge); border-radius: 10px;
  overflow: auto; color: #e5e7eb; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre;
}
dialog.code-window {
  width: min(960px, 94vw); height: min(80vh, 720px); max-width: 94vw; max-height: 80vh;
  background: var(--glass); color: var(--text); border: 1px solid var(--glass-edge); border-radius: var(--radius); padding: 16px;
}
dialog.code-window[open] { display: flex; flex-direction: column; }
dialog.code-window::backdrop { background: rgba(0, 0, 0, .7); }
dialog.code-window textarea { flex: 1; min-height: 0; height: 100%; resize: none; }

/* Videos in posts */
.post video.post-video { display: block; width: 100%; max-height: 70vh; margin-top: 10px; border-radius: 10px; background: #000; }

/* Photos in posts: shown at a readable size, never wider than the card */
.post img.post-photo { display: block; max-width: 100%; max-height: 70vh; margin-top: 10px; border-radius: 10px; border: 1px solid var(--glass-edge); }
