@import url("https://fonts.googleapis.com/css2?family=Exo+2:wght@400;500;600;700;800&family=Rajdhani:wght@600;700&display=swap");

:root {
  --canvas: #071119;
  --canvas-2: #0c1821;
  --surface: rgba(13, 27, 37, 0.9);
  --surface-2: rgba(18, 36, 47, 0.96);
  --field: rgba(3, 11, 17, 0.68);
  --line: rgba(130, 174, 189, 0.24);
  --line-strong: rgba(105, 219, 204, 0.48);
  --text: #edf8f6;
  --muted: #9eb7ba;
  --dim: #6f898f;
  --accent: #43dfc7;
  --accent-blue: #47aeea;
  --accent-gold: #f1bd66;
  --bad: #ff7185;
  --good: #5edb96;
  --shadow: rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Exo 2", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(145deg, var(--canvas), var(--canvas-2) 58%, #081215);
  background-size: 44px 44px, 44px 44px, auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(67, 223, 199, 0.12), transparent 34%),
    linear-gradient(245deg, rgba(241, 189, 102, 0.12), transparent 32%),
    linear-gradient(180deg, transparent 0, rgba(0, 0, 0, 0.3) 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

/* ── Shell & Header ── */

.bb-shell {
  position: relative;
  z-index: 1;
  width: min(860px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 56px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.bb-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
  padding: 4px 0 10px;
}

.bb-kicker {
  margin: 0 0 7px;
  color: var(--accent-gold);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bb-title {
  margin: 0;
  font-family: "Rajdhani", "Exo 2", sans-serif;
  font-size: 4rem;
  line-height: 0.95;
}

.bb-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
}

.bb-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bb-user-info {
  display: flex;
  align-items: center;
  gap: 9px;
}

.bb-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-blue));
  color: #031115;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.bb-username {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text);
  background: rgba(6, 17, 25, 0.72);
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.top-link:hover {
  border-color: var(--line-strong);
  background: rgba(67, 223, 199, 0.1);
  transform: translateY(-1px);
}

/* ── Notice ── */

.notice {
  min-height: 44px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent-blue);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(8, 19, 27, 0.78);
  color: var(--muted);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
}

.notice.good {
  border-left-color: var(--good);
  color: #dfffea;
}

.notice.bad {
  border-left-color: var(--bad);
  color: #ffdce2;
}

.notice.warn {
  border-left-color: var(--accent-gold);
  color: #ffe8bd;
}

/* ── Panel ── */

.panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  overflow: hidden;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.035), transparent 26%),
    linear-gradient(150deg, var(--surface-2), var(--surface));
  box-shadow: 0 24px 46px var(--shadow);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-blue), var(--accent-gold));
  opacity: 0.86;
}

.panel > * {
  position: relative;
}

.panel h2 {
  margin: 0 0 4px;
  font-family: "Rajdhani", "Exo 2", sans-serif;
  font-size: 1.55rem;
}

.section-kicker {
  margin: 0 0 7px;
  color: var(--accent-gold);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.panel-copy {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.auth-panel {
  max-width: 540px;
}

.auth-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

.blocked-panel::before {
  background: var(--bad);
  opacity: 0.7;
}

/* ── Buttons ── */

.primary-btn,
.soft-btn,
.danger-btn,
.ghost-btn {
  min-height: 40px;
  border-radius: 8px;
  padding: 9px 15px;
  color: var(--text);
  font-weight: 800;
  transition: transform 140ms ease, filter 140ms ease, border-color 140ms ease, background 140ms ease;
}

.primary-btn:hover,
.soft-btn:hover,
.danger-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
}

.primary-btn:disabled,
.soft-btn:disabled,
.danger-btn:disabled,
.ghost-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.primary-btn {
  color: #031115;
  background: linear-gradient(135deg, var(--accent), var(--accent-blue));
  box-shadow: 0 14px 28px rgba(67, 223, 199, 0.18);
}

.soft-btn {
  border: 1px solid var(--line-strong);
  background: rgba(67, 223, 199, 0.11);
}

.danger-btn {
  border: 1px solid rgba(255, 113, 133, 0.58);
  background: rgba(255, 113, 133, 0.13);
  color: #ffdce2;
  min-height: 34px;
  padding: 6px 11px;
  font-size: 0.86rem;
}

.ghost-btn {
  border: 1px solid var(--line);
  background: rgba(8, 20, 28, 0.78);
  font-size: 0.88rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  min-width: 30px;
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease;
}

.icon-btn:hover {
  transform: translateY(-1px);
}

.delete-btn {
  border: 1px solid rgba(255, 113, 133, 0.4);
  background: rgba(255, 113, 133, 0.1);
  color: var(--bad);
}

.block-btn {
  border: 1px solid rgba(241, 189, 102, 0.4);
  background: rgba(241, 189, 102, 0.09);
  color: var(--accent-gold);
}

/* ── Compose form ── */

.compose-panel {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.035), transparent 26%),
    linear-gradient(150deg, rgba(20, 42, 54, 0.97), rgba(15, 32, 42, 0.95));
}

.compose-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.compose-name-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  outline: none;
  color: var(--text);
  background: var(--field);
  font-size: 0.92rem;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.compose-name-input::placeholder {
  color: var(--dim);
  font-size: 0.85rem;
}

.compose-name-input:focus {
  border-color: var(--accent);
  background: rgba(3, 12, 17, 0.86);
  box-shadow: 0 0 0 3px rgba(67, 223, 199, 0.18);
}

