/* ── Murder Mittens Theme ─────────────────────────────────────────────────── */

:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --surface2: #1a1a1a;
  --border: #2d2d2d;
  --purple: #7c3aed;
  --purple-light: #a855f7;
  --pink: #ff0090;
  --pink-light: #ff4db8;
  --text: #e5e5e5;
  --muted: #6b7280;
  --glow-pink: 0 0 20px rgba(255, 0, 144, 0.4);
  --glow-purple: 0 0 20px rgba(124, 58, 237, 0.4);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Rajdhani', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  /* Subtle noise texture */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
}

/* ── Scanlines overlay ────────────────────────────────────────────────────── */
.scanlines {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

/* ── Navigation ───────────────────────────────────────────────────────────── */
.nav-bar {
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 10, 0.95);
}

.nav-link {
  padding: 0.375rem 0.875rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--pink);
  background: rgba(255, 0, 144, 0.08);
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--pink);
  color: #000;
  font-weight: 700;
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  background: var(--pink-light);
  box-shadow: var(--glow-pink);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--purple-light);
  font-weight: 600;
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  border: 1px solid var(--purple);
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background: rgba(124, 58, 237, 0.15);
  box-shadow: var(--glow-purple);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 0.03em;
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  text-decoration: none;
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--muted);
}

.btn-danger {
  background: transparent;
  color: #ef4444;
  font-weight: 600;
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 0.03em;
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  border: 1px solid #7f1d1d;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* ── Role badges ──────────────────────────────────────────────────────────── */
.role-badge {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  font-weight: 400;
}

.role-guildmaster { background: rgba(255, 0, 144, 0.15); color: var(--pink); border: 1px solid rgba(255, 0, 144, 0.3); }
.role-officer     { background: rgba(124, 58, 237, 0.15); color: var(--purple-light); border: 1px solid rgba(124, 58, 237, 0.3); }
.role-raider      { background: rgba(251, 191, 36, 0.1); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.3); }
.role-member      { background: rgba(107, 114, 128, 0.15); color: var(--muted); border: 1px solid var(--border); }
.role-visitor     { background: transparent; color: var(--muted); border: 1px solid var(--border); }

/* ── Cards / surfaces ─────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.card:hover {
  border-color: #3d3d3d;
}

.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.card-body {
  padding: 1.25rem;
}

/* ── Post category badges ─────────────────────────────────────────────────── */
.cat-badge {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
}

.cat-kill         { background: rgba(255, 0, 144, 0.15); color: var(--pink); border: 1px solid rgba(255, 0, 144, 0.25); }
.cat-announcement { background: rgba(124, 58, 237, 0.15); color: var(--purple-light); border: 1px solid rgba(124, 58, 237, 0.25); }
.cat-loot         { background: rgba(251, 191, 36, 0.1); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.25); }
.cat-meme         { background: rgba(107, 114, 128, 0.1); color: var(--muted); border: 1px solid var(--border); }

/* ── Post content (rich text) ─────────────────────────────────────────────── */
.post-content h2 { font-family: 'Rajdhani', sans-serif; font-size: 1.4rem; font-weight: 700; margin: 1.5rem 0 0.5rem; color: var(--text); }
.post-content h3 { font-family: 'Rajdhani', sans-serif; font-size: 1.1rem; font-weight: 600; margin: 1.25rem 0 0.4rem; color: var(--text); }
.post-content p  { margin-bottom: 0.875rem; color: #c9c9c9; line-height: 1.7; }
.post-content ul, .post-content ol { margin: 0.75rem 0 0.75rem 1.5rem; color: #c9c9c9; }
.post-content li { margin-bottom: 0.25rem; }
.post-content blockquote { border-left: 3px solid var(--purple); padding-left: 1rem; margin: 1rem 0; color: var(--muted); font-style: italic; }
.post-content a  { color: var(--pink-light); text-decoration: underline; }
.post-content img { max-width: 100%; border-radius: 4px; border: 1px solid var(--border); margin: 0.75rem 0; }
.post-content strong { color: var(--text); font-weight: 700; }

/* ── Section headings ─────────────────────────────────────────────────────── */
.section-heading {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
}

/* ── Page title ───────────────────────────────────────────────────────────── */
.page-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.page-title .accent { color: var(--pink); }

/* ── Pink glow divider ────────────────────────────────────────────────────── */
.divider-pink {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--pink), transparent);
  margin: 2rem 0;
  opacity: 0.4;
}

/* ── Form inputs ──────────────────────────────────────────────────────────── */
input[type="text"],
input[type="url"],
input[type="email"],
select,
textarea {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.95rem;
  padding: 0.5rem 0.875rem;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
  font-family: 'Share Tech Mono', monospace;
}

/* ── Quill editor overrides ───────────────────────────────────────────────── */
.ql-toolbar { background: var(--surface2) !important; border-color: var(--border) !important; border-radius: 4px 4px 0 0; }
.ql-container { background: var(--surface2) !important; border-color: var(--border) !important; border-radius: 0 0 4px 4px; color: var(--text) !important; min-height: 200px; font-family: 'Rajdhani', sans-serif !important; font-size: 1rem !important; }
.ql-editor { min-height: 200px; }
.ql-toolbar .ql-stroke { stroke: var(--muted) !important; }
.ql-toolbar .ql-fill { fill: var(--muted) !important; }
.ql-toolbar button:hover .ql-stroke, .ql-toolbar .ql-active .ql-stroke { stroke: var(--pink) !important; }

/* ── Table ────────────────────────────────────────────────────────────────── */
.mm-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.mm-table th { font-family: 'Share Tech Mono', monospace; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.mm-table td { padding: 0.75rem 1rem; border-bottom: 1px solid rgba(45, 45, 45, 0.6); vertical-align: middle; }
.mm-table tr:hover td { background: rgba(255, 255, 255, 0.02); }
.mm-table tr:last-child td { border-bottom: none; }

/* ── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── Animations ───────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeInUp 0.3s ease forwards;
}

.stagger > * { animation: fadeInUp 0.3s ease forwards; opacity: 0; }
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.10s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.20s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(n+6) { animation-delay: 0.30s; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .page-title { font-size: 1.3rem; }
  .mm-table { font-size: 0.8rem; }
  .mm-table th, .mm-table td { padding: 0.6rem 0.75rem; }
}
