/* ===== Global ===== */
body.single-slot_game, html { background:#000 !important; }

.slotpage__bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

body.single-slot_game #wrapper,
body.single-slot_game .site,
body.single-slot_game .container,
body.single-slot_game .page-wrapper,
body.single-slot_game .row,
body.single-slot_game .large-12,
body.single-slot_game .entry-content,
body.single-slot_game .slotpage{
  background:transparent !important;
}

/* ===== Stage ===== */
.slotstage{ max-width:1600px; margin:0 auto; padding:28px 16px 84px; }
.slotstage__title{ text-align:center; color:#ffde00; font-size:28px; font-weight:800; letter-spacing:.5px; margin:8px 0 18px; }

.slotstage__wrap{ position:relative; width:fit-content; margin:0 auto; }
@media (min-width:1280px){ .slotstage__wrap{ transform:translateX(-60px); } }
@media (min-width:1024px) and (max-width:1279.98px){ .slotstage__wrap{ transform:translateX(-40px); } }
@media (max-width:1023.98px){ .slotstage__wrap{ transform:none; } }

/* Khung game 16:9 */
.slotstage__frame{
  width:clamp(920px,72vw,1250px);
  aspect-ratio:16/9;
  background:#000;
  box-shadow:0 0 0 12px #000;
  position:relative;
}
.slotstage__frame iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; display:block; }

/* Thông báo khi thiếu URL */
.slotstage__notice{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700; background:#1a001d; }

/* ===== Right panel ===== */
.slotstage__side {
    position: absolute;
    top: 0;
    right: -340px;
    width: 300px;
    height: 100%;
    padding: 18px 14px 24px;
    background: linear-gradient(180deg, #4CAF50 0%, #009688 100%);
    border-radius: 20px;
    box-shadow: 0 0 0 12px #8BC34A;
    transition: transform .4s 
ease;
}
.slotstage__side.is-open{ transform:translateX(-340px); }

.side__tabs{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:10px; }
.side__tab {
    background: #FFC107;
    color: #ffffff;
    font-weight: 700;
    border-radius: 10px;
    padding: 8px 10px;
    border: 0;
}
.side__tab--active {
    background: #006b04;
    color: #CDDC39;
}
.side__list{ display:grid; gap:6px; max-height:calc(100% - 60px); overflow:auto; }
.side__row{ display:grid; grid-template-columns:40px 1fr auto; align-items:center; background:#0003; color:#fff; border-radius:12px; padding:8px 10px; font-weight:700; }
.side__place{ text-align:center; }
.side__name{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:0 6px; }
.side__points{ display:flex; align-items:center; gap:6px; color:#e65aa4; }

/* Toggle panel */

/* ===== Description ===== */
.slotdesc{ padding:44px 16px 70px; background:transparent; }
.slotdesc__inner{ max-width:980px; margin:0 auto; color:#e9e2f4; font-size:18px; line-height:1.7; }
.slotdesc__title{ font-size:36px; font-weight:900; line-height:1.2; margin:0 0 14px; color:#fff; letter-spacing:.3px; }
.slotdesc__text{ position:relative; overflow:hidden; transition:max-height .3s ease; }
.slotdesc__text.is-collapsed{ max-height:220px; }
.slotdesc__text.is-collapsed:after{
  content:""; position:absolute; left:0; right:0; bottom:0; height:90px;
  background:linear-gradient(180deg,rgba(0,0,0,0) 0%,rgba(0,0,0,.65) 70%,rgba(0,0,0,.9) 100%);
  pointer-events:none;
}
.slotdesc__toggle{
  margin:14px auto 0; display:inline-flex; align-items:center; justify-content:center;
  padding:8px 22px; font-family:"Yanone Kaffeesatz",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  font-weight:800; font-size:20px; color:#fff; cursor:pointer;
  background:linear-gradient(180deg,#ff4eb9 0%,#b90f55 100%) padding-box,
             linear-gradient(180deg,#ffd85a 0%,#ff7800 100%) border-box;
  border:3px solid transparent; border-radius:14px; box-shadow:0 6px 0 rgba(125,11,84,.8);
}
.slotdesc__toggle .hide{ display:none; }
.slotdesc__text:not(.is-collapsed) ~ .slotdesc__toggle .show{ display:none; }
.slotdesc__text:not(.is-collapsed) ~ .slotdesc__toggle .hide{ display:inline; }

/* ===== Fullscreen ===== */
#slotFsBtn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 3px solid transparent;
    cursor: pointer;
    z-index: 5;
    background: linear-gradient(180deg, #4CAF50 0%, #009688 100%) padding-box, linear-gradient(180deg, #ffd85a 0%, #ff7800 100%) border-box;
    box-shadow: 0 0px 0 #4CAF50, inset 0 0 10px rgba(255, 73, 191, .15);
}
#slotFsBtn::before{ content:"⤢"; font-size:20px; color:#fff; line-height:1; display:block; text-align:center; }
#slotFsBtn[data-state="exit"]::before{ content:"✕"; }

/* Ẩn bớt khi fullscreen để tập trung chơi */
.is-slot-fs .slotstage__title,
.is-slot-fs #slotSide,
.is-slot-fs .slotdesc{ display:none !important; }

/* Fullscreen API */
#slotFrameWrap:fullscreen,
#slotFrameWrap:-webkit-full-screen{
  width:100vw; height:100vh; box-shadow:none; background:#000;
}
#slotFrameWrap:fullscreen #slotFsBtn,
#slotFrameWrap:-webkit-full-screen #slotFsBtn{
  position:fixed; top:14px; right:14px;
}

/* Fallback pseudo fullscreen */
.is-pseudo-fs #slotFrameWrap{
  position:fixed; inset:0; width:100vw; height:100vh; z-index:9999; box-shadow:none; background:#000;
}
.is-pseudo-fs #slotFsBtn{ position:fixed; top:14px; right:14px; z-index:10000; }
.is-pseudo-fs, .is-pseudo-fs body{ overflow:hidden; }

/* ===== Responsive ===== */
@media (max-width:768px){
  .slotstage{ padding:16px 0 64px; }
  .slotstage__title{ font-size:22px; margin:6px 0 10px; }
  .slotstage__frame{ width:100vw; box-shadow:none; }
  .slotstage__toggle, .slotstage__side{ display:none; }
  .slotdesc__title{ font-size:28px; }
  .slotdesc__inner{ font-size:16px; }
}
/* Ẩn nút fullscreen trên mobile / thiết bị cảm ứng */
@media (max-width: 1024px), (hover: none) {
  #slotFsBtn { display: none !important; }
}
