/* /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: darkred; }
a:visited{ color: darkred; }
a:visited:hover{ color: #ff4d4d; }
a:visited:active{ color: darkred; }

/* ---------- 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;
}

/* ---------- 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: #000;
  border-bottom: 1px solid #1a1a1a;
  z-index: 2000;
}

.topbar-left{
  min-width: 200px;
}

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

.topbar a{
  color: #ccc;
  font-size: 0.95rem;
}
.topbar a:hover{ color: #fff; }

/* ---------- 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: #000;
  padding-bottom: 25px;
  background-image: url("/assets/images/firesplash.png") !important;
  background-repeat: no-repeat !important;
  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: whitesmoke;
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-color: var(--primary-color);
  text-decoration-thickness: 2px;
}

.titlebar .menu-icon{
  position: absolute;
  left: 18px;
  top: 8px;
  cursor: pointer;
}

/* ---------- Sidebar ---------- */
.sidebar{
  position: fixed;
  top: 0;
  left: calc(-1 * var(--sidebar-w));
  width: var(--sidebar-w);
  height: 100vh;
  background: #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: #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: rgba(220, 20, 60, 0.12);
  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: #fff;
}



/* ---------- 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: #333;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 0 20px #000;
  max-width: 500px;
  width: 100%;
  color: #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: #333;
  padding: clamp(24px, 3vw, 48px);
  border-radius: 12px;
  box-shadow: 0 0 20px #111;
  width: min(90vw, 1200px);
  margin: 0 auto;
  color: #ccc;
}

/* ---------- Footer ---------- */
.footer {
  background: #000;
  color: #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;
  }
  .titlebar .menu-icon {
    top: 2px;
    left: 10px;
    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;
}