/* -------------- Global Font & Centering -------------- */
@import url("https://fonts.googleapis.com/css2?family=Exo+2:wght@400;500;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Amarante&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Syne+Mono&display=swap");

:root {
  --primary-color: #c41721;
  --primary-font: "Exo 2", sans-serif;
  --primary-alt-color: #a0181f;
  --menu-open-bg: rgba(0, 0, 0, 0.85);
  --item-weapon: rgb(194, 1, 168);
  --item-healing: rgb(1, 117, 1);
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: "Exo 2", sans-serif;
  background: url("/assets/fleshmoonBG.png") no-repeat center center fixed;
  background-size: cover;
  color: #e0e0e0;
}

.site-frame {
  --site-frame-size: 20px;

  border: var(--site-frame-size) solid;
  border-image-source: url("/assets/svg/webpage-frame.png");
  border-image-slice: 29;
  border-image-repeat: repeat;

  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
}
/* Center all main section headers */
.dashboard h2 {
  text-align: center;
}

/* -------------- Center wrapper for login/signup forms -------------- */
.center-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

/* -------------- Generic form styling -------------- */
#login-form,
#signupForm {
  background: rgba(0, 0, 0, 0.75);
  mask-image: url("/assets/svg/mask-block-2.svg");
  mask-size: 100% 100%;
  padding: 2em;
  max-width: 400px;
  width: 90%;
  display: flex;
  flex-direction: column;
  gap: 1em;
  text-align: center;
}

#login-form a.extra,
#signupForm a.extra {
  color: white;
  text-decoration: none;
  text-align: end;
}

/* -------------- Text inputs -------------- */
input[type="text"],
input[type="password"] {
  padding: 0.75em;
  border: none;
  border-radius: 0.5em;
  background: #1c1f24;
  color: #eee;
  font-size: 1em;
}

/* -------------- Buttons -------------- */

/* -------------- Link-style buttons -------------- */
.alt-button {
  display: inline-block;
  margin-top: 1em;
  background: none;
  color: #00ffc3;
  text-decoration: underline;
  font-weight: bold;
  font-size: 1em;
}

.alt-button:hover {
  color: #ff0090;
}

/* -------------- Gear Shop Styles -------------- */
.gear-wrapper {
  max-width: 1000px;
  margin: 5vh auto;
  padding: 2em;
  background: rgba(0, 0, 0, 0.75);
  border-radius: 1rem;
  box-shadow: 0 0 20px #00ffc366;
  color: #e0e0e0;
}

.gear-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-buttons {
  text-align: center;
  margin-bottom: 1em;
}
.filter-buttons button {
  margin: 0 6px;
  padding: 0.5em 1em;
  background: #444;
  border: 1px solid #666;
  color: #eee;
  cursor: pointer;
}
.filter-buttons button.active {
  background: var(--primary-color);
}

.gear-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3.5em;
  margin-top: 1em;
}

.gear-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #111;
  border: 1px solid #00ffc366;
  border-radius: 1em;
  padding: 1em;
  text-align: center;
  box-shadow: 0 0 10px #00ffc322;
}

.gear-card img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5em;
}

.gear-card h3 {
  color: #00ffc3;
  margin-top: 0.5em;
}

.gear-card p {
  font-size: 0.9em;
  margin: 0.5em 0;
}

.gear-card form {
  margin-top: auto;
}

.gear-card button {
  width: 100%;
  margin-top: 0.5em;
  padding: 0.75em;
  font-size: 1em;
  background: #ff0090;
  border: none;
  border-radius: 0.5em;
  color: white;
  cursor: pointer;
}

.gear-card button:hover {
  background: #ff44aa;
}

/* -------------- Mission List Cards -------------- */
.mission-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5em;
  padding: 1em 0;
}

.mission-card {
  border: 1px solid;
  border-image: url("/assets/svg/mask-square.svg");
  border-image-slice: 1;
  border-image-repeat: round;
  padding: 1em;
  width: 220px;
  display: flex;
  flex-direction: column;
  position: relative;
  font-family: var(--primary-font);
}
.mission-card p {
  font-family: var(--primary-font);
  flex-grow: 1;
  font-size: 0.9rem;
}
.mission-card.completed {
  opacity: 0.8;
}
.mission-card h2 a {
  color: white;
  text-decoration: none;
}
.mission-card h2 {
  margin-top: 0;
  margin-bottom: 0;
  font-family: var(--primary-font);
}

.mission-card .status {
  position: absolute;
  top: 0;
  right: 0;
  padding: 3px 12px;
  background-color: green;
  mask-image: url("./assets/svg/mask-block.svg");
  mask-size: 100% 100%;
  margin-top: 0.5em;
  font-size: 0.85em;
  font-weight: bold;
  color: #fff;
}

