/* ========== Age Confirm (dari kamu, tidak diubah) ========== */

#gdb-screen.gdb-age-confirm {
  --gdb-primary: #2563eb;
  --gdb-primary-600: #1d4ed8;
  --gdb-success: #16a34a;
  --gdb-success-600: #15803d;
  --gdb-text: #111827;
  --gdb-muted: #6b7280;
  --gdb-border: #e5e7eb;
  --gdb-surface: #ffffff;
  --gdb-shadow: 0 20px 60px rgba(0,0,0,.25);
  --gdb-radius: 16px;
}
.gdb-age-confirm.gdb-screen{position:fixed;inset:0;z-index:999999;display:grid;place-items:center;padding:24px;opacity:1;transition:opacity .25s ease}
.gdb-age-confirm.gdb-screen[data-state="closed"]{opacity:0;pointer-events:none;display:none}
.gdb-age-confirm .gdb-backdrop{position:absolute;inset:0;background:radial-gradient(1200px 600px at 50% -10%, rgba(37,99,235,.18), transparent),rgba(17,24,39,.72);backdrop-filter:blur(10px)}
.gdb-age-confirm .gdb-card{position:relative;width:min(520px,100%);background:var(--gdb-surface);border-radius:var(--gdb-radius);box-shadow:var(--gdb-shadow);overflow:hidden;transform:translateY(6px) scale(.98);opacity:0;animation:gdb-pop .28s ease forwards}
@keyframes gdb-pop{to{transform:translateY(0) scale(1);opacity:1}}
.gdb-age-confirm .p-3{padding:18px}
.gdb-age-confirm .border-bottom{border-bottom:1px solid var(--gdb-border)}
.gdb-age-confirm .border-top{border-top:1px solid var(--gdb-border)}
.gdb-age-confirm .text-center{text-align:center}
.gdb-age-confirm .text-end{text-align:right}
.gdb-age-confirm .mt-3{margin-top:12px}
.gdb-age-confirm .mb-3{margin-bottom:12px}
.gdb-age-confirm h3{margin:0;font:600 18px/1.3 ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial;color:var(--gdb-text)}
.gdb-age-confirm p{margin:0 0 8px;color:var(--gdb-muted);font:400 15px/1.6 ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial}
.gdb-age-confirm .btn{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;padding:0 14px;border-radius:10px;border:1px solid var(--gdb-border);background:#fff;color:var(--gdb-text);font:600 14px/1 ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial;box-shadow:0 1px 0 rgba(0,0,0,.02);transition:background .15s ease,border-color .15s ease,transform .02s ease,box-shadow .15s ease,color .15s ease;cursor:pointer}
.gdb-age-confirm .btn:hover{background:#f8fafc}
.gdb-age-confirm .btn:active{transform:translateY(1px)}
.gdb-age-confirm .btn-success{background:var(--gdb-success);border-color:var(--gdb-success);color:#fff}
.gdb-age-confirm .btn-success:hover{background:var(--gdb-success-600);border-color:var(--gdb-success-600)}
.gdb-age-confirm .btn-primary{background:var(--gdb-primary);border-color:var(--gdb-primary);color:#fff}
.gdb-age-confirm .btn-primary:hover{background:var(--gdb-primary-600);border-color:var(--gdb-primary-600)}
.gdb-age-confirm .btn-outline-secondary{background:transparent;color:var(--gdb-text);border-color:var(--gdb-border)}
.gdb-age-confirm .btn-outline-secondary:hover{background:#f1f5f9;border-color:#cbd5e1}
.gdb-age-confirm .btn-sm{height:34px;padding:0 12px;border-radius:9px;font-size:13px}
.gdb-age-confirm .position-relative{position:relative}
.gdb-age-confirm .gdb-poster{display:block;width:100%;height:auto;border-radius:12px;box-shadow:0 6px 20px rgba(0,0,0,.08)}
.gdb-age-confirm .gdb-open-btn{position:absolute;left:50%;transform:translateX(-50%);bottom:18px;min-width:220px}
.gdb-age-confirm .gdb-open-btn[disabled]{opacity:.7;cursor:wait}
.gdb-age-confirm .gdb-ad-overlay{position:absolute;inset:0;opacity:0;pointer-events:none;transition:opacity .25s ease}
.gdb-age-confirm .gdb-ad-slot{position:absolute;width:92%;max-width:640px;z-index:20;pointer-events:auto;display:flex;justify-content:center}
.gdb-age-confirm .gdb-ad-top{top:10px;left:0;right:0;margin:0 auto}
.gdb-age-confirm .gdb-ad-center{top:50%;left:0;right:0;margin:0 auto;transform:translateY(-50%)}
.gdb-age-confirm .gdb-ad-bottom{bottom:10px;left:0;right:0;margin:0 auto}
.gdb-age-confirm .gdb-after[aria-hidden="true"]{display:none}
.gdb-age-confirm .gdb-after[aria-hidden="false"]{display:block}
.gdb-age-confirm .border-top{background:#fafafa}
.gdb-age-confirm .gdb-close.btn{border-color:transparent;background:transparent;color:var(--gdb-muted)}
.gdb-age-confirm .gdb-close.btn:hover{color:var(--gdb-text);background:#f3f4f6}
@media (max-width:420px){.gdb-age-confirm .gdb-card{width:100%}.gdb-age-confirm .btn{height:38px}}

/* ========== Allowed Layout ========== */

/* Guard rails: cegah bleed & layout aneh dari theme */
#gdb-allowed, #gdb-allowed * { box-sizing: border-box; }
#gdb-allowed img {
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
}

/* Featured image constraints - remove border radius */
#gdb-allowed .featured .frame {
  border-radius: 0 !important; /* Remove border radius */
  position: relative;
}

#gdb-allowed .featured .frame img.poster {
  max-width: 100% !important;
  max-height: 400px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}

/* Video overlay with controls */
#gdb-allowed .video-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  padding: 10px;
  z-index: 5; /* Lower than ads (ads are z-index 30) */
}

#gdb-allowed .video-controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 8px;
}

#gdb-allowed .control-btn {
  background: transparent;
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background 0.2s;
  text-shadow: 0 0 3px rgba(0,0,0,0.8);
}

#gdb-allowed .control-btn:hover {
  background: rgba(255,255,255,0.1);
}

