/* style.css — L5R themed with map center + mons sides */

:root{
  --ink: #14130f;
  --ink-soft: #2f2a22;

  /* darker overall page so mons show */
  --night: #0c0b09;
  --night-2: #12100d;

  /* parchment surfaces for UI panels */
  --paper: #f3eedf;
  --paper-2: #efe5cc;
  --paper-3: #e6d7b1;

  --seal: #8a1f1f;
  --jade: #2f6f5b;
  --gold: #8b6b2f;

  --line: rgba(20,19,15,0.22);
  --radius: 16px;
  --shadow: 0 12px 28px rgba(0,0,0,0.35);
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  font-family: Garamond, "EB Garamond", Georgia, "Times New Roman", serif;
  color: var(--paper);

  /* Dark base so mons and title have contrast */
  background:
    radial-gradient(1000px 600px at 20% 0%, rgba(138,31,31,0.18), transparent 55%),
    radial-gradient(900px 600px at 90% 10%, rgba(47,111,91,0.16), transparent 55%),
    linear-gradient(180deg, var(--night), var(--night-2));
}

/* --- Side mons (left + right), fixed behind everything --- */
body::before,
body::after{
  content:"";
  position: fixed;
  top: 0;
  bottom: 0;
  width: min(220px, 22vw);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

body::before{
  left: 0;
  background:
    url("Background/unicorn.png") 50% 0% / 140px no-repeat,
    url("Background/dragon.png")  50% 18% / 140px no-repeat,
    url("Background/crane.png")   50% 36% / 140px no-repeat,
    url("Background/crab.png")    50% 53% / 140px no-repeat,
    url("Background/lion.png")    50% 71% / 140px no-repeat,
    url("Background/phoenix.png") 50% 88% / 140px no-repeat,
    url("Background/scorpion.png")50% 105% / 140px no-repeat;
}


body::after{
  right: 0;
  background:
    url("Background/scorpion.png")50% 0% / 140px no-repeat,
    url("Background/phoenix.png") 50% 18% / 140px no-repeat,
    url("Background/lion.png")    50% 35% / 140px no-repeat,
    url("Background/crab.png")    50% 53% / 140px no-repeat,
    url("Background/crane.png")   50% 70% / 140px no-repeat,
    url("Background/dragon.png")  50% 87% / 140px no-repeat,
    url("Background/unicorn.png") 50% 105% / 140px no-repeat;
}


/* --- Main layout --- */
.container{
  position: relative;
  z-index: 1; /* above mons */
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 16px 28px;
}

/* --- Banner (parchment panel) --- */
.banner{
  border: 1px solid rgba(231,229,221,0.18);
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  box-shadow: var(--shadow);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04)),
    linear-gradient(180deg, rgba(243,238,223,0.18), rgba(230,215,177,0.10));
}

.banner-inner{
  padding: 14px 16px 14px;
  position: relative;
}

.title-row{
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.l5r-logo{
  height: 34px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.35));
}

.title-stack{
  display: grid;
  gap: 2px;
}

h1{
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.3px;
  color: var(--paper);
}

.subtitle{
  margin: 0;
  font-size: 13px;
  color: rgba(231,229,221,0.82);
}

.seal{
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(231,229,221,0.78);
}
.seal::before{
  content:"";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--seal);
  box-shadow: 0 0 0 3px rgba(138,31,31,0.20);
}

/* --- Filters panel (parchment panel) --- */
.toolbar{
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(231,229,221,0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04)),
    linear-gradient(180deg, rgba(243,238,223,0.14), rgba(230,215,177,0.08));
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
}

.toolbar-grid{
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.6fr 0.9fr auto;
  gap: 10px;
  align-items: end;
}

label{
  display: grid;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.2px;
  color: rgba(231,229,221,0.80);
}

input, select, button{
  border-radius: 12px;
  border: 1px solid rgba(231,229,221,0.18);
  padding: 10px 12px;
  font-size: 14px;
  background: rgba(0,0,0,0.22);
  color: var(--paper);
  outline: none;
  font-family: inherit;
}

input::placeholder{
  color: rgba(231,229,221,0.55);
}

input:focus, select:focus{
  border-color: rgba(47,111,91,0.60);
  box-shadow: 0 0 0 4px rgba(47,111,91,0.12);
}

button{
  cursor: pointer;
  border-color: rgba(138,31,31,0.45);
  background: linear-gradient(180deg, rgba(138,31,31,0.22), rgba(138,31,31,0.10));
}
button:hover{
  background: linear-gradient(180deg, rgba(138,31,31,0.30), rgba(138,31,31,0.14));
}
button:active{ transform: translateY(1px); }

/* counts */
.counts{
  margin: 12px 2px 10px;
  font-size: 13px;
  color: rgba(231,229,221,0.80);
}

/* --- Map behind the card grid --- */
/* We put the map as a pseudo-element on the grid container so it sits behind the cards */
.grid{
  position: relative;
  z-index: 1;

  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  align-items: start;

  padding: 14px;
  border-radius: calc(var(--radius) + 6px);
}

.grid::before{
  content:"";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: -1;

  /* crisp map, no dark veil */
  background: url("Background/Battle_for_Rokugan_Map.webp") repeat center top / 100% auto;

  border: 1px solid rgba(231,229,221,0.14);
  box-shadow: 0 18px 44px rgba(0,0,0,0.35);
}

/* --- Cards --- */
.card{
  border: 1px solid rgba(231,229,221,0.14);
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  background: rgba(0,0,0,0.22); /* slightly darker so text pops on bright map */
  box-shadow: 0 12px 26px rgba(0,0,0,0.32);
}

.thumb{
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
  background: rgba(0,0,0,0.10);
}

.meta{
  padding: 10px 12px 14px;
  display: grid;
  gap: 5px;
  font-size: 13px;
  color: red;
  border-top: 1px dashed rgba(231,229,221,0.18);
}

.meta strong{
  font-size: 14px;
  letter-spacing: 0.2px;
  color: black;
}

.pillrow{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.pill{
  border: 1px solid rgba(231,229,221,0.18);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  color: rgba(231,229,221,0.78);
  background: rgba(0,0,0,0.18);
}

/* --- Modal (zoom) --- */
.modal{
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.76);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 50;
}
.modal.open{ display: flex; }

.modal img{
  max-width: min(1100px, 96vw);
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 60px rgba(0,0,0,0.60);
}

.hint{
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  margin-top: 10px;
  text-align: center;
}

/* --- Mobile tweaks --- */
@media (max-width: 860px){
  .toolbar-grid{ grid-template-columns: 1fr 1fr; }
  .toolbar-grid button{ grid-column: 1 / -1; }

  /* reduce side mons so they don't crowd phone screens */
  body::before, body::after{
    opacity: 0.55;
    width: min(140px, 18vw);
  }

  .l5r-logo{ height: 30px; }
  .seal{ width: 100%; justify-content: flex-start; margin-top: 6px; }
}