.btn-1 {
  display: flex;
  justify-content: center;
  padding: 16px;
  background: var(--primary-color);
  mask-image: url("./assets/svg/mask-button.svg");
  mask-size: 100% 100%;
  text-decoration: none;
  cursor: pointer;
}
.btn-1.disabled,
.btn-1[disabled] {
  background: #313131;
  color: white;
  cursor: default;
}
.btn-1.disabled:hover,
.btn-1[disabled]:hover {
  background: #313131;
}
.btn-1:hover {
  background: var(--primary-alt-color);
}

.btn-1 span {
  color: white;
  text-decoration: none;
}

.btn-1 {
  color: white;
  text-decoration: none;
}
/* -------------- Mission Detail Centering & Progress Box -------------- */
body.mission-detail .dashboard {
  text-align: center;
}

body.mission-detail .mission-progress {
  text-align: center;
}

body.mission-detail .mission-progress form {
  display: inline-block;
  text-align: center;
  margin-top: 1em;
}
/* -------------- Dashboard Container -------------- */
.dashboard {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 1rem;
  text-align: center; /* center headers and buttons */
}

/* -------------- Admin Table Styling -------------- */
.dashboard table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem auto;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 0.5rem;
  overflow: hidden;
}
.dashboard th,
.dashboard td {
  padding: 0.75rem 1rem;
  text-align: left;
  color: #e0e0e0;
  border-bottom: 1px solid #00ffc366;
}
.dashboard tr:last-child td {
  border-bottom: none;
}

/* -------------- Button Styling -------------- */
.button {
  display: inline-block;
  padding: 0.5rem 1rem;
  margin: 0.25rem;
  background: #ff0090;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
}
.button:hover {
  background: #ff44aa;
}

/* Center nav and buttons */
.nav-bar {
  text-align: center;
  margin: 20px 0;
}
.nav-bar .btn {
  display: inline-block;
  margin: 0 8px;
}

/* Center main panels */
.panel,
main {
  text-align: center;
  width: 90%;
  margin: 0 auto;
}


header#main-nav {
  font-family: var(--primary-font);
}

.site-header {
  min-height: 90px;
  padding: 0 30px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 2;
}
/* Björn: Detta hanterar så att menyn ser bra ut i mobilt läge: */
.site-header.scrolled .navbar-background {
  background-color: var(--menu-open-bg);
  backdrop-filter: blur(10px);
}
.site-header.menu-open .navbar-background {
  background-color: var(--menu-open-bg);
  backdrop-filter: blur(10px);
}
/* Och här slutar det */

.navbar-background {
  position: absolute;
  top: 0;
  right: 0;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  transition: background-color 0.3s ease;
  backdrop-filter: none;
  z-index: -1;
  mask-size: 20% 200%;
  mask-repeat: no-repeat;
  mask-position: -2% 100%, 33% 100%, 67% 100%, 102% 100%;
}

.navbar-container {
  gap: 40px;
  display: flex;
  -webkit-box-align: center;
  align-items: center;
  width: 100%;
}

.navbar-logo {
  flex-basis: 0;
  flex-grow: 1;
  max-width: 100%;
  align-items: center;
  font-size: 32px;
}

.navbar-actions {
  flex-grow: 0;
  align-items: center;
  justify-content: flex-end;
  -webkit-box-pack: end;
}

.navbar-navigation {
  display: flex;
  align-items: stretch;
  flex-grow: 1;
}

.navbar-navigation .menu {
  list-style-type: none;
  display: flex;
  gap: calc(28px * 0.25) 30px;
  margin: 0;
}
.navbar-navigation .menu li {
  position: relative;
}

.navbar-navigation .menu li .notification {
  position: absolute;
  top: -15px;
  right: -15px;
  padding: 2px 8px;
  border-radius: 0%;
  background-color: var(--primary-color);
  text-align: center;
  font-size: 0.85rem;
  color: white;
  mask-image: url("./assets/svg/mask-block.svg");
  mask-size: 100% 100%;
}
.navbar-navigation .menu a {
  color: #eeeeee;
  text-decoration: none;
}

.navbar-navigation a:hover {
  color: var(--primary-color);
}
.navbar-actions a {
  color: white;
  text-decoration: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
}
.hamburger span {
  display: block;
  height: 3px;
  background-color: white;
  border-radius: 3px;
}

/* Mobilanpassning */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .navbar-navigation {
    position: absolute;
    top: 90px;
    left: 0;
    right: 0;
    background-color: var(--menu-open-bg);
    backdrop-filter: blur(10px);
    flex-direction: column;
    align-items: self-start;
    padding: 10px 20px;
    display: none !important;
  }
  .navbar-navigation .menu {
    row-gap: 12px;
    font-size: 1.5rem;
  }
  .navbar-navigation.active {
    display: flex !important;
  }

  .menu {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }
}

