:root{
  --bg:#141414;
  --bg-deep:#0f0f0f;
  --card:#1f1f1f;

  --text:#ffffff;
  --muted:#b0b0b0;

  --orange:#ff9f1a;
  --yellow:#e6c15a;

  --radius:16px;
}

/* ---------- Reset ---------- */

*{
  box-sizing:border-box;
}

a{
  text-decoration:none;
  color:inherit;
}

/* ---------- Body & animated background ---------- */

body{
  margin:0;
  font-family: system-ui, -apple-system, sans-serif;
  color:var(--text);
  background:
    radial-gradient(600px 600px at 20% 30%, rgba(255,159,26,.08), transparent 60%),
    radial-gradient(500px 500px at 80% 70%, rgba(230,193,90,.06), transparent 65%),
    radial-gradient(700px 700px at 50% 90%, rgba(255,159,26,.05), transparent 70%),
    var(--bg);
  animation: clubLights 90s linear infinite;
}

/* Slow, subtle movement */
@keyframes clubLights{
  0%{
    background-position:
      20% 30%,
      80% 70%,
      50% 90%;
  }
  50%{
    background-position:
      25% 35%,
      75% 65%,
      55% 85%;
  }
  100%{
    background-position:
      20% 30%,
      80% 70%,
      50% 90%;
  }
}

/* ---------- Layout ---------- */

.container{
  max-width:600px;
  margin:0 auto;
  padding:16px;
  padding-bottom:90px;
}

/* ---------- Typography ---------- */

h1{
  font-size:30px;
  margin:8px 0 18px;
  font-weight:600;
}

h2{
  font-size:22px;
  margin:22px 0 12px;
  font-weight:500;
  color:var(--yellow);
}

h3{
  font-size:18px;
  margin:0;
  font-weight:500;
}

.small{
  color:var(--muted);
  font-size:14px;
}

/* ---------- Grid ---------- */

.grid{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
}

/* ---------- Cards ---------- */

.card{
  background:var(--card);
  border-radius:var(--radius);
  overflow:hidden;
  cursor:pointer;
}

.card .body{
  padding:16px;
}

.thumb{
  height:140px;
  background-size:cover;
  background-position:center;
}

/* ---------- Inputs ---------- */

.searchbar{
  width:100%;
  padding:14px;
  border-radius:var(--radius);
  border:none;
  font-size:18px;
  margin-bottom:16px;
  background:#0f0f0f;
  color:var(--text);
}

.searchbar::placeholder{
  color:var(--muted);
}

.searchbar:focus{
  outline:none;
  box-shadow:0 0 0 2px rgba(255,159,26,.25);
}


.accentBtn{
  width:100%;
  padding:14px;
  border-radius:var(--radius);
  border:none;
  font-size:18px;
  margin-bottom:16px;
  background:var(--orange);
  color:var(--text);
    
}


/* ---------- Bottom navigation ---------- */

.bottom-nav{
  position:fixed;
  bottom:0;
  left:0;
  right:0;
  height:64px;
  background:#0d0d0d;
  display:flex;
  justify-content:space-around;
  align-items:center;
}

.bottom-nav a{
  color:var(--muted);
  font-size:14px;
  text-align:center;
}

.bottom-nav a.active{
  color:var(--orange);
}

/* ---------- Modal ---------- */

.modal-backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.8);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:10;
}

.modal{
  width:90%;
  max-width:480px;
  background:#0f0f0f;
  border-radius:20px;
  padding:24px;
  max-height:80vh;
  overflow-y:auto;
}

.modal h2{
  color:var(--yellow);
}

.modal-close{
  font-size:22px;
  color:var(--orange);
  float:right;
  cursor:pointer;
}

/* ---------- BAC counter ---------- */

.counter{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:22px;
  margin-top:10px;
}

.counter button{
  width:44px;
  height:44px;
  border:none;
  border-radius:50%;
  background:var(--orange);
  color:#000;
  font-size:22px;
  cursor:pointer;
}

.counter span{
  min-width:40px;
  text-align:center;
}


/* DICE */
.dice-grid{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  grid-template-rows:repeat(3, auto);
  gap:16px;
}

/* Dice */
.die{
  position:relative;
  background:var(--card);
  border-radius:var(--radius);
  height:110px;
  display:flex;
  align-items:center;
  justify-content:center;

  /* WHITE OUTLINE */
  border:2px solid var(--text);
}

/* Dice face (pips grid) */
.die-face{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  grid-template-rows:repeat(3, 1fr);
  width:70px;
  height:70px;
  gap:6px;
}

/* Pips */
.pip{
  width:10px;
  height:10px;
  border-radius:50%;
  background:transparent;
}

.pip.on{
  background:var(--text);
}

.die-remove{
  position:absolute;
  top:6px;
  right:6px;

  width:22px;
  height:22px;
  border-radius:50%;

  background:var(--orange);
  color:#000;

  display:flex;
  align-items:center;
  justify-content:center;

  font-size:14px;
  font-weight:600;
  cursor:pointer;
}

.add-die{
  background:transparent;
  border:2px dashed var(--muted);
  color:var(--muted);
  cursor:pointer;

  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}

.add-plus{
  font-size:36px;
  line-height:1;
}
