:root{
  --gold:#d1aa3a;
  --gold2:#f7d77a;
  --panel:#2b2217;
  --cell:#3a2b1b;
  --cell2:#4a3620;
  --green:#25ff7a;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family: "Segoe UI", Arial, sans-serif;
  background:#0b0b0b;
  color:#fff;
}

.page{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,.2) 0%, rgba(0,0,0,.85) 60%, rgba(0,0,0,1) 100%);
}

.boardWrap{
  width:min(980px, 95vw);
  padding:18px;
  border-radius:18px;
  background:linear-gradient(180deg, rgba(63,49,32,.92), rgba(25,18,10,.92));
  box-shadow:0 25px 80px rgba(0,0,0,.55);
  border:4px solid rgba(209,170,58,.45);
  position:relative;
}

.title{
  text-align:center;
  font-weight:900;
  letter-spacing:.4px;
  margin:6px 0 14px;
  text-shadow:0 2px 0 rgba(0,0,0,.6);
}

.board{
  width:720px;
  max-width:90vw;
  margin:0 auto;
  padding:18px;
  border-radius:16px;
  border:4px solid rgba(209,170,58,.6);
  background:rgba(20,14,9,.55);
  display:grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap:14px;
  position:relative;
}

.cell{
  background:linear-gradient(180deg, rgba(74,54,32,.92), rgba(50,36,22,.92));
  border:3px solid rgba(209,170,58,.55);
  border-radius:12px;
  height:92px;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  overflow:hidden;
}

.cell::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, rgba(255,255,255,.08), rgba(0,0,0,0));
  pointer-events:none;
}

.cell.active{
  border-color: rgba(37,255,122,.95);
  box-shadow:0 0 0 3px rgba(37,255,122,.25), 0 0 24px rgba(37,255,122,.35);
}

.cell.flash{
  animation: flash 0.22s linear;
}
@keyframes flash{
  0%{ filter:brightness(1.0) }
  50%{ filter:brightness(1.55) }
  100%{ filter:brightness(1.0) }
}

.icon{
  width:60px;
  height:60px;
  image-rendering: pixelated;
}

.badge{
  position:absolute;
  right:8px;
  bottom:6px;
  background:rgba(0,0,0,.55);
  border:2px solid rgba(209,170,58,.65);
  color:#fff;
  font-weight:800;
  padding:2px 6px;
  border-radius:10px;
  font-size:12px;
}

.center{
  grid-row:2 / span 3;
  grid-column:2 / span 3;
  border-radius:14px;
  border:4px solid rgba(209,170,58,.65);

  /* NỀN ẢNH BÊN TRONG */
  background:
    linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.55)),
    url("./assets/inner-bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:16px;
}

.btn{
  width:min(420px, 90%);
  height:54px;
  border:none;
  border-radius:14px;
  font-weight:900;
  letter-spacing:1px;
  cursor:pointer;
  background:linear-gradient(180deg, var(--gold2), var(--gold));
  box-shadow:0 8px 26px rgba(0,0,0,.35);
}

.btn:disabled{
  opacity:.65;
  cursor:not-allowed;
}

.result{
  width:min(420px, 90%);
  background:rgba(0,0,0,.35);
  border:2px solid rgba(255,255,255,.12);
  border-radius:12px;
  padding:10px 12px;
  white-space:pre-line;
  font-weight:700;
}

/* Popup */
.overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.65);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:9999;
}
.modal{
  width:min(560px, 92vw);
  border-radius:14px;
  background:rgba(30,30,30,.95);
  border:2px solid rgba(255,255,255,.12);
  box-shadow:0 18px 60px rgba(0,0,0,.6);
  overflow:hidden;
}
.modalHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  background:rgba(0,0,0,.35);
}
.modalTitle{
  font-weight:900;
}
.closeBtn{
  border:none;
  background:rgba(255,255,255,.08);
  color:#fff;
  padding:8px 12px;
  border-radius:10px;
  cursor:pointer;
  font-weight:800;
}
.winBox{
  display:flex;
  gap:14px;
  padding:16px;
  align-items:center;
}
.bigIconWrap{
  width:92px;height:92px;
  border-radius:14px;
  background:rgba(0,0,0,.35);
  border:2px solid rgba(209,170,58,.6);
  display:flex;align-items:center;justify-content:center;
}
.bigIcon{
  width:78px;height:78px;
  image-rendering: pixelated;
}
.winLine1{
  font-weight:900;
  color: var(--gold2);
  margin-bottom:6px;
}
.winLine2{
  font-weight:800;
}