/* ==========================================================
   FLASH + GAMES (17 Nov 2026) — seksi 07 Flash & 10 Games di beranda.
   Berkas terpisah: style.css / s121.css / tema.css TIDAK diubah (/edukasi & uji S129
   membandingkan berkas itu). Tidak mendefinisikan token :root baru.
   Aturan Flash: NOL hijau — BUY/naik = emas, SELL/turun = salmon.
   CSP: tanpa atribut style; posisi dinamis lewat CSSOM di flash-games.js.
   ========================================================== */

/* ---------------- FLASH ---------------- */
.bab-flash { position: relative; overflow: hidden; color: var(--p-teks); }
.fl-cahaya {
  position: absolute; inset: -10% -20% auto auto; width: 760px; height: 560px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(229, 194, 124, .14), transparent 72%);
}
html[dir="rtl"] .fl-cahaya { inset: -10% auto auto -20%; }
/* teks bab Flash: netral hangat (token situs --gading/--redup condong hijau, terutama di tema terang) */
.bab-flash .judul-bab { color: var(--p-teks); }
.bab-flash .kapsi { color: var(--p-sub); }
.fl-grid { position: relative; display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (min-width: 960px) { .fl-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); } }

.fl-langkah { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; max-width: 560px; }
.fl-langkah li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: start; }
.fl-langkah-no {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--serif); font-size: 1.25rem; font-weight: 600; color: var(--s-di-emas);
  background: var(--s-emas-grad); box-shadow: 0 8px 22px -10px rgba(212, 178, 106, .7);
}
.fl-langkah b { display: block; color: var(--p-teks); font-size: 1.02rem; margin: 2px 0 2px; }
.fl-langkah p { margin: 0; color: var(--p-sub); font-size: .95rem; line-height: 1.6; }

.fl-paket {
  margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
  padding: 14px 18px; border-radius: 16px; border: 1px dashed var(--s-garis); max-width: 560px;
}
.fl-paket p { margin: 0; color: var(--p-teks); font-weight: 600; font-size: .95rem; flex: 1 1 220px; }

