/* ==========================================================================
   Anomali Gaming — Script Gratis (/script-gratis/)
   One block: text (title · intro · features · serial + masa berlaku card · buttons) + illustration.
   ========================================================================== */

@layer components {
  .gx { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
  .gx__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);   /* never wider than the screen */
    gap: clamp(2.5rem, 6vw, 4rem);
  }
  /* Desktop: both columns share one row height, so the art spans title → buttons */
  @media (min-width: 60em) {
    .gx__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
  }

  /* ---------- Text: every block uses the full column width → one clean right edge ---------- */
  .gx__text { display: flex; flex-direction: column; container-type: inline-size; }
  /* Title: all caps, always one line — size follows the column width (caps text ≈ 16.2em wide) */
  .gx__title { font-size: min(var(--fs-2xl), 6cqi); line-height: 1.15; white-space: nowrap; text-transform: uppercase; }
  .gx__intro { margin-top: var(--sp-4); color: var(--text-2); }
  .gx__label {
    margin-top: var(--sp-6);
    font-size: var(--fs-sm);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-1);
  }
  .gx__list { display: grid; gap: 12px; margin: var(--sp-3) 0 var(--sp-6); padding: 0; list-style: none; }
  .gx__list li { display: flex; align-items: flex-start; gap: 10px; color: var(--text-2); line-height: 1.45; }
  .gx__list .icon { width: 20px; height: 20px; margin-top: 1px; flex-shrink: 0; color: var(--primary-text); }

  /* Serial + masa berlaku: ONE card, two parts split by a hairline */
  .gx-key {
    overflow: hidden;
    border-radius: var(--r-lg);
    background: linear-gradient(180deg, #172233, #111a26);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.07), var(--shadow-1);
  }
  .gx-key__serial { padding: var(--sp-5) var(--sp-6); }
  .gx-key__label {
    font-size: var(--fs-2xs);
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary-text);
  }
  .gx-key__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    margin-top: var(--sp-2);
  }
  .gx-key__code {
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, "Liberation Mono", monospace;
    font-size: clamp(1.25rem, 1rem + 1vw, 1.625rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-1);
    user-select: all;
  }
  .gx-key [data-copied] { color: #4ade80; }
  .gx-key__hint { margin-top: var(--sp-2); font-size: var(--fs-xs); color: var(--text-3); }

  .gx-key__expiry {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: var(--sp-4) var(--sp-6) var(--sp-5);
    border-top: 1px solid var(--line-soft);
    background: rgb(0 0 0 / 0.12);
    font-size: var(--fs-sm);
    line-height: 1.55;
    color: var(--text-3);
  }
  .gx-key__expiry .icon { width: 18px; height: 18px; margin-top: 3px; flex-shrink: 0; color: var(--primary-text); }
  .gx-key__expiry b { display: block; margin-bottom: 2px; color: var(--text-1); }

  .gx__text .cluster { margin-top: var(--sp-8); }

  /* ---------- Illustration: PC behind, character in front (no panel) ---------- */
  .gx__vis {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin-inline: auto;
    aspect-ratio: 5 / 4;           /* stacked layout (phone / tablet) */
    margin-top: 8%;                /* room for the head above the PC */
  }
  @media (min-width: 60em) {
    .gx__vis { aspect-ratio: auto; height: 100%; min-height: 440px; margin-top: 0; }
  }
  .gx-pc {                         /* vertically centred in the art column */
    position: absolute;
    top: 50%;
    left: 0;
    width: 74%;
    z-index: 1;
    transform: translateY(-50%);
  }
  .gx-char {                       /* portrait render: top = title line, bottom fades out */
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 3;
    height: 108%;
    width: auto;
    max-width: 62%;
    object-fit: contain;
    object-position: bottom right;
  }
  @media (min-width: 60em) { .gx-char { height: 100%; } }

  /* Monitor */
  .gx-monitor {
    position: relative;
    z-index: 1;
    width: 100%;
    overflow: hidden;
    border: 8px solid #243246;
    border-radius: 14px;
    background: #243246;
    box-shadow:
      0 0 0 1px rgb(255 255 255 / 0.08),
      0 0 70px -12px rgb(var(--primary-rgb) / 0.5),
      0 30px 50px -24px rgb(0 0 0 / 0.9);
  }
  .gx-monitor__bar {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 26px;
    padding: 0 10px;
    background: #1b2738;
  }
  .gx-monitor__bar i { width: 7px; height: 7px; border-radius: 50%; background: rgb(255 255 255 / 0.18); }
  .gx-monitor__bar span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 8px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-3);
    white-space: nowrap;
  }
  .gx-monitor__bar .icon { width: 13px; height: 13px; }
  .gx-rec {                        /* recording dot */
    width: 8px;
    height: 8px;
    margin-left: auto;
    border-radius: 50%;
    background: #ff4d5e;
    box-shadow: 0 0 8px #ff4d5e;
  }
  /* Screen = Glass Mode map screenshot */
  .gx-monitor__screen { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #0d1622; }
  .gx-monitor__screen img { width: 100%; height: 100%; object-fit: cover; }
  .gx-monitor__stand {             /* neck + base */
    position: relative;
    width: 12%;
    height: 28px;
    margin: 0 auto;
    background: linear-gradient(180deg, #1c2a3e, #3a4f6b);
  }
  .gx-monitor__stand::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -8px;
    width: 340%;
    height: 8px;
    transform: translateX(-50%);
    border-radius: 8px 8px 3px 3px;
    background: linear-gradient(180deg, #4a6180, #2f4058);
    box-shadow: 0 10px 20px -6px rgb(0 0 0 / 0.8);
  }

  /* ---------- Tabel unduhan gratis ---------- */
  .gb { padding-block: 0 clamp(2.5rem, 6vw, 4.5rem); }
  .gb__title { font-size: var(--fs-xl); text-transform: uppercase; }
  .gb__intro { margin-top: var(--sp-2); color: var(--text-2); }
  .gb__wrap {
    margin-top: var(--sp-5);
    overflow: hidden;
    border-radius: var(--r-lg);
    background: linear-gradient(180deg, #172233, #111a26);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.07), var(--shadow-1);
  }
  .gb__tabel { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
  .gb__tabel thead th {
    padding: 12px 18px;
    text-align: left;
    font-size: var(--fs-2xs);
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary-text);
    background: rgb(0 0 0 / 0.18);
  }
  .gb__tabel tbody th, .gb__tabel td {
    padding: 16px 18px;
    border-top: 1px solid var(--line-soft);
    text-align: left;
    vertical-align: middle;
    color: var(--text-2);
    line-height: 1.5;
  }
  .gb__tabel tbody th { font-weight: 700; white-space: nowrap; }
  .gb__nama { display: block; color: var(--text-1); font-weight: 800; }
  .gb__tag {
    display: inline-block;
    margin-top: 4px;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: var(--fs-2xs);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-text);
    background: rgb(var(--primary-rgb) / 0.14);
  }
  .gb__tag--alat { color: #4ade80; background: rgb(74 222 128 / 0.12); }
  .gb__tag--vm { color: #f5b53b; background: rgb(245 181 59 / 0.12); }
  /* tombol Download saat hitung mundur 1:30 */
  a[data-menunggu] {
    pointer-events: none;
    min-width: 9.5em;
    justify-content: center;
    font-variant-numeric: tabular-nums;
    filter: saturate(0.4) brightness(0.85);
  }
  .gb__tabel td[data-label="Versi"], .gb__tabel td[data-label="Ukuran"] { white-space: nowrap; color: var(--text-3); }
  .gb__aksi { text-align: right; white-space: nowrap; }
  .gb__nanti .gb__nama, .gb__nanti td { color: var(--text-3); }
  .gb__segera {
    display: inline-block;
    padding: 6px 14px;
    border-radius: var(--r-md, 8px);
    font-size: var(--fs-xs);
    font-weight: 800;
    color: #f5b53b;
    background: rgb(245 181 59 / 0.12);
    box-shadow: inset 0 0 0 1px rgb(245 181 59 / 0.35);
  }
  .gb__catatan {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: var(--sp-4);
    padding: var(--sp-4) var(--sp-5);
    border-radius: var(--r-lg);
    background: rgb(245 181 59 / 0.08);
    box-shadow: inset 3px 0 0 #f5b53b;
    font-size: var(--fs-sm);
    line-height: 1.55;
    color: var(--text-2);
  }
  .gb__catatan .icon { width: 18px; height: 18px; margin-top: 3px; flex-shrink: 0; color: #f5b53b; }
  .gb__catatan b { display: block; margin-bottom: 2px; color: var(--text-1); }

  /* ---------- Khusus Member Script (dikunci, jadi promosi) ---------- */
  .gb-pro {
    position: relative;
    margin-top: var(--sp-8);
    overflow: hidden;
    border-radius: var(--r-lg);
    background:
      radial-gradient(120% 140% at 100% 0%, rgb(245 181 59 / 0.16), transparent 55%),
      linear-gradient(180deg, #1a2231, #111a26);
    box-shadow: inset 0 0 0 1px rgb(245 181 59 / 0.35), 0 20px 50px -24px rgb(245 181 59 / 0.35);
  }
  .gb-pro__kepala {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: var(--sp-5) var(--sp-6);
    border-bottom: 1px solid rgb(245 181 59 / 0.22);
  }
  .gb-pro__kepala > .icon {
    width: 44px; height: 44px; padding: 10px; flex-shrink: 0;
    border-radius: 12px;
    color: #1a1204;
    background: linear-gradient(180deg, #ffd56b, #f5b53b);
    box-shadow: 0 8px 20px -8px rgb(245 181 59 / 0.8);
  }
  .gb-pro__judul { font-size: var(--fs-lg); text-transform: uppercase; color: #ffd56b; letter-spacing: 0.02em; }
  .gb-pro__sub { margin-top: 4px; font-size: var(--fs-sm); color: var(--text-2); }
  .gb__tabel--pro thead th { color: #f5b53b; }
  .gb__tabel--pro tbody tr { transition: background-color .15s; }
  .gb__tabel--pro tbody tr:hover { background: rgb(245 181 59 / 0.05); }
  .gb__tag--emas { color: #1a1204; background: linear-gradient(180deg, #ffd56b, #f5b53b); }
  .gb__tabel--pro td[data-label="Ukuran"] { white-space: nowrap; color: var(--text-3); }
  .gb__kunci {
    display: inline-flex; align-items: center; gap: 6px;
    margin-right: 10px;
    font-size: var(--fs-xs); font-weight: 800;
    color: var(--text-3);
    text-decoration: none;
  }
  .gb__kunci .icon { width: 15px; height: 15px; color: #f5b53b; }
  .gb__kunci s { text-decoration-thickness: 2px; text-decoration-color: #ff4d5e; }
  .gb__dapat {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 7px 12px 7px 16px;
    border-radius: 8px;
    font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
    color: #1a1204;
    text-decoration: none;
    background: linear-gradient(180deg, #ffd56b, #f5b53b);
    box-shadow: 0 6px 16px -8px rgb(245 181 59 / 0.9);
  }
  .gb__dapat .icon { width: 16px; height: 16px; }
  .gb__dapat:hover { filter: brightness(1.08); }
  .gb__kunci:hover s { color: var(--text-1); }

  /* HP: tiap baris jadi kartu */
  @media (max-width: 47.99em) {
    .gb__tabel thead { display: none; }
    .gb__tabel, .gb__tabel tbody, .gb__tabel tr, .gb__tabel tbody th, .gb__tabel td { display: block; width: 100%; }
    .gb__tabel tr { padding: 14px 16px; border-top: 1px solid var(--line-soft); }
    .gb__tabel tbody tr:first-child { border-top: 0; }
    .gb__tabel tbody th, .gb__tabel td { padding: 4px 0; border-top: 0; white-space: normal; }
    .gb__tabel td[data-label="Versi"], .gb__tabel td[data-label="Ukuran"] { display: inline-block; width: auto; margin-right: 14px; font-size: var(--fs-xs); }
    .gb__tabel td[data-label="Versi"]::before { content: "Versi "; }
    .gb__tabel td[data-label="Ukuran"]::before { content: "Ukuran "; }
    .gb__nanti td[data-label="Versi"], .gb__nanti td[data-label="Ukuran"] { display: none; }
    .gb__aksi { margin-top: 8px; text-align: left; }
  }
}