.dashboard-2 {
  mask-image: url("/assets/svg/mask-block-2.svg");
  mask-size: 100% 100%;
  background: rgba(0, 0, 0, 0.85);
  padding: 2rem 4rem 4rem 2rem;
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}
.mission-card {
  position: relative;
}
.mission-card::before {
  mask-image: url("/assets/svg/mask-block.svg");
}
.center-this {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
}

/* BELOW FIX LATER */
.wrap {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 40px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 12px;
  text-align: center;
}

/* local form override - kills global black bg */
form.inline {
  display: inline-block;
  background: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0;
}

/* buttons */
.btn {
  padding: 8px 18px;
  border: 1px solid #444;
  background: #585858;
  color: #eee;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.95rem;
}
.btn:hover {
  filter: brightness(1.15);
}
.pink {
  background: #ff009d;
  color: #fff;
}
.link-red {
  background: none;
  border: none;
  color: #ff6666;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.9rem;
}
.link-red:hover {
  color: #ff4444;
}

/* cards */
.big {
  display: inline-block;
  width: 300px;
  padding: 14px;
  border: 3px solid #ff009d;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  color: #e0e0e0;
}
.big img {
  width: 100%;
  border-radius: 5px;
  margin-bottom: 10px;
}
.big .name {
  font-size: 1.6rem;
  font-weight: 700;
}

.miniWrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin: 26px 0;
}
.mini {
  width: 170px;
  border: 1px solid #666;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.45);
  color: #e0e0e0;
  padding: 10px;
}
.mini img {
  width: 100%;
  border-radius: 5px;
  margin-bottom: 6px;
}
.mini .btn {
  width: 100%;
  margin-top: 6px;
  padding: 6px 8px;
  font-size: 0.82rem;
}
.kia {
  opacity: 0.45;
  border-color: #660000;
  background: #330000;
}

/* gear rows */

select {
  padding: 7px;
  font-size: 1rem;
}

/* hide toggled sections by default */
#createBox,
#otherOps,
#grave {
  display: none;
}

/* Grids */
.grid {
  display: grid;
  box-sizing: border-box;
}
.armory.grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 0 10px;
}

.armory .item {
  background: rgba(0, 0, 0, 0.842);
  display: flex;
  flex-direction: column;
  box-shadow: rgba(0, 0, 0, 0.4) 0px 8px 16px;
  mask-image: url("/assets/svg/mask-block-2.svg");
  mask-size: 100% 100%;
  padding: 20px;
  opacity: 1;
}
.armory .item .item-name {
  margin-bottom: 15px;
}

.armory .item .item-desc {
  padding: 10px;
  flex-grow: 1;
  background: rgba(0, 0, 0, 0.5);
}
.armory .item .title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.armory .item .cost {
  background: rgb(119, 66, 6);
  padding: 3px 14px;
  mask-image: url("/assets/svg/mask-block-2.svg");
  mask-size: 100% 100%;
  font-size: 0.9rem;
}

.armory .item .item-type {
  font-weight: 600;
}
.armory .item .item-type.Healing {
  color: var(--item-healing);
}
.armory .item .item-type.Weapon {
  color: var(--item-weapon);
}

.armory .item .image img {
  width: 100px;
  height: 100px;
}

.w-full {
  width: 100%;
}
.bg-white {
  min-width: 100vw;
  min-height: 100vh;
  background-color: #fff;
  padding: 4rem;
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 4rem;
  justify-content: stretch;
}
.box-1 {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  box-sizing: border-box; /* Fixes problem when corners are 1 pixels, should have been default but it was forgotten */
  mask-image: url("assets/svg/mask-block-2.svg");
  mask-size: 100% 100%;
}

.box-2 {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  box-sizing: border-box; /* Fixes problem when corners are 1 pixels, should have been default but it was forgotten */
  mask-image: url("assets/svg/mask-block.svg");
  mask-size: 100% 100%;
}

.border-1 {
  border: 1px solid;
  border-image: url("/assets/svg/mask-square.svg");
  border-image-slice: 1;
  border-image-repeat: round;
  box-sizing: border-box;
  padding: 2rem;
}
.w-33 {
  width: 33%;
}
.h-200 {
  height: 200px;
}

.bg-gray {
  background-color: var(--menu-open-bg);
}

/* Admin mission form styling */
.admin-form label {
  display: block;
  margin-top: 1em;
  font-weight: bold;
}
.admin-form input[type="text"],
.admin-form textarea {
  width: 100%;
  max-width: 600px;
  padding: 0.75em;
  margin-top: 0.25em;
  border: 1px solid #444;
  border-radius: 0.5em;
  background: #1c1f24;
  color: #eee;
  font-size: 1em;
}
.admin-form textarea {
  resize: vertical;
}
.admin-form button {
  margin-top: 1.5em;
}

