:root {
  --bg: #07060c;
  --panel: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f3f4f6;
  --muted: #9da3b5;
  --accent: #e11d48;
  --accent-2: #7c3aed;
  --shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
  --radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Noto Sans JP", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(225, 29, 72, 0.12), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(124, 58, 237, 0.12), transparent 25%),
    radial-gradient(circle at 50% 100%, rgba(251, 191, 36, 0.08), transparent 35%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.15;
  pointer-events: none;
}

.glow {
  position: fixed;
  width: 520px;
  height: 520px;
  filter: blur(120px);
  opacity: 0.5;
  z-index: 0;
}

.glow-a {
  top: -100px;
  left: -120px;
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.4), rgba(124, 58, 237, 0.25));
}

.glow-b {
  bottom: -120px;
  right: -160px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(124, 58, 237, 0.25));
}

.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  max-width: 1200px;
  margin: 40px auto;
  padding: 24px;
}

.hero {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.08), rgba(124, 58, 237, 0.06));
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: calc(var(--radius) - 6px);
  pointer-events: none;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 10px;
}

h1 {
  margin: 0;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.subhead {
  display: inline-block;
  font-size: 22px;
  font-weight: 600;
}

.male {
  color: #3b82f6;
}

.female {
  color: #ef4444;
}

.lede {
  color: var(--muted);
  margin: 14px 0 18px;
  max-width: 520px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 18px;
}

.hero-stats div {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.stat-value {
  font-size: 16px;
  font-weight: 600;
}

.hero-art {
  margin-top: 10px;
  background: radial-gradient(circle at 30% 20%, rgba(225, 29, 72, 0.25), transparent 35%),
    radial-gradient(circle at 80% 80%, rgba(124, 58, 237, 0.25), transparent 30%);
  border-radius: 16px;
  padding: 12px;
  border: 1px solid var(--border);
}

.hero-art img {
  width: 100%;
  display: block;
  border-radius: 12px;
}

.panel {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.tab {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.tab.active {
  border-color: rgba(45, 212, 191, 0.5);
  box-shadow: 0 10px 30px rgba(45, 212, 191, 0.15);
}

.tab-content.hidden {
  display: none;
}

label {
  display: block;
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--muted);
}

input,
textarea,
select {
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: #3b82f6;
  transition: border 0.2s ease, background 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(45, 212, 191, 0.6);
  background: rgba(255, 255, 255, 0.04);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  color: var(--bg);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 40px rgba(45, 212, 191, 0.25);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn.danger {
  border-color: rgba(248, 113, 113, 0.6);
  color: #fca5a5;
}

.alert {
  margin-top: 12px;
  min-height: 22px;
  color: var(--accent);
  font-size: 14px;
}

.hidden {
  display: none !important;
}

.board {
  grid-column: 1 / span 2;
}

.notice {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 14px;
  background: rgba(225, 29, 72, 0.05);
  margin-bottom: 14px;
}

.notice h3 {
  margin: 0 0 8px;
}

.notice ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.board-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

h2 {
  margin: 0 0 4px;
  font-size: 26px;
}

.muted {
  color: var(--muted);
  margin: 0;
}

.note-inline {
  font-size: 12px;
}

.actions {
  display: flex;
  gap: 10px;
}

.composer {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.composer.male textarea,
.composer.male input {
  color: #bfdbfe;
  border-color: rgba(59, 130, 246, 0.6);
}

.composer.male textarea::placeholder,
.composer.male input::placeholder {
  color: #93c5fd;
}

.composer.female textarea,
.composer.female input {
  color: #fecdd3;
  border-color: rgba(248, 113, 113, 0.6);
}

.composer.female textarea::placeholder,
.composer.female input::placeholder {
  color: #fda4af;
}

.composer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.posts {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.post {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.post-body {
  white-space: pre-wrap;
  word-break: break-word;
  color: #e8edf5;
}

.post.male {
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.2);
}

.post.female {
  border-color: rgba(248, 113, 113, 0.6);
  background: rgba(248, 113, 113, 0.2);
}

.post.neutral {
  border-color: rgba(236, 72, 153, 0.35);
  background: rgba(236, 72, 153, 0.12);
}
}

.post.male .post-body {
  color: #dbeafe;
}

.post.female .post-body {
  color: #fecdd3;
}

.post.neutral .post-body {
  color: #f5e1f0;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.post-title {
  font-weight: 700;
  font-size: 16px;
}

.post-heading {
  font-weight: 700;
  font-size: 18px;
}

.dm-link {
  background: none;
  border: none;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline dotted;
}

.dm-link:hover {
  color: var(--accent);
  text-decoration: underline solid;
}

.post-actions {
  display: flex;
  gap: 8px;
}

.admin {
  grid-column: 1 / span 2;
}

.table {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.table th,
.table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  color: var(--text);
}

.table th {
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.ip-block {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.ip-block-header h3 {
  margin: 0;
}

.ip-block-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0;
}

#ip-input {
  max-width: 220px;
}

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  z-index: 9;
}

.modal {
  position: fixed;
  z-index: 10;
  max-width: 520px;
  width: 90%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #0f111f;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
}

.dm-inbox {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  max-height: 220px;
  overflow: auto;
}

.dm-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.dm-item:last-child {
  border-bottom: none;
}

.dm-body {
  white-space: pre-wrap;
  word-break: break-word;
}

.modal.male textarea {
  color: #bfdbfe;
  border-color: rgba(59, 130, 246, 0.6);
}

.modal.male textarea::placeholder {
  color: #93c5fd;
}

.modal.female textarea {
  color: #fecdd3;
  border-color: rgba(248, 113, 113, 0.6);
}

.modal.female textarea::placeholder {
  color: #fda4af;
}

.pagination {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.page-btn {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  cursor: pointer;
}

.page-btn.active {
  border-color: rgba(45, 212, 191, 0.6);
  color: var(--accent);
  background: rgba(45, 212, 191, 0.08);
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.action-stack {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.badge.admin {
  color: var(--accent);
  border-color: rgba(45, 212, 191, 0.6);
}

.badge.blocked {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.5);
}

@media (max-width: 960px) {
  .shell {
    grid-template-columns: 1fr;
    margin: 20px auto;
  }
  .board,
  .admin {
    grid-column: 1;
  }
  .hero {
    order: -1;
  }
  .board-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .actions {
    width: 100%;
    justify-content: flex-start;
  }
}
