body {
    background-color: #030305;
    color: #e2e8f0;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

.bg-ambient {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(168, 85, 247, 0.08) 0%, transparent 60%);
    z-index: -2;
    pointer-events: none;
}

.bg-grid {
    position: fixed;
    inset: 0;
    background-size: 30px 30px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px), linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    z-index: -3;
    mask-image: linear-gradient(to bottom, black 20%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 20%, transparent 100%);
}

/* OPTIMASI: Efek blur dikurangi dari 12px menjadi 6px, opacity background dinaikkan agar teks tetap terbaca tanpa memberatkan GPU */
.glass-panel {
    background: rgba(10, 10, 14, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.glass-panel:hover {
    border-color: rgba(168, 85, 247, 0.3);
    background: rgba(255, 255, 255, 0.04);
}

.btn-primary {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25);
    transition: all 0.3s;
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(1px) scale(0.98);
}

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

.btn-bicolink {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25);
    transition: all 0.3s;
}

.btn-bicolink:hover {
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.btn-bicolink:active {
    transform: translateY(1px) scale(0.98);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.4);
    color: #c084fc;
}

.btn-secondary:active {
    transform: scale(0.98);
}

.premium-input {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px 14px;
    width: 100%;
    border-radius: 10px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    outline: none;
    transition: all 0.3s;
}

.premium-input:focus {
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.05);
}