/* Operator gear slot grid */
.slot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 20px 0;
}
.slot {
  width: 160px;
  text-align: center;
  border: 1px solid #666;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.45);
  color: #e0e0e0;
  padding: 10px;
}
.slot img {
  width: 100%;
  border-radius: 4px;
  margin-bottom: 6px;
}
.slot-label {
  font-weight: 700;
  margin-bottom: 4px;
}
.slot-name {
  font-size: 0.9rem;
  margin: 6px 0;
}

.unequip-form {
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}
.unequip-form .btn {
  padding: 6px 12px;
  font-size: 0.8rem;
}
.item-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.item-popup {
  background: #111;
  border: 1px solid #444;
  padding: 20px;
  max-width: 300px;
  text-align: center;
}

.item-popup img {
  width: 100%;
  border-radius: 4px;
  margin-bottom: 10px;
}



.map-key{display:flex;align-items:center;flex-wrap:wrap;gap:4em;margin-top:2em;}
.map-key .key-item{display:flex;align-items:center;gap:0.25em;}
.map-key img{max-width:120px;height:auto;}
.enemy-image{max-width:160px;height:auto;}

.img-overlay{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:rgba(0,0,0,0.85);
  display:flex;
  justify-content:center;
  align-items:center;
  z-index:10000;
}
.img-overlay .overlay-img{
  max-width:90%;
  max-height:90%;
  transition:transform 0.3s ease;
}
.img-overlay .rotate-btn{
  position:absolute;
  bottom:20px;
  right:20px;
  padding:0.5em 0.6em;
  background:#fff;
  color:#000;
  border:none;
  border-radius:50%;
  cursor:pointer;
  font-size:1.2em;
}

/* Team Gear grid styling */
.team-gear-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5em;
  margin-top: 2em;
}
.team-gear .gear-card img {
  max-width: 100%;
  height: auto;
}
.team-gear .gear-card.equipped {
  filter: grayscale(100%);
  opacity: 0.6;
}
.team-gear .equipped-label {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #ccc;
}

/* Document gallery */
.document-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  justify-content: center;
  margin-top: 1em;
}
.doc-thumb {
  width: 160px;
  height: 160px;
  overflow: hidden;
  border: 1px solid #555;
  display: block;
}
.doc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.doc-view img.full-doc {
  max-width: 100%;
  height: auto;
}
/* Landing page */
.landing-hero {
  text-align: center;
  padding: 4rem 1rem;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.landing-nav {
  display: flex;
  justify-content: flex-end;
  padding: 1rem;
}
.landing-login {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}
.landing-login input {
  margin-bottom: 0.5rem;
  padding: 0.5rem;
}
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.login-overlay.open {
  display: flex;
}
.login-modal {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  position: relative;
}
.close-overlay {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}
.info-section {
  text-align: center;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.slideshow {
  position: relative;
  max-width: 300px;
  margin: 1rem auto;
}
.slideshow .slide {
  display: none;
}
.slideshow .slide.active {
  display: block;
}
.slideshow img {
  width: 100%;
  height: auto;
}
.slideshow .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: #fff;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
}
.slideshow .nav.prev {
  left: 0;
}
.slideshow .nav.next {
  right: 0;
}
.slideshow-dots {
  text-align: center;
  margin-top: 0.5rem;
}
.slideshow-dots .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 4px;
  background: #ccc;
  border-radius: 50%;
  cursor: pointer;
}
.slideshow-dots .dot.active {
  background: #333;
}
.unlock-popup-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.78);
  padding: 1.5rem;
  z-index: 10000;
}

.unlock-popup {
  width: min(360px, 100%);
  background: #0d0d12;
  border: 1px solid rgba(0, 255, 195, 0.4);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.65);
}

.unlock-popup__image {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.unlock-popup__image[hidden] {
  display: none;
}

.unlock-popup__title {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  color: #f8f8f8;
}

.unlock-popup__message {
  margin: 0 0 0.75rem;
  color: #d4d4d4;
  line-height: 1.4;
}

.unlock-popup__detail {
  margin: 0 0 1.25rem;
  font-weight: 600;
  color: #00ffc3;
}

.unlock-popup__detail[hidden] {
  display: none;
}

.unlock-popup__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.unlock-popup__cta,
.unlock-popup__next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.unlock-popup__cta {
  background: #00ffc3;
  color: #04161a;
  border: none;
}

.unlock-popup__cta:hover {
  background: #20ffd1;
}

.unlock-popup__next {
  background: transparent;
  color: #f0f0f0;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.unlock-popup__next:hover {
  border-color: #ffffff;
  color: #ffffff;
}

body.unlock-popup-open {
  overflow: hidden;
}