.compose-textarea {
  width: 100%;
  min-height: 100px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  outline: none;
  color: var(--text);
  background: var(--field);
  resize: vertical;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.compose-textarea::placeholder {
  color: var(--dim);
}

.compose-textarea:focus {
  border-color: var(--accent);
  background: rgba(3, 12, 17, 0.86);
  box-shadow: 0 0 0 3px rgba(67, 223, 199, 0.18);
}

.compose-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.char-count {
  font-size: 0.82rem;
  color: var(--dim);
  font-weight: 600;
}

.char-count.warn {
  color: var(--accent-gold);
}

.char-count.over {
  color: var(--bad);
}

/* ── Admin panel ── */

.admin-panel::before {
  background: linear-gradient(90deg, var(--accent-gold), var(--accent), var(--accent-blue));
}

.blocked-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 36px;
}

.blocked-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(3, 10, 16, 0.48);
}

.blocked-user-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blocked-user-meta {
  font-size: 0.8rem;
  color: var(--dim);
  flex-shrink: 0;
}

/* ── Feed & Post cards ── */

.bb-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.feed-status {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.posts-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.post-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px 14px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.025), transparent 26%),
    linear-gradient(150deg, var(--surface-2), var(--surface));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  transition: border-color 180ms ease;
}

.post-card:hover {
  border-color: rgba(130, 174, 189, 0.38);
}

.post-card.hidden-post {
  border-color: rgba(255, 113, 133, 0.2);
  background:
    linear-gradient(150deg, rgba(14, 24, 32, 0.92), rgba(12, 20, 27, 0.9));
  opacity: 0.6;
}

.post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.post-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-blue));
  color: #031115;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.post-avatar.hidden-avatar {
  background: rgba(255, 113, 133, 0.25);
  color: var(--bad);
}

.post-meta {
  flex: 1;
  min-width: 0;
}

.post-author {
  font-weight: 700;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-author.hidden-author {
  color: var(--bad);
  opacity: 0.7;
}

.post-time {
  font-size: 0.78rem;
  color: var(--dim);
  margin-top: 1px;
}

.post-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.post-body {
  color: var(--text);
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 14px;
}

.post-body.hidden-body {
  color: var(--dim);
  font-style: italic;
}

.post-footer {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reply-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 4px 0;
  cursor: pointer;
  transition: color 140ms ease;
}

.reply-toggle-btn:hover {
  color: var(--accent);
}

.reply-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: rgba(67, 223, 199, 0.18);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
}

/* ── Replies ── */

.replies-section {
  display: none;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.replies-section.open {
  display: block;
}

.replies-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.reply-card {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(3, 11, 17, 0.42);
  border: 1px solid var(--line);
}

.reply-card.hidden-reply {
  border-color: rgba(255, 113, 133, 0.15);
  opacity: 0.55;
}

.reply-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent));
  color: #031115;
  font-weight: 800;
  font-size: 0.78rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.reply-avatar.hidden-avatar {
  background: rgba(255, 113, 133, 0.2);
  color: var(--bad);
}

.reply-content {
  flex: 1;
  min-width: 0;
}

.reply-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.reply-author {
  font-weight: 700;
  font-size: 0.88rem;
}

.reply-author.hidden-author {
  color: var(--bad);
  opacity: 0.7;
}

.reply-time {
  font-size: 0.75rem;
  color: var(--dim);
  flex-shrink: 0;
}

.reply-body {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.reply-body.hidden-body {
  color: var(--dim);
  font-style: italic;
}

.reply-actions {
  display: flex;
  gap: 5px;
  align-items: flex-start;
  flex-shrink: 0;
}

/* ── Reply compose ── */

.reply-compose {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reply-name-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 11px;
  outline: none;
  color: var(--text);
  background: var(--field);
  font-size: 0.88rem;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.reply-name-input::placeholder {
  color: var(--dim);
  font-size: 0.82rem;
}

.reply-name-input:focus {
  border-color: var(--accent);
  background: rgba(3, 12, 17, 0.86);
  box-shadow: 0 0 0 3px rgba(67, 223, 199, 0.18);
}

.reply-compose-textarea {
  width: 100%;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  outline: none;
  color: var(--text);
  background: var(--field);
  resize: vertical;
  font-size: 0.92rem;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.reply-compose-textarea::placeholder {
  color: var(--dim);
}

.reply-compose-textarea:focus {
  border-color: var(--accent);
  background: rgba(3, 12, 17, 0.86);
  box-shadow: 0 0 0 3px rgba(67, 223, 199, 0.18);
}

.reply-compose-footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.reply-char-count {
  font-size: 0.75rem;
  color: var(--dim);
  font-weight: 600;
}

.reply-inline-error {
  margin: 4px 0 0;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--bad);
  background: rgba(255, 113, 133, 0.1);
  border: 1px solid rgba(255, 113, 133, 0.3);
}

.reply-inline-error.hidden {
  display: none;
}

/* ── Misc ── */

.muted {
  color: var(--muted);
}

.empty-hint {
  margin: 0;
  padding: 22px 0;
  text-align: center;
  color: var(--dim);
  font-size: 0.92rem;
}

@media (max-width: 600px) {
  .bb-header {
    grid-template-columns: 1fr;
  }

  .bb-toolbar {
    justify-content: flex-start;
  }

  .bb-title {
    font-size: 2.8rem;
  }
}