.premium-input.focus-amber:focus {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.premium-input.mono {
    font-family: 'JetBrains Mono', monospace;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 3, 5, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

.protected-img {
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
}

/* OPTIMASI: Mengganti max-height yang berat dengan CSS Grid & Visibility */
.dropdown-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-wrapper.open {
    grid-template-rows: 1fr;
}

.dropdown-inner {
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.35s ease, visibility 0.35s;
    visibility: hidden;
}

.dropdown-wrapper.open .dropdown-inner {
    opacity: 1;
    visibility: visible;
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
        border-color: rgba(168, 85, 247, 0.5);
        background-color: rgba(168, 85, 247, 0.1);
    }

    50% {
        box-shadow: 0 0 30px rgba(168, 85, 247, 0.8);
        border-color: rgba(168, 85, 247, 1);
        background-color: rgba(168, 85, 247, 0.2);
    }
}

.highlight-target {
    animation: pulseGlow 2s infinite;
    border-width: 2px !important;
}

::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* =====================================================================
   FALLBACK: class Tailwind yang dipakai di script.js/index.html tapi
   tidak ikut ter-build di tailwind-output.css. Hapus blok ini setelah
   Tailwind di-build ulang dengan content: ['./index.html','./script.js'].
   ===================================================================== */
.rotate-180 { transform: rotate(180deg); }
.scale-100 { --tw-scale-x: 1; --tw-scale-y: 1; }
.translate-y-0 { --tw-translate-y: 0; transform: translate(var(--tw-translate-x), var(--tw-translate-y)); }
.translate-y-4 { transform: translate(var(--tw-translate-x), var(--tw-translate-y)); }
.translate-y-5 { --tw-translate-y: 1.25rem; transform: translate(var(--tw-translate-x), var(--tw-translate-y)); }
.opacity-100 { opacity: 1; }
.opacity-75 { opacity: .75; }
.pointer-events-auto { pointer-events: auto; }
.text-green-400 { color: #4ade80; }
.text-black { color: #000; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.w-16 { width: 4rem; } .h-16 { height: 4rem; } .w-auto { width: auto; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; } .pt-0 { padding-top: 0; }
.mx-auto { margin-left: auto; margin-right: auto; }
.ml-1 { margin-left: .25rem; } .mr-1 { margin-right: .25rem; }
.items-end { align-items: flex-end; }
.z-20 { z-index: 20; }
.tracking-wider { letter-spacing: .05em; }
.border-amber-300 { border-color: #fcd34d; }
.text-white\/50 { color: rgba(255,255,255,.5); }
.hover\:bg-white\/5:hover { background-color: rgba(255,255,255,.05); }
.hover\:text-cyber-400:hover { color: #c084fc; }
.animate-bounce { animation: bounce 1s infinite; }
@keyframes bounce {
    0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(.8,0,1,1); }
    50% { transform: none; animation-timing-function: cubic-bezier(0,0,.2,1); }
}

/* ---------- Aksesibilitas ---------- */
/* Teks kecil: naikkan ke minimum 11px & perbaiki kontras (slate-500 = 4.1:1, slate-600 = 2.6:1) */
.text-\[9px\], .text-\[10px\] { font-size: 11px !important; line-height: 1.4; }
.text-slate-500 { color: #94a3b8 !important; }
.text-slate-600 { color: #8b9bb0 !important; }

/* Modal yang tertutup tidak boleh bisa difokus lewat Tab */
.modal-overlay { visibility: hidden; transition: opacity .3s ease, visibility 0s linear .3s; }
.modal-overlay.active { visibility: visible; transition: opacity .3s ease, visibility 0s; }

/* Fokus keyboard yang jelas */
:focus-visible { outline: 2px solid #c084fc; outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 300; background: #a855f7; color: #fff; padding: 8px 14px; border-radius: 8px; font-weight: 700; font-size: 13px; }
.skip-link:focus { left: 8px; }

/* Hormati pengguna yang mematikan animasi */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .animate-fade-up { opacity: 1 !important; }
}

/* Jika JS/animasi gagal, konten tetap tampil */
@media (scripting: none) { .opacity-0 { opacity: 1; } }

/* Desktop: kolom 480px di tengah sudah OK, beri sedikit ruang napas */
@media (min-width: 768px) {
    body { padding: 24px 0; }
    .glass-panel:hover { transform: translateY(-1px); }
}

/* =====================================================================
   PERBAIKAN HASIL AUDIT
   ===================================================================== */
body { min-height: 100dvh; }

/* Modal bisa di-scroll di layar pendek / saat keyboard terbuka */
.modal-overlay { align-items: flex-start; overflow-y: auto; overscroll-behavior: contain; }
.modal-overlay > * { margin: auto; }

/* Kontras tombol (putih di atas #3b82f6 hanya 3.7:1 -> sekarang >= 5:1) */
.btn-primary  { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.btn-bicolink { background: linear-gradient(135deg, #2563eb, #1d4ed8); }

/* Target sentuh lebih besar di HP */
#video-list-container div[style*="grid-template-columns"] > * { min-height: 40px; }
button[aria-label^="Salin link"] { width: 36px !important; height: 36px !important; }

/* Blur bertumpuk membebani GPU HP low-end: hapus blur di wrapper utama */
.backdrop-blur-md { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }

/* Kelas Tailwind yang dipakai tapi belum ter-build */
.backdrop-blur-\[2px\] { backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.drop-shadow-lg { filter: drop-shadow(0 10px 8px rgba(0,0,0,.04)) drop-shadow(0 4px 3px rgba(0,0,0,.1)); }
.shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.translate-y-4 { --tw-translate-y: 1rem; }

/* =====================================================================
   GET KEY
   ===================================================================== */
.getkey-trigger {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(168, 85, 247, 0.35);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.14), rgba(168, 85, 247, 0.05));
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.12);
    cursor: pointer;
    transition: border-color .3s, box-shadow .3s, transform .15s;
}
.getkey-trigger:hover { border-color: rgba(192, 132, 252, 0.7); box-shadow: 0 6px 22px rgba(168, 85, 247, 0.3); }
.getkey-trigger:active { transform: scale(0.985); }

.getkey-confirm {
    background: linear-gradient(135deg, #9333ea, #c084fc);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
    transition: filter .2s, opacity .2s, box-shadow .2s;
    cursor: pointer;
}
.getkey-confirm:hover:not(:disabled) { filter: brightness(1.1); }
.getkey-confirm:disabled { opacity: .4; box-shadow: none; cursor: not-allowed; filter: grayscale(.4); }

#getkey-select { appearance: none; -webkit-appearance: none; padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; }
#getkey-select option, #getkey-select optgroup { background: #0a0a0e; color: #fff; }
#getkey-select optgroup { color: #c084fc; font-style: normal; }

.animate-spin, .fa-spin { animation-duration: 1s; }

.min-w-0 { min-width: 0; }

/* =====================================================================
   REPORT (laporkan masalah)
   ===================================================================== */
.report-trigger {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 12px; min-height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(168, 85, 247, 0.35);
    background: rgba(168, 85, 247, 0.1);
    color: #d8b4fe; font-size: 12px; font-weight: 700;
    cursor: pointer;
    transition: background .2s, border-color .2s, transform .15s;
}
.report-trigger:hover { background: rgba(168, 85, 247, 0.2); border-color: rgba(192, 132, 252, 0.7); color: #fff; }
.report-trigger:active { transform: scale(0.96); }

#report-type { appearance: none; -webkit-appearance: none; padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; }
#report-type option { background: #0a0a0e; color: #fff; }
#report-description { min-height: 96px; }

.report-counter-ok { color: #4ade80; }
.report-page-box { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 10px; padding: 8px 10px; }
.report-page { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #94a3b8; word-break: break-all; }

/* Honeypot: tidak terlihat oleh manusia, tetap "terlihat" oleh bot */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
