* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background-color: #0a0a0a;
  color: #c0c0c0;
  font-family: Arial, sans-serif;
  font-size: 14px;
}

/* =============================================
   NAV
   ============================================= */
nav {
  background-color: #0d0d0d;
  border-bottom: 1px solid #1e1e1e;
  padding: 0 16px;
  display: flex;
  align-items: center;
  height: 40px;
  position: sticky;
  top: 0;
  z-index: 100;
}
nav .brand {
  font-size: 18px;
  font-weight: bold;
  color: #d0d0d0;
  text-decoration: none;
  margin-right: 24px;
}
nav .nav-links { display: flex; align-items: center; gap: 2px; flex: 1; }
nav .nav-links a {
  color: #b0b0b0;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 13px;
  transition: color 0.15s;
}
nav .nav-links a:hover { color: #ffffff; }
nav .nav-links a.active { color: #ffffff; }
nav .nav-right { display: flex; align-items: center; gap: 8px; }
nav .nav-right a {
  color: #b0b0b0;
  text-decoration: none;
  padding: 4px 10px;
  font-size: 13px;
  transition: color 0.15s;
}
nav .nav-right a:hover { color: #ffffff; }
nav .nav-right .btn-logout {
  background: #1a1a1a;
  border: 1px solid #333;
  color: #b0b0b0;
  padding: 3px 10px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 13px;
  text-decoration: none;
}
nav .nav-right .btn-logout:hover { color: #fff; border-color: #555; }
.username-display { color: #888; font-size: 13px; }

/* =============================================
   TICKET PANEL TOGGLE (left middle arrow)
   ============================================= */
#ticket-toggle-btn {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  background: #111;
  border: 1px solid #2a2a2a;
  border-left: none;
  color: #777;
  padding: 14px 8px;
  cursor: pointer;
  z-index: 200;
  border-radius: 0 4px 4px 0;
  font-size: 14px;
  transition: background 0.2s, color 0.2s;
  line-height: 1;
}
#ticket-toggle-btn:hover { background: #1a1a1a; color: #ccc; }
#ticket-toggle-btn .arrow { display: inline-block; transition: transform 0.3s; }
#ticket-toggle-btn.open .arrow { transform: rotate(180deg); }

#ticket-panel {
  position: fixed;
  left: -340px;
  top: 0;
  bottom: 0;
  width: 340px;
  background: #0d0d0d;
  border-right: 1px solid #1e1e1e;
  z-index: 190;
  overflow-y: auto;
  transition: left 0.3s ease;
  padding-top: 50px;
}
#ticket-panel.open { left: 0; }

.ticket-panel-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid #1e1e1e;
  font-size: 14px;
  font-weight: bold;
  color: #c0c0c0;
  position: sticky;
  top: 0;
  background: #0d0d0d;
}

.ticket-list-item {
  padding: 10px 16px;
  border-bottom: 1px solid #141414;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  display: block;
}
.ticket-list-item:hover { background: #111; }
.ticket-list-item .tl-subject { color: #b0b0b0; font-size: 13px; margin-bottom: 3px; }
.ticket-list-item .tl-meta { color: #555; font-size: 11px; }
.ticket-list-item .tl-user { color: #666; }
.ticket-status-open { color: #44cc44; font-size: 10px; border: 1px solid #003300; background: #001a00; padding: 1px 5px; border-radius: 2px; }
.ticket-status-closed { color: #cc4444; font-size: 10px; border: 1px solid #330000; background: #1a0000; padding: 1px 5px; border-radius: 2px; }

/* =============================================
   HERO / LOGO
   ============================================= */
.hero {
  text-align: center;
  padding: 24px 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.demon-logo-wrap {
  width: 220px;
  height: 220px;
  margin: 0 auto 18px;
  overflow: hidden;
  position: relative;
}

/* The demon figure sits ~63% from the left inside the source PNG.
   We render the image at 340px and shift it so that 63% point
   aligns with the container's center (110px). */
.demon-logo {
  width: 340px;
  height: 340px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-63%, -50%);
  object-fit: contain;
  filter: brightness(0.9) contrast(1.1);
}

/* =============================================
   SEARCH
   ============================================= */
.search-section { text-align: center; margin-bottom: 16px; width: 100%; }
.search-section h3 { font-size: 14px; font-weight: bold; color: #c0c0c0; margin-bottom: 10px; }
.search-options { display: flex; justify-content: center; gap: 20px; margin-bottom: 10px; }
.search-options label { display: flex; align-items: center; gap: 6px; color: #a0a0a0; cursor: pointer; font-size: 13px; }
.search-options input[type="radio"] { accent-color: #4488ff; }
.search-bar { display: flex; justify-content: center; gap: 0; margin-bottom: 10px; }
.search-bar input {
  background: #111;
  border: 1px solid #333;
  border-right: none;
  color: #c0c0c0;
  padding: 6px 12px;
  width: 280px;
  font-size: 13px;
  border-radius: 3px 0 0 3px;
  outline: none;
}
.search-bar input:focus { border-color: #555; }
.search-bar button {
  background: #1e1e1e;
  border: 1px solid #333;
  color: #b0b0b0;
  padding: 6px 16px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 0 3px 3px 0;
  transition: background 0.15s;
}
.search-bar button:hover { background: #2a2a2a; color: #fff; }
.paste-count { color: #666; font-size: 12px; margin-bottom: 10px; }

/* =============================================
   PAGINATION
   ============================================= */
.pagination { display: flex; justify-content: center; align-items: center; gap: 2px; margin-bottom: 24px; }
.pagination a, .pagination span {
  background: #111; border: 1px solid #2a2a2a; color: #888;
  padding: 3px 9px; text-decoration: none; font-size: 12px;
  border-radius: 2px; transition: background 0.15s;
}
.pagination a:hover { background: #1e1e1e; color: #ccc; }
.pagination .active-page { background: #1e1e1e; color: #ccc; border-color: #444; }
.pagination .ellipsis { border: none; background: transparent; color: #555; }

/* =============================================
   CONTAINER / SECTIONS
   ============================================= */
.container { max-width: 960px; margin: 0 auto; padding: 20px 16px; }
.section-title {
  font-size: 16px; font-weight: bold; color: #d0d0d0;
  margin-bottom: 12px; border-bottom: 1px solid #1e1e1e; padding-bottom: 6px;
}

/* =============================================
   PASTE LIST
   ============================================= */
.paste-list { display: flex; flex-direction: column; gap: 2px; }
.paste-item {
  background: #0f0f0f; border: 1px solid #1a1a1a; padding: 8px 12px;
  border-radius: 3px; display: flex; justify-content: space-between;
  align-items: center; transition: background 0.15s;
}
.paste-item:hover { background: #141414; }
.paste-item a { color: #a0a0a0; text-decoration: none; font-size: 13px; flex: 1; }
.paste-item a:hover { color: #ffffff; }
.paste-item .paste-meta { color: #555; font-size: 11px; text-align: right; white-space: nowrap; margin-left: 12px; }
.paste-item .paste-author { color: #666; }
.pinned-badge { background: #1a1a00; border: 1px solid #333300; color: #888800; font-size: 10px; padding: 1px 5px; border-radius: 2px; margin-left: 8px; }

/* =============================================
   USERS PAGE — CATEGORY SECTIONS
   ============================================= */
.user-category-section { margin-bottom: 32px; }
.user-category-title { font-size: 15px; font-weight: bold; color: #c0c0c0; margin-bottom: 8px; }
.role-title-owner   { color: #e8c84a; }
.role-title-admin   { color: #dd3333; }
.role-title-manager { color: #aa44dd; }
.role-title-verified { color: #22aadd; }
.role-title-user    { color: #888888; }

.users-table { width: 100%; border-collapse: collapse; }
.users-table th {
  background: #111; border: 1px solid #222; padding: 7px 12px;
  text-align: left; color: #666; font-size: 12px; font-weight: normal;
}
.users-table td { border: 1px solid #1a1a1a; padding: 7px 12px; font-size: 13px; color: #a0a0a0; }
.users-table tr:hover td { background: #0f0f0f; }
.id-col { color: #444; font-size: 12px; }

/* Username links for clickable roles */
.username-link { text-decoration: none; }
.username-link:hover .role-username { text-decoration: underline; }

/* =============================================
   ROLE USERNAMES & BADGES
   ============================================= */
.role-username { font-weight: normal; }
.role-username-owner    { color: #e8c84a; }
.role-username-admin    { color: #dd3333; }
.role-username-manager  { color: #aa44dd; }
.role-username-verified { color: #22aadd; }
.role-username-user     { color: #b0b0b0; }

/* --- OWNER badge: gold flame shimmer --- */
@keyframes ownerFlame {
  0%   { color: #ffd700; text-shadow: 0 0 4px #ffd700, 0 0 8px #ff8800; border-color: #ffd700; box-shadow: 0 0 4px #ffd70066; }
  25%  { color: #ffaa00; text-shadow: 0 0 6px #ffaa00, 0 0 12px #ff4400; border-color: #ffaa00; box-shadow: 0 0 6px #ffaa0088; }
  50%  { color: #ffd700; text-shadow: 0 0 8px #fff200, 0 0 16px #ff8800; border-color: #fff200; box-shadow: 0 0 8px #fff20066; }
  75%  { color: #ff8c00; text-shadow: 0 0 6px #ff8c00, 0 0 10px #ff2200; border-color: #ff8c00; box-shadow: 0 0 6px #ff8c0088; }
  100% { color: #ffd700; text-shadow: 0 0 4px #ffd700, 0 0 8px #ff8800; border-color: #ffd700; box-shadow: 0 0 4px #ffd70066; }
}

/* --- ADMIN badge: red/white barb wire flicker --- */
@keyframes adminBarb {
  0%   { color: #ff2222; border-color: #ff2222; box-shadow: 0 0 4px #ff0000, inset 0 0 3px #ff000033; }
  20%  { color: #ffffff; border-color: #ff4444; box-shadow: 0 0 8px #ff0000, inset 0 0 5px #ff000066; }
  40%  { color: #ff2222; border-color: #ff2222; box-shadow: 0 0 4px #ff0000; }
  60%  { color: #ffaaaa; border-color: #ff6666; box-shadow: 0 0 10px #ff000099; }
  80%  { color: #ff2222; border-color: #ff2222; box-shadow: 0 0 4px #ff0000; }
  100% { color: #ff2222; border-color: #ff2222; box-shadow: 0 0 4px #ff0000; }
}
@keyframes barbSweep {
  0%   { left: -100%; }
  100% { left: 100%; }
}

/* --- MANAGER badge: purple shimmer --- */
@keyframes managerShimmer {
  0%   { color: #cc55ff; border-color: #aa33cc; box-shadow: 0 0 4px #aa00ff66; }
  33%  { color: #ee88ff; border-color: #cc55ff; box-shadow: 0 0 8px #cc00ff99; }
  66%  { color: #aa33dd; border-color: #8800bb; box-shadow: 0 0 6px #8800ff44; }
  100% { color: #cc55ff; border-color: #aa33cc; box-shadow: 0 0 4px #aa00ff66; }
}

/* --- VERIFIED badge: blue electric pulse --- */
@keyframes verifiedPulse {
  0%   { color: #33aaff; border-color: #1188dd; box-shadow: 0 0 4px #0088ff44; }
  50%  { color: #88ddff; border-color: #33aaff; box-shadow: 0 0 10px #0088ffaa; }
  100% { color: #33aaff; border-color: #1188dd; box-shadow: 0 0 4px #0088ff44; }
}

.role-badge {
  display: inline-block; font-size: 11px; padding: 1px 6px;
  border-radius: 2px; border: 1px solid #333; margin-left: 5px;
  vertical-align: middle; font-weight: bold; letter-spacing: 0.3px;
}
.role-badge-owner   { border: 1px solid #ffd700; background: #1a1200; animation: ownerFlame 1.8s ease-in-out infinite; }
.role-badge-admin   { border: 1px dashed #ff2222; background: #1a0000; animation: adminBarb 1.2s ease-in-out infinite; position: relative; overflow: hidden; }
.role-badge-admin::before {
  content: '╳ ╳ ╳ ╳ ╳'; position: absolute; top: -1px; left: -100%;
  color: #ff222233; font-size: 8px; white-space: nowrap;
  animation: barbSweep 2s linear infinite; pointer-events: none;
}
.role-badge-manager  { border: 1px solid #aa33cc; background: #110022; animation: managerShimmer 2s ease-in-out infinite; }
.role-badge-verified { border: 1px solid #1188dd; background: #001122; animation: verifiedPulse 1.5s ease-in-out infinite; }

.role-select {
  background: #111; border: 1px solid #2a2a2a; color: #888;
  padding: 2px 6px; font-size: 11px; border-radius: 2px; outline: none; cursor: pointer;
}
.role-select:focus { border-color: #444; }

/* =============================================
   FORMS
   ============================================= */
.form-page { max-width: 520px; margin: 60px auto; padding: 0 16px; }
.form-page h1 { text-align: center; font-size: 28px; font-weight: normal; color: #d0d0d0; margin-bottom: 32px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; color: #999; font-size: 13px; margin-bottom: 6px; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%; background: #0d0d0d; border: 1px solid #333; color: #c0c0c0;
  padding: 10px 12px; font-size: 13px; border-radius: 3px; outline: none;
  transition: border-color 0.15s; font-family: Arial, sans-serif;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: #555; }
.form-group textarea { height: 200px; resize: vertical; font-family: 'Courier New', monospace; font-size: 13px; }
.btn-submit {
  width: 100%; background: #111; border: 1px solid #333; color: #b0b0b0;
  padding: 10px; font-size: 14px; cursor: pointer; border-radius: 3px;
  transition: background 0.15s, color 0.15s; margin-top: 4px;
}
.btn-submit:hover { background: #1e1e1e; color: #fff; border-color: #555; }
.form-link { text-align: center; margin-top: 16px; font-size: 13px; color: #555; }
.form-link a { color: #777; text-decoration: none; }
.form-link a:hover { color: #aaa; }

/* =============================================
   ALERTS
   ============================================= */
.alert { padding: 10px 14px; border-radius: 3px; margin-bottom: 16px; font-size: 13px; }
.alert-error   { background: #1a0000; border: 1px solid #330000; color: #cc4444; }
.alert-success { background: #001a00; border: 1px solid #003300; color: #44cc44; }

/* =============================================
   ADD PASTE
   ============================================= */
.add-paste-page { max-width: 800px; margin: 30px auto; padding: 0 16px; }
.add-paste-page h1 {
  font-size: 22px; font-weight: bold; color: #d0d0d0;
  margin-bottom: 20px; border-bottom: 1px solid #1e1e1e; padding-bottom: 10px;
}

/* =============================================
   PASTE VIEW
   ============================================= */
.paste-view { max-width: 900px; margin: 30px auto; padding: 0 16px; }
.paste-view h1 { font-size: 20px; color: #d0d0d0; margin-bottom: 8px; }
.paste-header-meta {
  color: #555; font-size: 12px; margin-bottom: 16px;
  border-bottom: 1px solid #1a1a1a; padding-bottom: 12px;
}
.paste-content {
  background: #0a0a0a; border: 1px solid #1e1e1e; padding: 16px; border-radius: 3px;
  font-family: 'Courier New', monospace; font-size: 13px; color: #b0b0b0;
  white-space: pre-wrap; word-wrap: break-word; line-height: 1.6; max-height: 600px; overflow-y: auto;
}

/* =============================================
   WALL OF SHAME
   ============================================= */
.wos-page { max-width: 900px; margin: 30px auto; padding: 0 16px; }
.wos-page h1 { font-size: 22px; font-weight: bold; color: #d0d0d0; margin-bottom: 6px; }
.wos-subtitle { color: #555; font-size: 12px; margin-bottom: 20px; border-bottom: 1px solid #1a1a1a; padding-bottom: 12px; }
.wos-post { background: #0d0d0d; border: 1px solid #1e1e1e; border-radius: 3px; margin-bottom: 16px; overflow: hidden; }
.wos-post-header {
  background: #111; padding: 8px 12px; display: flex; justify-content: space-between;
  align-items: center; border-bottom: 1px solid #1e1e1e;
}
.wos-post-title { font-size: 14px; color: #c0c0c0; font-weight: bold; }
.wos-post-meta { color: #555; font-size: 11px; }
.wos-post-body { padding: 12px; }
.wos-post-body p { color: #999; font-size: 13px; line-height: 1.6; white-space: pre-wrap; }
.wos-post-body img { max-width: 100%; border: 1px solid #222; border-radius: 2px; margin-top: 10px; display: block; }
.wos-add-form { background: #0d0d0d; border: 1px solid #1e1e1e; border-radius: 3px; padding: 16px; margin-bottom: 24px; }
.wos-add-form h3 { color: #c0c0c0; font-size: 14px; margin-bottom: 14px; border-bottom: 1px solid #1a1a1a; padding-bottom: 8px; }
.wos-add-form .form-group input,
.wos-add-form .form-group textarea { background: #111; }

/* =============================================
   SUPPORT / TICKET SYSTEM
   ============================================= */
.support-page { max-width: 900px; margin: 30px auto; padding: 0 16px; }
.support-page h1 { font-size: 20px; color: #d0d0d0; margin-bottom: 4px; }
.support-page .support-sub { color: #555; font-size: 12px; margin-bottom: 20px; border-bottom: 1px solid #1a1a1a; padding-bottom: 10px; }

/* Ticket create form */
.ticket-create-form {
  background: #0d0d0d; border: 1px solid #1e1e1e; border-radius: 3px;
  padding: 16px; margin-bottom: 24px;
}
.ticket-create-form h3 { color: #b0b0b0; font-size: 14px; margin-bottom: 14px; border-bottom: 1px solid #1a1a1a; padding-bottom: 8px; }
.ticket-create-form .form-group input,
.ticket-create-form .form-group textarea { background: #111; }

/* Ticket detail */
.ticket-detail {
  background: #0d0d0d; border: 1px solid #1e1e1e; border-radius: 3px; margin-bottom: 20px;
}
.ticket-detail-header {
  background: #111; border-bottom: 1px solid #1e1e1e;
  padding: 10px 14px; display: flex; justify-content: space-between; align-items: center;
}
.ticket-detail-header h2 { font-size: 15px; color: #c0c0c0; font-weight: bold; }
.ticket-detail-meta { color: #555; font-size: 11px; }
.ticket-detail-desc { padding: 12px 14px; color: #888; font-size: 13px; line-height: 1.6; border-bottom: 1px solid #141414; }

/* Live chat */
.chat-box {
  padding: 10px 14px;
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-msg { display: flex; flex-direction: column; gap: 2px; }
.chat-msg-header { display: flex; align-items: baseline; gap: 8px; }
.chat-msg-sender { font-size: 12px; font-weight: bold; color: #999; }
.chat-msg-sender.is-staff { color: #aa44dd; }
.chat-msg-sender.is-owner { color: #e8c84a; }
.chat-msg-time { font-size: 10px; color: #444; }
.chat-msg-text { font-size: 13px; color: #b0b0b0; line-height: 1.5; padding-left: 2px; }

.chat-input-area {
  border-top: 1px solid #1a1a1a;
  padding: 10px 14px;
  display: flex;
  gap: 8px;
  background: #0d0d0d;
}
.chat-input-area input {
  flex: 1; background: #111; border: 1px solid #2a2a2a; color: #c0c0c0;
  padding: 7px 10px; font-size: 13px; border-radius: 3px; outline: none;
}
.chat-input-area input:focus { border-color: #444; }
.chat-input-area button {
  background: #1a1a1a; border: 1px solid #333; color: #999; padding: 7px 14px;
  font-size: 13px; border-radius: 3px; cursor: pointer; transition: background 0.15s;
}
.chat-input-area button:hover { background: #222; color: #eee; }

.close-ticket-btn {
  background: #1a0000; border: 1px solid #330000; color: #884444;
  padding: 4px 10px; font-size: 11px; border-radius: 2px; cursor: pointer;
  text-decoration: none;
}
.close-ticket-btn:hover { background: #220000; color: #cc4444; }

/* My tickets list */
.my-tickets-section { margin-top: 28px; }
.my-tickets-section h3 { color: #888; font-size: 14px; margin-bottom: 10px; border-bottom: 1px solid #1a1a1a; padding-bottom: 6px; }
.ticket-row {
  background: #0d0d0d; border: 1px solid #1a1a1a; padding: 8px 12px;
  border-radius: 3px; margin-bottom: 4px; display: flex;
  justify-content: space-between; align-items: center;
}
.ticket-row a { color: #999; text-decoration: none; font-size: 13px; flex: 1; }
.ticket-row a:hover { color: #eee; }
.ticket-row-meta { color: #555; font-size: 11px; white-space: nowrap; margin-left: 10px; }
.login-to-support { color: #555; font-size: 13px; padding: 20px; text-align: center; background: #0d0d0d; border: 1px solid #1a1a1a; border-radius: 3px; }

/* =============================================
   TOS PAGE
   ============================================= */
.tos-page { max-width: 760px; margin: 30px auto; padding: 0 16px; }
.tos-page h1 { font-size: 22px; color: #d0d0d0; margin-bottom: 20px; border-bottom: 1px solid #1e1e1e; padding-bottom: 10px; }
.tos-page h2 { font-size: 15px; color: #c0c0c0; margin-bottom: 8px; margin-top: 20px; }
.tos-page p, .tos-page li { color: #888; font-size: 13px; line-height: 1.7; margin-bottom: 6px; }
.tos-page ul { padding-left: 20px; margin-bottom: 10px; }
.tos-page .tos-last-updated { color: #444; font-size: 11px; margin-bottom: 24px; }

/* =============================================
   MISC
   ============================================= */
.empty-state { text-align: center; padding: 40px; color: #444; font-size: 13px; }
.file-upload-label {
  display: block; background: #0d0d0d; border: 1px dashed #333; color: #666;
  padding: 12px; border-radius: 3px; cursor: pointer; font-size: 12px; text-align: center; transition: border-color 0.15s;
}
.file-upload-label:hover { border-color: #555; color: #999; }
input[type="file"] { display: none; }
.admin-only-notice { background: #0a0a0a; border: 1px solid #1a1a00; color: #666; font-size: 12px; padding: 8px 12px; border-radius: 3px; margin-bottom: 16px; text-align: center; }
.no-pastes { color: #444; font-size: 13px; padding: 20px; text-align: center; }
.btn-delete { background: #1a0000; border: 1px solid #330000; color: #884444; padding: 3px 8px; font-size: 11px; border-radius: 2px; text-decoration: none; cursor: pointer; }
.btn-delete:hover { background: #220000; color: #cc4444; }
.btn-pin { background: #1a1a00; border: 1px solid #333300; color: #886600; padding: 3px 8px; font-size: 11px; border-radius: 2px; text-decoration: none; margin-right: 4px; }
.btn-pin:hover { background: #222200; color: #ccaa00; }

/* =============================================
   MOBILE NAV — hamburger + drawer
   (hidden on desktop)
   ============================================= */
.nav-hamburger { display: none; }
.mobile-nav-drawer { display: none; }

/* =============================================
   MOBILE LAYOUT  ≤ 768px
   Desktop styles above are NEVER overridden —
   all rules here are inside this media query.
   ============================================= */
@media (max-width: 768px) {

  /* --- Nav: hide desktop links, show hamburger --- */
  nav .nav-links { display: none; }
  nav .nav-right  { display: none; }

  .nav-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    gap: 5px;
  }
  .nav-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #aaa;
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
  }
  /* X when open */
  .nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-hamburger.open span:nth-child(2) { opacity: 0; }
  .nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Mobile drawer */
  .mobile-nav-drawer {
    display: flex;
    flex-direction: column;
    background: #0d0d0d;
    border-bottom: 1px solid #1e1e1e;
    padding: 8px 0;
    position: sticky;
    top: 40px;
    z-index: 99;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .mobile-nav-drawer.open { max-height: 400px; }

  .mobile-nav-drawer a {
    color: #b0b0b0;
    text-decoration: none;
    padding: 11px 20px;
    font-size: 14px;
    border-bottom: 1px solid #141414;
    transition: background 0.15s, color 0.15s;
  }
  .mobile-nav-drawer a:hover,
  .mobile-nav-drawer a.active { background: #111; color: #fff; }

  .mobile-nav-divider {
    height: 1px;
    background: #222;
    margin: 4px 0;
  }
  .mobile-nav-user {
    color: #555;
    font-size: 12px;
    padding: 8px 20px 4px;
  }

  /* --- Ticket panel: full-width on mobile --- */
  #ticket-panel { width: 100%; left: -100%; }
  #ticket-panel.open { left: 0; }

  /* --- Hero logo: smaller on mobile --- */
  .demon-logo-wrap { width: 150px; height: 150px; }
  .demon-logo { width: 230px; height: 230px; }

  /* --- Search bar: full width --- */
  .search-bar { flex-direction: column; align-items: stretch; padding: 0 16px; }
  .search-bar input {
    width: 100%;
    border-right: 1px solid #333;
    border-radius: 3px 3px 0 0;
    border-bottom: none;
  }
  .search-bar button {
    border-radius: 0 0 3px 3px;
    width: 100%;
  }

  /* --- Container padding --- */
  .container { padding: 16px 12px; }

  /* --- Paste items: stack meta below title --- */
  .paste-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .paste-item .paste-meta {
    text-align: left;
    margin-left: 0;
    white-space: normal;
  }

  /* --- Users table: horizontal scroll --- */
  .users-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .users-table { min-width: 520px; }

  /* --- Forms: full width, less margin --- */
  .form-page { margin: 24px auto; }
  .add-paste-page { margin: 16px auto; }
  .paste-view { margin: 16px auto; }
  .wos-page { margin: 16px auto; }
  .support-page { margin: 16px auto; }
  .tos-page { margin: 16px auto; }

  /* --- Chat box: shorter max-height on small screens --- */
  .chat-box { max-height: 240px; }

  /* --- Ticket detail header: stack on mobile --- */
  .ticket-detail-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  /* --- Wall of shame post header: stack --- */
  .wos-post-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  /* --- Ticket rows: stack --- */
  .ticket-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .ticket-row-meta { margin-left: 0; white-space: normal; }

  /* --- Pagination: wrap tightly --- */
  .pagination { flex-wrap: wrap; gap: 4px; }

  /* --- Role select dropdown: full width --- */
  .role-select { width: 100%; margin-top: 4px; }

} /* end @media (max-width: 768px) */
