/* /css/style.css */

/* ---------- Fonts ---------- */
@font-face{
  font-family: "New Rocker";
  src: url("/css/fonts/NewRocker-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "Pangolin";
  src: url("/css/fonts/Pangolin-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "Merriweather";
  src: url("/css/fonts/Merriweather-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "Lato";
  src: url("/css/fonts/Lato-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "Lato Bold";
  src: url("/css/fonts/Lato-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "Lato Light";
  src: url("/css/fonts/Lato-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* ---------- Root / Variables ---------- */
:root{
  --sidebar-w: 260px;

  --topbar-h: 36px;        /* thin bar */
  --titlebar-h: 72px;     /* hateBrad title bar */
  --header-h: calc(var(--topbar-h) + var(--titlebar-h));

  --main-drop: 50px;     /* extra drop below fixed header */
  --page-pad-x: 16px;
}

/* ---------- Base ---------- */
html, body{
  height: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background: #000;
}

body{
  background: var(--content-color);
  color: #ddd;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  margin: 0;
  font-family: "Lato", system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Links */
a{
  color: var(--primary-color);
  text-decoration: none;
}
a:hover{
  color: #ff4d4d;
/*  text-shadow:
    -1px -1px 0 #000,
     1px -1px 0 #000,
    -1px  1px 0 #000,
     1px  1px 0 #000; */
}
a:active{ color: var(--a-color-active); }
a:visited{ color: var(--a-color-visted); }
a:visited:hover{ color: var(--a-color-hover); }
a:visited:active{ color: var(--a-color-vistact); }

/* ---------- App wrapper (from includes/header.php) ---------- */
.app{
  min-height: 100vh;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.app-content{
  flex: 1;
  display: flex;
  flex-direction: column;
  flex-grow: 1;

  /* reserves space for fixed bars + your desired 200px drop */
  padding-top: calc(var(--header-h) + var(--main-drop));
}

.app-content > main{
  flex: 1;
  min-height: 0;
}
/* ### CONTENT REFLOW FOR SIDEBAR ### */
/* Desktop only: when the sidebar is open, push content right to clear it.
   When it's closed (.closed), the rule stops matching and content fills the width. */
@media (min-width: 769px) {
  .app-content {
    transition: padding-left 0.25s ease;   /* matches the sidebar's slide speed */
  }
  #sidebar:not(.closed) ~ .app .app-content {
    padding-left: var(--sidebar-w);
  }

  /* ### title shifts with content, topbar stays put ### */
  .titlebar {
    transition: padding-left 0.25s ease;
  }
  body:has(#sidebar:not(.closed)) .titlebar {
    padding-left: var(--sidebar-w);
  }
}
/* ### GUTTER / PAGE BACKGROUND ### */
/* Dark grungy texture behind the content. Lives on .app so it fills the
   gutters around the centred card. Self-contained SVG noise - no image file needed. */
.app {
  background-color: var(--bg-color);
  background-image:
    radial-gradient(ellipse at 50% 0%,   rgba(255,255,255,0.03), transparent 55%),  /* faint top sheen */
    radial-gradient(ellipse at 50% 120%, rgba(0,0,0,0.55),       transparent 60%),  /* dark vignette at bottom */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");  /* grain */
}
/* ---------- Top Bar (thin top bar) ---------- */
.topbar{
  position: fixed;
  inset: 0 0 auto 0; /* top:0 left:0 right:0 */
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--page-pad-x);
  background: var(--topbar-bg, #000);
  color: var(--topbar-text, #ccc);
  border-bottom: 1px solid #1a1a1a;
  z-index: 2500;
}

.topbar-left{
  min-width: 200px;
  display: flex;
  align-items: center;
}

.topbar-right{
  display: flex;
  gap: 16px;
  padding-right: 10px;
  align-items: center;
}

.topbar a{
  color: var(--topbar-text, #ccc);
  font-size: 0.95rem;
}
.topbar a:hover{ color: var(--primary-color); }

/* ---------- Title Bar (title + hamburger) ---------- */
.titlebar{
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  right: 0;
  height: var(--titlebar-h);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2500;
  background-color: var(--titlebar-bg, #000);
  color: var(--titlebar-text, whitesmoke);
  padding-bottom: 25px;
  background-image: var(--titlebar-image, none);
  background-repeat: no-repeat;
  background-position: center top;
}

.titlebar h1{
  margin: 0;
  line-height: 1;
  padding-top: 15px; /* padding between the title and the topbar */
}

.titlebar h1 a{
  font-family: "New Rocker", cursive;
  font-weight: 400;
  font-size: clamp(3.2rem, 5vw, 4.4rem);
  letter-spacing: 0.08em;
  color: var(--titlebar-text, whitesmoke);
  /* ### Underline driven by Appearance > Title Underline Style ### */
  text-decoration-line: var(--title-deco-line, underline);   /* underline, or 'none' when None is selected */
  text-decoration-style: var(--title-deco-style, wavy);      /* solid / wavy / dotted / dashed / double */
  text-decoration-color: var(--primary-color);               /* follows your primary colour */
  text-decoration-thickness: 0px;
}

.menu-icon{
  cursor: pointer;
  white-space: nowrap;
}

/* ---------- Sidebar ---------- */
.sidebar{
  position: fixed;
  top: 0;
  left: calc(-1 * var(--sidebar-w));
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar-bg, #000);
  border-right: 1px solid #111;
  box-shadow: 8px 0 24px rgba(0,0,0,0.55);
  transition: left 0.25s ease;
  z-index: 2400;

}

.sidebar.open{ left: 0; }

/* Desktop: start open unless manually closed */
@media (min-width: 769px) {
  .sidebar:not(.closed){ left: 0; }
}

.sidebar ul{
  list-style: none;
  margin: 0;
  padding: calc(var(--header-h) + 40px) 0 60px 0;
}

.sidebar li{ margin: 0; padding: 0; line-height: 1; }

.sidebar a{
  display: block;
  padding: 8px 18px;
  color: var(--sidebar-text, #ddd);
  font-size: 0.95rem;
  font-family: "Lato", system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  border-left: 3px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sidebar a:hover{
  background: var(--primary-color, #333);
  color: #fff;
  border-left-color: var(--primary-color);
}

.sidebar a:focus-visible{
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.sidebar a.active{
  background: rgba(220, 20, 60, 0.18);
  border-left-color: var(--primary-color);
  color: var(--primary-color);
}



/* ---------- Main Content (default pages) ---------- */
main{
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0 var(--page-pad-x) 24px;
}

/* ---------- Form focus ---------- */
input:focus{
  border: 2px solid var(--primary-color);
  outline: 2px solid var(--primary-color);
}

/* ---------- Register Card ---------- */
.register-card{
  background: var(--card-bg, #333);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 0 20px #000;
  max-width: 500px;
  width: 100%;
  color: var(--card-text, #ccc);
}

.register-card h2{
  margin: 0 0 32px 0;
  font-size: 2.2rem;
  letter-spacing: 0.15em;
  text-align: center;
  color: whitesmoke;
}

/* ---------- Login Layout ---------- */
.login-layout{
  display: flex;
  gap: 40px;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
}

.login-form{
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 250px;
}

.login-form input,
.login-form button{
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: none;
  border-radius: 5px;
  font-size: 1em;
}

.login-form input{
  background: #fdf7c4;
  color: #111;
  font-family: "Lato", system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.login-form button{
  background: var(--primary-color);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s;
}

.login-form button:hover{
  background: darkred;
  text-shadow:
    -1px -1px 0 #000,
     1px -1px 0 #000,
    -1px  1px 0 #000,
     1px  1px 0 #000;
}

/* Show Password */
.show-password{
  align-self: flex-start;
  font-size: 0.9em;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.login-form input[type="checkbox"]{
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary-color);
  cursor: pointer;
}

/* Login info panel */
.login-info{
  max-width: 250px;
  color: #ccc;
  font-size: 0.9em;
  font-family: "Lato", sans-serif;
}

.error{
  width: 100%;
  background: #3a0b0b;
  border: 1px solid #7a1b1b;
  color: #ffd6d6;
  padding: 10px 12px;
  border-radius: 6px;
  margin: 0 0 12px 0;
  font-size: 0.95em;
  font-family: "Lato", sans-serif;
}

/* ---------- Content Card (dashboard etc.) ---------- */
.content-card{
  background: var(--card-bg, #333);
  padding: clamp(24px, 3vw, 48px);
  border-radius: 12px;
  box-shadow: 0 0 20px #111;
  width: min(90vw, 1200px);
  margin: 0 auto;
  color: var(--card-text, #ccc);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--footer-bg, #000);
  color: var(--footer-text, #f2f2f2);
  text-align: center;
  padding: 10px 0;
  font-size: 0.9em;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  margin: 0;
  z-index: 10000;
}

/* ---------- Cookie Toast ---------- */
#cookie-toast{
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: #222;
  color: #fff;
  padding: 15px 25px;
  border-radius: 10px;
  box-shadow: 0 0 10px #000;
  font-family: sans-serif;
  transition: bottom 0.5s ease;
  z-index: 10001;
}
#cookie-toast.show{ bottom: 30px; }
#cookie-toast button{
  margin-left: 15px;
  padding: 5px 12px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

/* ---------- Splash Screen (index.php only) ---------- */
main.splash{
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
  overflow: hidden;
}

.splash-container{
  width: 100%;
  height: 100%;
  position: relative;   /* enables absolute children */
}

/* Make the art scale to the viewport instead of forcing 920px */
.splash-logo{
  width: 100%;
  height: 100%;
  background-image: url("/assets/images/firesplash.png") !important;
  background-repeat: no-repeat !important;
  background-position: center top !important;
  background-size: contain !important; /* key change */
}

/* Always visible + centered */
.login-links{
  position: absolute;
  left: 50%;
  bottom: 14vh;                 /* adjust taste */
  transform: translateX(-50%);
  display: flex;                /* key change */
  gap: 24px;
  margin: 0;
  padding: 0;
  font-family: "Lato", sans-serif;
  font-size: clamp(1.3rem, 4vw, 2rem);
  justify-content: center;
  width: auto;
  text-align: center;
}


.login-links a{
  color: #cc0000;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.login-links a:hover{
  color: yellowgreen;
  text-shadow:
    -1px -1px 0 #000,
     1px -1px 0 #000,
    -1px  1px 0 #000,
     1px  1px 0 #000;
}

.or-text{
  margin: 0 8px;
  color: #ccc;
  font-weight: 400;
}

/* Override any container above splash causing gray gap */
body:has(main.splash) *:first-child {
  background: #000;
  margin: 0;
  margin-top: 0;
  margin-bottom: 0;
  margin-right: 0;
  margin-left: 0;
}


/* MOBILE splash optimization */
body:has(main.splash) .app-content{
  padding-top: 0 !important;
}

/* MOBILE OPTIMIZATION */
@media (max-width: 768px) {
  main.splash {
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    background: #000;
    overflow: hidden;
  }
 .splash-logo {
    width: 100vw;
    height: 920px;
    background-image: url("/assets/images/firesplash.png") !important;
    background-repeat: no-repeat !important;
    background-position: center top !important;
    background-size: 100% auto !important;
  }
  .login-links {
    width: 100vw;
    text-align: center;
    position: absolute;
    top: 46vh;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(1.3rem, 4vw, 2rem);
    display: flex;
    justify-content: center;
    gap: 24px;
  }
}
/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, 200px);
  gap: 10px;
  justify-content: center;
  padding: 20px;
}

.gallery img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  display: block;
  border: 1px solid #444;
  transition: filter 0.2s ease;
}

.gallery img:hover {
  filter: grayscale(100%);
}

@media (max-width: 768px) {
  .gallery {
    grid-template-columns: repeat(auto-fill, 150px);
    gap: 6px;
    padding: 10px;
  }
  .gallery img {
    width: 150px;
    height: 150px;
  }
}

/* ---------- Admin Deny Toast ---------- */
.admin-deny-toast {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  padding: 16px 32px;
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(255,69,0,0.9);
  z-index: 99999;
  opacity: 1;
  transition: opacity 1s ease;
  animation: flamepulse 0.5s infinite alternate;
  text-shadow: 0 0 8px #000;
}

@keyframes flamepulse {
  from { 
    background: linear-gradient(180deg, #ff4500, #8b0000);
    box-shadow: 0 0 20px rgba(255,69,0,0.8);
  }
  to { 
    background: linear-gradient(180deg, #ff6a00, #cc0000);
    box-shadow: 0 0 40px rgba(255,106,0,0.9);
  }
}
/* ---------- Header Role Badge ---------- */
.role-badge {
  font-family: "Lato Bold", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 5px;
  letter-spacing: 0.1em;
  display: inline-block;
  margin-top: 4px;
}
/* ---------- Mobile Header ---------- */
@media (max-width: 768px) {
  .topbar-greeting {
    font-size: 0.7rem;
    white-space: nowrap;
  }
  .topbar-right {
    gap: 10px;
  }
  .topbar-right a {
    display: none;
  }
  .topbar a {
    font-size: 0.8rem;
  }
.menu-icon {
    font-size: 0.75rem;
  }
  .titlebar h1 a {
    font-size: clamp(2rem, 8vw, 3.2rem);
  }
}
/* ---------- Clipboard Toast ---------- */
#clipboard-toast {
  position: fixed;
  bottom: 80px;
  right: 16px;
  background: #1a3a1a;
  border: 1px solid #2d5a2d;
  color: #7fbc7f;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
#clipboard-toast.show { opacity: 1; }
/* ---------- Number Input Spinner ---------- */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
}

input[type="number"] {
  -moz-appearance: textfield;
}
/* ========================================================= */
/* ### ADMIN SETTINGS PANEL ### */
/* ========================================================= */

/* Header row: title left, emergency lock right */
.set-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  flex-wrap:wrap;
}

/* Emergency lock toggle */
.lock-toggle{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:6px;
}
.lock-toggle-label{
  color:#999;
  font-size:0.75rem;
  font-weight:700;
  letter-spacing:0.08em;
}
.lock-select{
  padding:8px 16px;
  border-radius:6px;
  font-size:0.95rem;
  font-weight:700;
  border:1px solid #333;
  background:#1a1a1a;
  cursor:pointer;
}
.lock-select.is-live{ color:#27ae60; border-color:#27ae60; }
.lock-select.is-locked{ color:#fff; background:#d11; border-color:#d11; }

/* Pill tabs */
.set-tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:16px 0 24px;
}
.tab-pill{
  padding:8px 22px;
  border:none;
  border-radius:999px;
  cursor:pointer;
  font-size:0.9rem;
  font-weight:700;
  background:#1a1a1a;
  color:#999;
  transition:background 0.2s ease, color 0.2s ease;
}
.tab-pill:hover{ background:#262626; color:#ccc; }
.tab-pill.active{ background:var(--primary-color); color:var(--primary-text, #fff); }

/* Form fields */
.set-grid{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.set-grid-4{ display:grid; grid-template-columns:repeat(4, 1fr); gap:16px; }
.set-label{ display:block; color:#999; font-size:0.85rem; margin-bottom:4px; }
.set-input{
  width:100%;
  padding:8px;
  background:#1a1a1a;
  border:1px solid #333;
  border-radius:6px;
  color:#fff;
  box-sizing:border-box;
}
.set-section{
  color:var(--bg-text, #fff);
  border-bottom:1px solid #444;
  padding-bottom:6px;
  margin-top:24px;
}
.set-save-btn{
  background:var(--primary-color);
  color:var(--primary-text, #fff);
  border:none;
  padding:12px 32px;
  border-radius:6px;
  font-size:1rem;
  font-weight:700;
  cursor:pointer;
}

/* Toggle cards */
.set-card{ background:var(--panel-bg, #1a1a1a); border:1px solid rgba(128,128,128,0.3); border-radius:8px; padding:16px; }
.set-card-label{ display:block; color:var(--panel-text, #fff); font-size:1rem; font-weight:700; margin-bottom:8px; }
.set-select{
  width:100%;
  padding:8px;
  background:#1a1a1a;
  border:1px solid #333;
  border-radius:6px;
  color:#fff;
  box-sizing:border-box;
  font-size:1rem;
  font-weight:700;
}
.set-select.is-on{ color:#27ae60; }
.set-select.is-off{ color:#dc143c; }

/* Colour picker rows */
.set-color-row{ display:flex; gap:8px; align-items:center; }
.set-color-swatch{ width:48px; height:36px; border:none; background:none; cursor:pointer; }
.set-color-text{ flex:1; padding:8px; background:#1a1a1a; border:1px solid #333; border-radius:6px; color:#fff; }

/* Number stepper */
.num-stepper{ display:flex; align-items:center; }
.num-stepper button{
  background:#1a1a1a; border:1px solid #333; color:#fff;
  padding:8px 12px; cursor:pointer; font-size:1rem;
}
.num-stepper button:first-child{ border-right:none; border-radius:6px 0 0 6px; }
.num-stepper button:last-child{ border-left:none; border-radius:0 6px 6px 0; }
.num-stepper input{
  background:#1a1a1a; border:1px solid #333; border-left:none; border-right:none;
  color:#fff; padding:8px; text-align:center; width:80px; box-sizing:border-box;
}
/* ========================================================= */
/* ### GALLERY / STASH CARDS (moved from dashboard.php) ### */
/* ========================================================= */

/* masonry columns */
#masonry-grid { columns: 3; column-gap: 18px; }
@media (max-width: 900px) { #masonry-grid { columns: 2; } }
/* /css/style.css */
/* ### MOBILE GALLERY COMPACT ### - append at end of gallery section */
@media (max-width: 600px) {
  #masonry-grid { columns: 2; column-gap: 8px; }
  .stash-card { margin-bottom: 8px; }
  .stash-img-link img { max-height: 120px; object-fit: cover; }
  .stash-body { padding: 6px 8px 2px; }
  .stash-title { font-size: 0.9rem; margin-bottom: 3px; }
  .stash-author { font-size: 0.68rem; gap: 4px; }
  .stash-footer { padding: 5px 8px; margin-top: 5px; }
  .vote-btn { padding: 3px 7px; }
  .vote-btn svg { width: 13px; height: 13px; }
  .vote-score { font-size: 0.85rem; min-width: 14px; }
  .stash-meta { gap: 8px; font-size: 0.7rem; }
  .stash-meta svg { width: 12px; height: 12px; }
  /* /css/style.css */
  .stash-footer { flex-wrap: wrap; gap: 6px; }
  .stash-votes { gap: 5px; }
}

/* the card itself - grungy, slightly tilted, sticker feel.
   NOTE: overflow is NOT hidden here so the rugged ::before backing can poke out.
   The image gets its own overflow:hidden instead (see .stash-img-link). */
.stash-card {
  break-inside: avoid;
  margin-bottom: 18px;
  background: #1c1c1c;
  border: 2px solid #000;
  border-radius: 2px;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.6);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  position: relative;
  isolation: isolate;          /* keeps the ::before backing layering predictable */
}
/* card lifts on hover; the rugged primary-colour block is a separate layer behind it */
.stash-card:hover {
  transform: rotate(-0.6deg) translateY(-2px);
  box-shadow: 4px 4px 0 rgba(0,0,0,0.6);   /* keep the normal dark drop only */
}

/* ### RUGGED HOVER BACKING ### - torn primary-colour block, shows on hover only.
   feTurbulence + feDisplacementMap (#rugged filter, defined in dashboard.php) tears
   just this layer; the card body and image stay clean. */


/* ### STANDARD BUTTON ### - one theme for every button site-wide */
.btn,
a.btn {
  display: inline-block;
  background: var(--primary-color);
  color: var(--primary-text, #fff);
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.15s ease;
}
.btn:hover,
a.btn:hover {
  color: var(--primary-text, #fff);
  text-shadow: none;
  filter: brightness(1.1);
}
/* ### + POST BUTTON ### - own hover so it ignores the global a:hover */
a.post-btn {
  background: var(--primary-color);
  color: var(--primary-text, #fff);
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: filter 0.15s ease;
}
a.post-btn:hover {
  color: var(--primary-text, #fff);   /* override global a:hover colour */
  text-shadow: none;                   /* kill the global outline */
  filter: brightness(1.1);             /* subtle lift instead */
}
/* ### VOTE FLASH ### - border flashes the vote colour then fades back */
.stash-card.flash-up   { animation: flashUp 0.5s ease-out; }
.stash-card.flash-down { animation: flashDown 0.5s ease-out; }

@keyframes flashUp {
  0%   { border-color: #27ae60; box-shadow: 0 0 14px #27ae60; }
  100% { border-color: #000;    box-shadow: 4px 4px 0 rgba(0,0,0,0.6); }
}
@keyframes flashDown {
  0%   { border-color: #dc143c; box-shadow: 0 0 14px #dc143c; }
  100% { border-color: #000;    box-shadow: 4px 4px 0 rgba(0,0,0,0.6); }
}

/* image clips to the card here (card itself no longer hides overflow) */
.stash-img-link { display: block; overflow: hidden; border-radius: 2px; }
.stash-img-link img {
  width: 100%;
  display: block;
  filter: contrast(1.05) saturate(1.05);
}
/* ### FULL-SCREEN VOTE FLASH ### - colour wash over the whole viewport, fades out */
#vote-flash {
  position: fixed;
  inset: 0;
  z-index: 99998;
  pointer-events: none;
  opacity: 0;
}
#vote-flash.go-up   { animation: screenFlashUp 0.45s ease-out; }
#vote-flash.go-down { animation: screenFlashDown 0.45s ease-out; }

@keyframes screenFlashUp {
  0%   { opacity: 0.5; background: #27ae60; }
  100% { opacity: 0;   background: #27ae60; }
}
@keyframes screenFlashDown {
  0%   { opacity: 0.5; background: #dc143c; }
  100% { opacity: 0;   background: #dc143c; }
}
.stash-body { padding: 10px 12px 4px; }
.stash-title {
  display: block;
  font-family: var(--title-font, "Lato"), sans-serif;   /* follow the global title font */
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: #ddd;
  line-height: 1.1;
  margin-bottom: 6px;
  text-decoration: none;
}
.stash-title:hover { color: #fff; }
.stash-author {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #888;
}

/* footer stats bar - dark strip, chunky */
.stash-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding: 8px 12px;
  background: #000;
  border-top: 5px solid #000;
}

.stash-votes { display: flex; align-items: center; gap: 8px; }
.vote-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: #161616;
  border: 2px solid #000;
  color: #888;
  padding: 5px 10px;
  border-radius: 2px;                       /* near-square, sticker feel */
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.6);    /* hard offset shadow like the cards */
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease, color 0.1s ease, border-color 0.1s ease;
}
.vote-btn svg {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor; stroke-width: 3;
  stroke-linecap: round; stroke-linejoin: round; display: block;
}
.vote-btn:hover { color: #fff; border-color: #333; transform: translateY(-1px); box-shadow: 3px 3px 0 rgba(0,0,0,0.6); }
.vote-btn:active { transform: translate(2px,2px); box-shadow: 0 0 0 rgba(0,0,0,0); }  /* press-in */
.vote-btn.voted-up   { background: #1a6b3c; border-color: #27ae60; color: #fff; box-shadow: 2px 2px 0 #0d3a20; }
.vote-btn.voted-down { background: #6b1a1a; border-color: #dc143c; color: #fff; box-shadow: 2px 2px 0 #3a0d0d; }

.vote-score { font-weight: 700; font-size: 0.95rem; color: #999; min-width: 18px; text-align: center; }
.score-pos { color: #27ae60; }
.score-neg { color: #dc143c; }

.stash-meta {
  display: flex;
  gap: 14px;
  font-size: 0.8rem;
  color: #888;
  text-decoration: none;
}
.stash-meta:hover { color: #ccc; }
.stash-meta span { display: inline-flex; align-items: center; gap: 5px; }
.stash-meta svg {
  width: 15px; height: 15px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
/* ### TOAST SYSTEM ### - unified notifications (success/error/warning/info) */
#toast-container {
  position: fixed; bottom: 24px; right: 16px; z-index: 99999;
  display: flex; flex-direction: column; gap: 10px;
  width: 340px; max-width: calc(100vw - 32px);
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: #1a1a1a; border: 1px solid #333; border-left: 5px solid #888;
  color: #ddd; padding: 12px 16px; border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.5);
  font-size: 0.92rem; line-height: 1.4;
  opacity: 0; transform: translateX(20px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast .toast-title { font-weight: 700; display: block; margin-bottom: 2px; }
.toast.success { border-left-color: #27ae60; }
.toast.success .toast-title { color: #3ddc84; }
.toast.error   { border-left-color: #dc143c; }
.toast.error   .toast-title { color: #ff5470; }
.toast.warning { border-left-color: #e67e22; }
.toast.warning .toast-title { color: #f5a623; }
.toast.info    { border-left-color: #3498db; }
.toast.info    .toast-title { color: #5dade2; }

@media (max-width:768px){
  .set-grid, .set-grid-4{ grid-template-columns:1fr; }
} 
/* ========================================================= */
/* ### CUSTOM COLOUR PICKER (.cpick) ### - reusable, centered modal popup */
/* ========================================================= */
.cpick { position: relative; }
.cpick-row { display: flex; gap: 8px; align-items: center; }
.cpick-swatch {
  width: 48px; height: 36px; border: 1px solid #333; border-radius: 6px;
  cursor: pointer; padding: 0;
}
.cpick-hex {
  flex: 1; padding: 8px; background: #1a1a1a; border: 1px solid #333;
  border-radius: 6px; color: #fff; font-family: monospace;
}
/* SV square + live preview side by side */
.cpick-pop-top { display: flex; gap: 12px; margin-bottom: 14px; }
.cpick-pop-top .cpick-sv { flex: 1; margin-bottom: 0; }   /* square takes remaining width */
.cpick-preview {
  width: 60px; flex-shrink: 0;            /* tall preview bar to the right of the square */
  border: 1px solid #333; border-radius: 4px;
}
/* popup panel - true centered modal with dim backdrop, ~50% bigger */
.cpick-pop {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5000;
  width: 330px; padding: 18px;
  background: #141414; border: 1px solid #333;
  border-radius: 10px;
  box-shadow: 0 0 0 100vmax rgba(0,0,0,0.6);   /* the dim backdrop behind it */
}
.cpick-pop[hidden] { display: none; }
/* saturation/value square */
.cpick-sv {
  position: relative; width: 100%; height: 210px; border-radius: 4px;
  cursor: crosshair; margin-bottom: 14px;
  background:
    linear-gradient(to top, #000, transparent),
    linear-gradient(to right, #fff, transparent);
}
.cpick-sv-dot {
  position: absolute; width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid #fff; box-shadow: 0 0 0 1px #000;
  transform: translate(-50%, -50%); pointer-events: none;
}
/* hue slider */
.cpick-hue {
  position: relative; width: 100%; height: 20px; border-radius: 4px;
  cursor: pointer; margin-bottom: 14px;
  background: linear-gradient(to right,
    #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
}
.cpick-hue-dot {
  position: absolute; top: -2px; width: 8px; height: 26px; border-radius: 3px;
  border: 2px solid #fff; box-shadow: 0 0 0 1px #000;
  transform: translateX(-50%); pointer-events: none;
}
/* preset chips */
.cpick-chips { display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; }
.cpick-chip {
  width: 100%; aspect-ratio: 1; border: 1px solid #333; border-radius: 3px;
  cursor: pointer; padding: 0;
}
.cpick-chip:hover { border-color: #fff; }
/* ========================================================= */
/* ### GALLERY POST PAGE ### - styles pulled out of post.php */
/* ========================================================= */

/* small role-badge variant for posts + comments */
.role-badge.sm { font-size: 0.62rem; padding: 2px 6px; margin-left: 6px; margin-top: 0; }

/* breadcrumb */
.post-breadcrumb { margin-bottom: 16px; font-size: 0.85rem; }
.post-breadcrumb a { color: #999; }

/* layout: vote column + content side by side */
.post-layout { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }

/* vote column */
.post-vote { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 50px; }
.post-vote form { margin: 0; }
.post-vote-btn {
  background: none; border: none; cursor: pointer;
  font-size: 1.6rem; line-height: 1; color: #666;
  transition: color 0.12s ease;
}
.post-vote-btn.up.active   { color: #27ae60; }
.post-vote-btn.down.active { color: #dc143c; }
.post-vote-score { font-weight: 700; font-size: 1.1rem; color: #999; }
.post-vote-score.score-pos { color: #27ae60; }
.post-vote-score.score-neg { color: #dc143c; }

/* post content column */
.post-main { flex: 1; min-width: 280px; }
.post-main h2 { margin: 0 0 8px 0; }
.post-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 16px; color: #999; font-size: 0.85rem;
}
.post-meta .author { color: var(--content-color); font-weight: 700; }
.post-img { max-width: 100%; border-radius: 10px; border: 1px solid #333; display: block; }
.post-desc { margin-top: 16px; color: var(--content-color); line-height: 1.6; }

/* mod controls - tight bold icon buttons, sit on the right of the meta line */
.post-meta .mod-actions {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: auto;            /* push to the far right of the meta row */
}
.mod-actions form { margin: 0; }
.mod-tag {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em;
  color: #777; padding-right: 2px;
}
.mod-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: transparent; border: 1px solid currentColor; border-radius: 6px;
  padding: 4px 10px; line-height: 1; cursor: pointer;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  transition: background 0.15s ease, color 0.15s ease;
}
.mod-pill svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mod-pill.hide    { color: #aaa; }
.mod-pill.delete  { color: #e0455e; }
.mod-pill.restore { color: #2ecc71; }
.mod-pill.hide:hover    { background: #aaa;    color: #111; }
.mod-pill.delete:hover  { background: #e0455e; color: #111; }
.mod-pill.restore:hover { background: #2ecc71; color: #111; }
.mod-status { font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; }
.mod-status.deleted { color: #e0455e; }
.mod-status.hidden  { color: #e67e22; }

/* mod pill: remove + removed status (merged moderation action) */
.mod-pill.remove { color: #e0455e; }
.mod-pill.remove:hover { background: #e0455e; color: #111; }
.mod-status.removed { color: #e0455e; }

/* comments */
.comments-section { margin-top: 32px; }
.comments-head {
  color: #999; font-size: 0.9rem; text-transform: uppercase;
  letter-spacing: 0.1em; margin-bottom: 16px;
}
.comments-empty { color: #999; }
.comment-form { margin-bottom: 24px; }
.comment-input {
  width: 100%; padding: 10px; background: #1a1a1a; border: 1px solid #333;
  border-radius: 6px; color: #fff; font-family: inherit; font-size: 0.95rem;
  box-sizing: border-box; resize: vertical;
}

.comment { margin-bottom: 12px; background: #2a2a2a; border-radius: 8px; padding: 12px; }
.comment.reply { border-left: 2px solid var(--primary-color); }
.comment-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.comment-author { font-weight: 700; color: var(--content-color); font-size: 0.9rem; }
.comment-time { color: #999; font-size: 0.75rem; }
.comment-body { color: var(--content-color); font-size: 0.9rem; line-height: 1.5; margin-bottom: 8px; }
.comment-reply-btn { background: none; border: none; color: var(--primary-color); font-size: 0.8rem; cursor: pointer; padding: 0; }
.reply-form { display: none; margin-top: 10px; }
.reply-input {
  width: 100%; padding: 8px; background: #1a1a1a; border: 1px solid #333;
  border-radius: 6px; color: #fff; font-family: inherit; font-size: 0.85rem;
  box-sizing: border-box; resize: vertical;
}

/* ### GALLERY CLOSED NOTICE ### */
.gallery-closed { text-align: center; padding: 60px 20px; color: #999; }
.gallery-closed-icon { font-size: 3rem; margin-bottom: 12px; }
.gallery-closed h2 { color: #ccc; margin: 0 0 6px 0; }
.gallery-closed p { margin: 0; }

/* ### GALLERY TRASH ### */
.trash-list { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.trash-row {
  display: flex; align-items: center; gap: 14px;
  background: #1a1a1a; border: 1px solid #333; border-radius: 8px; padding: 10px;
}
.trash-thumb { flex-shrink: 0; display: block; }
.trash-thumb img {
  width: 64px; height: 64px; object-fit: cover;
  border-radius: 4px; border: 1px solid #333; display: block;
}
.trash-info { flex: 1; min-width: 0; }
.trash-title { display: block; font-weight: 700; color: #ddd; text-decoration: none; }
.trash-title:hover { color: #fff; }
.trash-sub { font-size: 0.8rem; color: #999; margin-top: 4px; }
.trash-actions { flex-shrink: 0; }
.trash-actions form { margin: 0; }
.dash-greeting {
  font-size: 1rem;          /* smaller than the old 1.4rem h1 — tweak to taste */
  font-weight: 700;
  color: var(--card-text, #ddd);
  line-height: 1.4;
}
/* ### STATS PAGE ### */
.stat-boxes { display: flex; gap: 16px; flex-wrap: wrap; margin: 16px 0 24px; }
.stat-box {
  flex: 1; min-width: 150px; background: var(--panel-bg, #1a1a1a); border: 1px solid rgba(128,128,128,0.3);
  border-radius: 8px; padding: 18px; text-align: center;
}
.stat-box .num { font-size: 2rem; font-weight: 700; color: var(--primary-color); line-height: 1; }
.stat-box .lbl { color: #999; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 6px; }

.stats-table { width: 100%; border-collapse: collapse; margin-top: 8px; background: var(--table-bg, transparent); border-radius: 8px; overflow: hidden; }
.stats-table th, .stats-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid rgba(128,128,128,0.25); font-size: 0.9rem; color: var(--table-text, inherit); }
.stats-table th { color: #999; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; }
.stats-table td.num, .stats-table th.num { text-align: right; font-variant-numeric: tabular-nums; }

.ipblock-form { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ipblock-form input[type=text] {
  flex: 1; min-width: 150px; padding: 8px; background: #1a1a1a;
  border: 1px solid #333; border-radius: 6px; color: #fff;
}
.blocked-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.blocked-row {
  display: flex; align-items: center; gap: 10px;
  background: #1a1a1a; border: 1px solid #333; border-radius: 6px; padding: 8px 12px;
}
.blocked-row .ip { font-family: monospace; color: #ddd; }
.blocked-row form { margin: 0; margin-left: auto; }
/* ### UA COPY BUTTON ### */
.ua-copy {
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 0.85rem;
  line-height: 1;
  border: 1px solid #555;
  border-radius: 4px;
  background: transparent;
  color: #aaa;
  cursor: pointer;
}
.ua-copy:hover { color: #fff; border-color: #888; }
/* ### THEME TOGGLE ### - day/night button in topbar-left */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--topbar-text, #ccc);
  transition: color 0.2s ease, transform 0.2s ease;
}
.theme-toggle:hover { transform: scale(1.1); filter: brightness(1.2); }
.theme-toggle svg {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  display: none;                      /* both hidden by default */
}
/* show the icon for the CURRENT theme */
[data-theme="night"] .theme-toggle .icon-moon { display: block; }
[data-theme="day"]   .theme-toggle .icon-sun  { display: block; }