#gdb-allowed .progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  overflow: hidden;
}

#gdb-allowed .progress-fill {
  height: 100%;
  background: #ff0000;
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Gallery image constraints */
#gdb-allowed .gallery-wrap .thumb img {
  max-width: 100% !important;
  max-height: 200px !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* Root */
#gdb-allowed{
  position:fixed; inset:0; z-index:2147483646;
  background:#fff; display:flex; flex-direction:column;
  font-family:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial;
}

/* Header */
#gdb-allowed .gdb-hd,
#gdb-allowed .gdb-ft{
  background:#0b0b0c; color:#fff;
  padding:12px 16px; display:flex; align-items:center; justify-content:space-between;
}
#gdb-allowed .brand{font-weight:700; letter-spacing:.2px}

/* Header buttons kecil + merah */
#gdb-allowed .navbtns{display:flex; gap:8px}
#gdb-allowed .navbtns .btn{
  height:30px; padding:0 10px; border-radius:8px; border:0;
  background:#ef4444; color:#fff; font-weight:600; font-size:12px; cursor:default;
}
#gdb-allowed .navbtns .btn:hover{background:#dc2626}


/* Main container */
#gdb-allowed .gdb-main{flex:1; overflow:auto; position:relative; z-index:0;}
#gdb-allowed .container{max-width:1080px; margin:0 auto; padding:16px}