.fl-panggung { min-width: 0; }
.fl-app { padding: 18px; border-radius: 26px; max-width: 440px; margin-inline: auto; }
.fl-app-kepala { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.fl-app-kepala > b { font-family: var(--serif); font-size: 1.35rem; color: var(--p-teks); letter-spacing: .02em; }
.fl-petir { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--s-emas-grad); flex: 0 0 auto; }
.fl-petir svg { width: 18px; height: 18px; fill: var(--s-di-emas); }
.fl-pita {
  margin-inline-start: auto; font-size: .7rem; font-weight: 700; letter-spacing: .04em; color: var(--s-emas-teks);
  border: 1px solid var(--s-garis); border-radius: 999px; padding: 4px 10px; white-space: nowrap;
}
.fl-tanya { margin: 12px 0 8px; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--p-sub); }
html[lang="ar"] .fl-tanya, html[lang="zh"] .fl-tanya, html[lang="th"] .fl-tanya { letter-spacing: .02em; }
.fl-chip-baris { display: flex; flex-wrap: wrap; gap: 8px; }
.fl-chip-baris button {
  min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--s-garis);
  background: rgba(255, 255, 255, .03); color: var(--p-teks); font: inherit; font-size: .86rem; font-weight: 600;
  cursor: pointer; transition: background .25s ease, color .25s ease, border-color .25s ease, transform .2s ease;
}
.fl-chip-baris button:hover { border-color: var(--emas); }
.fl-chip-baris button:active { transform: scale(.97); }
.fl-chip-baris button[aria-checked="true"] { background: var(--s-emas-grad); color: var(--s-di-emas); border-color: transparent; }
html[data-tema="terang"] .fl-chip-baris button { background: rgba(255, 252, 245, .7); }
html[data-tema="terang"] .fl-chip-baris button[aria-checked="true"] { background: linear-gradient(135deg, #e7c47c, #c9973f); color: #2a1d06; }
.fl-cari { margin-top: 18px; gap: 10px; }
.fl-cari svg { width: 18px; height: 18px; fill: currentColor; flex: 0 0 auto; }
.fl-cari[aria-busy="true"] { opacity: .8; pointer-events: none; }
.fl-cari[aria-busy="true"] svg { animation: flKedip .7s ease-in-out infinite alternate; }
@keyframes flKedip { to { opacity: .25; } }

/* kartu area: benda "layar aplikasi" — gelap di kedua tema, seperti kartu GO */
.fl-kartu {
  margin-top: 16px; padding: 16px; border-radius: 20px; color: #f3ede2;
  background: linear-gradient(180deg, #15130f, #0d0c0a); border: 1px solid rgba(214, 170, 90, .34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 24px 50px -30px rgba(0, 0, 0, .9);
}
.fl-kartu.fl-tiba { animation: flTiba .55s cubic-bezier(.2, .8, .2, 1); }
@keyframes flTiba { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.fl-kartu-kepala { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fl-arah { font-weight: 800; font-size: .8rem; letter-spacing: .08em; padding: 5px 11px; border-radius: 8px; color: #1d1406; background: linear-gradient(135deg, #f1d08b, #c9963d); }
.fl-arah.fl-jual { background: #f08d66; color: #2a0f05; }
.fl-simbol { font-size: 1.08rem; letter-spacing: .03em; color: #f3ede2; }
.fl-gaya-pil { margin-inline-start: auto; font-size: .75rem; color: #b9ad97; border: 1px solid rgba(214, 170, 90, .26); border-radius: 999px; padding: 3px 10px; }
.fl-chart { direction: ltr; display: block; width: 100%; height: auto; margin: 12px 0 6px; border-radius: 12px; background: rgba(255, 255, 255, .02); }
.fl-cap { font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #1d1406; background: #efdca9; border-radius: 6px; padding: 3px 8px; }
html[lang="ar"] .fl-cap, html[lang="zh"] .fl-cap, html[lang="th"] .fl-cap { letter-spacing: .02em; }
.fl-chart .fl-air { font: 800 30px var(--sans); letter-spacing: .3em; fill: rgba(243, 237, 226, .06); }
.fl-chart .fl-zona { fill: rgba(229, 194, 124, .16); stroke: rgba(229, 194, 124, .5); stroke-dasharray: 3 3; }
.fl-chart .fl-zona.fl-jual { fill: rgba(240, 141, 102, .14); stroke: rgba(240, 141, 102, .55); }
.fl-chart .fl-c-naik { fill: #e5c27c; stroke: #e5c27c; }
.fl-chart .fl-c-turun { fill: #f08d66; stroke: #f08d66; }
.fl-chart .fl-sumbu { stroke-width: 1; }
.fl-chart .fl-g-entry { stroke: #f1d08b; stroke-width: 1.3; }
.fl-chart .fl-g-sl { stroke: #f08d66; stroke-width: 1; stroke-dasharray: 4 3; }
.fl-chart .fl-g-tp { stroke: #f3ede2; stroke-width: 1; stroke-dasharray: 4 3; opacity: .7; }
.fl-chart text { font: 600 9.5px var(--sans); fill: #b9ad97; }
.fl-chart .fl-candle { transform-box: fill-box; transform-origin: 50% 100%; }
.fl-anim .fl-candle { animation: flCandle .35s ease both; }
@keyframes flCandle { from { opacity: 0; transform: scaleY(.2); } to { opacity: 1; transform: none; } }
.fl-angka { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0 0; }
.fl-angka div { padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(214, 170, 90, .14); min-width: 0; }
.fl-angka dt { font-size: .7rem; color: #b9ad97; margin-bottom: 3px; }
.fl-angka dd { margin: 0; font-weight: 700; font-size: .95rem; font-variant-numeric: tabular-nums; color: #f3ede2; overflow-wrap: anywhere; }
.fl-angka .fl-angka-utama { border-color: rgba(229, 194, 124, .55); background: rgba(229, 194, 124, .1); }
.fl-angka .fl-angka-utama dd { color: #f1d08b; }
.fl-alasan { margin: 12px 0 0; font-size: .86rem; line-height: 1.55; color: #d9cfbd; }
.fl-alasan b { color: #f1d08b; }
.fl-opsi { margin-top: 12px; display: grid; gap: 6px; }
.fl-opsi p { margin: 0; padding: 10px 12px; border-radius: 12px; font-size: .86rem; }
.fl-opsi-utama { background: rgba(229, 194, 124, .12); border: 1px solid rgba(229, 194, 124, .45); color: #f3ede2; }
.fl-opsi-utama b { color: #f1d08b; }
.fl-opsi-lain { border: 1px solid rgba(214, 170, 90, .16); color: #b9ad97; }
.fl-kirim { margin-top: 12px; gap: 10px; }
.fl-kirim svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
html[dir="rtl"] .fl-kirim svg, html[dir="rtl"] .gm-cta svg { transform: scaleX(-1); }
.fl-terkirim { margin: 10px 0 0; font-size: .84rem; line-height: 1.55; color: #d9cfbd; }
.fl-terkirim a { color: #f1d08b; font-weight: 700; }
.fl-catatan { max-width: 440px; margin-inline: auto; text-align: center; color: #a99f8d; }
html[data-tema="terang"] .fl-catatan { color: #6f6553; }

/* ---------------- GAMES ---------------- */
.bab-games { position: relative; }
.gm-kartu {
  position: relative; display: grid; gap: clamp(24px, 4vw, 48px); align-items: center; overflow: hidden;
  padding: clamp(24px, 5vw, 56px); border-radius: 30px; text-decoration: none; color: #f3ede2;
  background:
    radial-gradient(700px 380px at 85% 20%, rgba(229, 194, 124, .16), transparent 70%),
    radial-gradient(500px 320px at 0% 100%, rgba(143, 113, 51, .18), transparent 70%),
    linear-gradient(160deg, #15120c 0%, #0a0907 60%, #050403 100%);
  border: 1px solid rgba(214, 170, 90, .34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 40px 90px -46px rgba(0, 0, 0, .9);
  transition: border-color .35s ease, transform .35s ease;
}
.gm-kartu:hover { border-color: rgba(229, 194, 124, .7); }
.gm-kartu:focus-visible { outline: 2px solid #e5c27c; outline-offset: 4px; }
@media (min-width: 900px) { .gm-kartu { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); } }
.gm-kartu .label { color: #e5c27c; margin-bottom: 14px; }
.gm-kartu .label .nomor::after { background: rgba(214, 170, 90, .35); }
.gm-judul {
  font-family: var(--serif); font-weight: 600; font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1; margin: 0 0 .2em;
  letter-spacing: .01em; background: linear-gradient(100deg, #f6e3ad 0%, #d4b26a 45%, #f1d08b 60%, #8f7133 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.gm-tagline { font-family: var(--serif); font-style: italic; font-size: clamp(1.15rem, 2vw, 1.45rem); color: #efdca9; margin: 0 0 14px; }
html[lang="ar"] .gm-tagline, html[lang="zh"] .gm-tagline, html[lang="th"] .gm-tagline { font-style: normal; }
.gm-isi { color: #d9cfbd; max-width: 56ch; margin: 0 0 18px; line-height: 1.7; }
.gm-poin { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.gm-poin li { font-size: .84rem; font-weight: 600; color: #f3ede2; padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(214, 170, 90, .3); background: rgba(255, 255, 255, .03); }
.gm-cta { gap: 10px; }
.gm-cta svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s ease; }
.gm-kartu:hover .gm-cta svg { transform: translateX(4px); }
html[dir="rtl"] .gm-kartu:hover .gm-cta svg { transform: scaleX(-1) translateX(4px); }
.gm-kartu .catatan-kecil { color: #a99f8d; }

.gm-visual { position: relative; width: min(100%, 340px); aspect-ratio: 1; margin-inline: auto; }
.gm-papan { width: 100%; height: 100%; display: block; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .6)); }
.gm-papan .gm-petak rect { fill: rgba(255, 255, 255, .025); stroke: rgba(214, 170, 90, .35); stroke-width: .8; }
.gm-papan .gm-petak rect.gm-milik { fill: rgba(229, 194, 124, .22); }
.gm-papan .gm-b { font-family: var(--serif); font-size: 84px; font-weight: 600; }
.gm-cincin { transform-origin: 150px 150px; animation: gmPutar 40s linear infinite; }
.gm-garis { stroke-dasharray: 220; stroke-dashoffset: 220; }
.gm-hidup .gm-garis { animation: gmGaris 2.4s ease .3s forwards; }
@keyframes gmGaris { to { stroke-dashoffset: 0; } }
.gm-dadu {
  position: absolute; width: 46px; height: 46px; border-radius: 10px; display: grid; padding: 8px;
  background: linear-gradient(145deg, #fbf3dc, #d9c48f); box-shadow: 0 14px 24px -10px rgba(0, 0, 0, .7), inset 0 -3px 0 rgba(0, 0, 0, .12);
}
.gm-dadu i { width: 8px; height: 8px; border-radius: 50%; background: #2a1d06; }
.gm-dadu-1 { top: 6%; inset-inline-end: 2%; grid-template-columns: repeat(3, 1fr); transform: rotate(14deg); animation: gmApung 5s ease-in-out infinite; }
.gm-dadu-1 i:nth-child(1) { grid-column: 1; grid-row: 1; } .gm-dadu-1 i:nth-child(2) { grid-column: 2; grid-row: 2; } .gm-dadu-1 i:nth-child(3) { grid-column: 3; grid-row: 3; }
.gm-dadu-2 { bottom: 8%; inset-inline-start: 0; width: 40px; height: 40px; grid-template-columns: repeat(2, 1fr); transform: rotate(-12deg); animation: gmApung 6s ease-in-out -2s infinite; }
.gm-dadu-2 i:nth-child(1) { grid-column: 1; grid-row: 1; } .gm-dadu-2 i:nth-child(2) { grid-column: 2; grid-row: 2; align-self: end; justify-self: end; }
.gm-chip { position: absolute; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle, #f1d08b 0 34%, #8f7133 36% 44%, #f1d08b 46% 62%, #6b5019 64%); box-shadow: 0 8px 14px -6px rgba(0, 0, 0, .7); }
.gm-chip-1 { top: 18%; inset-inline-start: 4%; animation: gmApung 4.5s ease-in-out -1s infinite; }
.gm-chip-2 { bottom: 2%; inset-inline-end: 22%; width: 24px; height: 24px; animation: gmApung 5.5s ease-in-out -3s infinite; }
.gm-chip-3 { top: 46%; inset-inline-end: -2%; width: 22px; height: 22px; animation: gmApung 6.5s ease-in-out -2s infinite; }
@keyframes gmApung { 50% { translate: 0 -8px; } }
@keyframes gmPutar { to { transform: rotate(360deg); } }

@media (max-width: 899px) { .gm-visual { width: min(70%, 260px); order: -1; } }
@media (max-width: 420px) {
  .fl-app { padding: 14px; }
  .fl-angka { gap: 6px; }
  .fl-angka div { padding: 8px; }
  .fl-angka dd { font-size: .86rem; }
}
@media (prefers-reduced-motion: reduce) {
  .gm-cincin, .gm-dadu, .gm-chip, .fl-cari[aria-busy="true"] svg { animation: none !important; }
  .gm-garis { stroke-dashoffset: 0; }
  .fl-kartu.fl-tiba, .fl-anim .fl-candle { animation: none !important; }
}