/* Featured (player-like) */
#gdb-allowed .featured{position:relative; margin-bottom:18px; z-index:5;}
#gdb-allowed .featured .ad-top{position:absolute; left:0; right:0; z-index:9999996; pointer-events:auto; display:flex; justify-content:center}
#gdb-allowed .featured .frame{
  position:relative; background:#000; border-radius:12px; overflow:hidden;
  box-shadow:0 12px 32px rgba(0,0,0,.18); width:100%;
}
#gdb-allowed .featured img.poster{
  display:block; width:100% !important; max-width:100% !important; height:auto !important; opacity:.96;
}
/* Pakai aspect-ratio bila ada: gambar tetap cover & tidak melebar */
@supports (aspect-ratio: 1) {
  #gdb-allowed .featured .frame{ aspect-ratio: 16/9; }
  #gdb-allowed .featured img.poster{
    height:100% !important; object-fit:cover;
  }
}

/* Gallery grid (tetap seperti sebelumnya) */
#gdb-allowed .gallery-wrap{position:relative; z-index:5;}
#gdb-allowed .gallery-wrap .ad-mid{position:absolute; z-index:9999997; pointer-events:auto; display:flex; justify-content:center}
#gdb-allowed .grid{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px}
#gdb-allowed .thumb{position:relative; background:#000; border-radius:10px; overflow:hidden}
#gdb-allowed .thumb img{display:block; width:100% !important; height:100% !important; object-fit:cover; aspect-ratio:16/9; opacity:.98}
#gdb-allowed .thumb .vlen{position:absolute; right:8px; bottom:8px; background:rgba(0,0,0,.65); color:#fff; font-size:12px; padding:2px 6px; border-radius:6px}
@media (max-width:900px){ #gdb-allowed .grid{grid-template-columns:repeat(3,minmax(0,1fr));} }
@media (max-width:600px){ #gdb-allowed .grid{grid-template-columns:repeat(2,minmax(0,1fr));} }

/* Footer ad slot */
#gdb-allowed .container{position:relative}
#gdb-allowed .gallery-wrap .ad-ft{position:absolute; z-index:9999998; pointer-events:auto; display:flex; justify-content:center}

/* Pool content */
#gdb-allowed .gdb-pool{position:relative; z-index:1; margin-top:22px;}
#gdb-allowed .gdb-pool-loading{
  padding:14px 16px; text-align:center; border:1px dashed #e5e7eb;
  border-radius:10px; color:#6b7280; background:#fafafa;
}

/* Helper: artikel 1px (untuk trick ads suggestion) — tambahkan class ini via JS */
#gdb-allowed .gdb-pool .gdb-zeroheight{ height:1px; overflow:hidden; }

/* Footer text */
#gdb-allowed .gdb-ft small{opacity:.75}

/* Image size constraints */
#gdb-allowed .featured .frame img.poster {
  max-width: 100% !important;
  max-height: 400px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}

#gdb-allowed .gallery-wrap .thumb img {
  max-width: 100% !important;
  max-height: 200px !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* Video overlay with controls */
#gdb-allowed .video-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  padding: 10px;
  z-index: 5; /* Lower than ads (ads are z-index 30) */
}

#gdb-allowed .video-controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 8px;
}

#gdb-allowed .control-btn {
  background: transparent;
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background 0.2s;
  text-shadow: 0 0 3px rgba(0,0,0,0.8);
}

#gdb-allowed .control-btn:hover {
  background: rgba(255,255,255,0.1);
}

#gdb-allowed .progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  overflow: hidden;
}

#gdb-allowed .progress-fill {
  height: 100%;
  background: #ff0000;
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Gallery title and duration overlay */
#gdb-allowed .gallery-title{font-size:18px; font-weight:600; color:#313131; margin:20px 0 15px 0; text-align:left;}
#gdb-allowed .duration-overlay{position:absolute; right:8px; bottom:8px; background:rgba(0,0,0,.8); color:#fff; font-size:12px; padding:2px 6px; border-radius:4px; font-weight:500;}