/* =========================================
   TORNADO UNLOCK FPS - STYLE FINAL
   ========================================= */
:root {
    --bg-color: #050914;
    --surface-color: #0b1120;
    --surface-hover: #111a2e;
    --primary: #00F2FE;
    --primary-gradient: linear-gradient(135deg, #00F2FE, #4FACFE);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #1e293b;
    --success: #10b981;
    --danger: #ef4444;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Plus Jakarta Sans', sans-serif; -webkit-tap-highlight-color: transparent; }

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-image: radial-gradient(circle at 15% 50%, rgba(0, 242, 254, 0.08), transparent 25%), radial-gradient(circle at 85% 30%, rgba(59, 130, 246, 0.08), transparent 25%);
}

/* NAVBAR */
.navbar { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; background: rgba(5, 9, 20, 0.8); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid rgba(255,255,255,0.03); }

.logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; letter-spacing: -0.5px; }

/* GANTI IKON SVG JADI GAMBAR */
.logo img {
    width: 32px;
    height: 32px;
    object-fit: contain; /* Agar gambar tidak gepeng */
    border-radius: 8px; /* Opsional: kalau mau sudutnya agak bulat */
}

/* UBAH AVATAR JADI BADGE FREE */
.badge-free {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 165, 0, 0.15)); /* Warna emas transparan */
    border: 1px solid rgba(255, 215, 0, 0.5);
    color: #FFD700; /* Warna emas */
    font-size: 11px;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 20px;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

/* HERO */
.hero { padding: 30px 24px; text-align: left; }
.hero h1 { font-size: 32px; font-weight: 800; line-height: 1.1; margin-bottom: 12px; background: linear-gradient(to right, #ffffff, #94a3b8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 14px; color: var(--text-muted); line-height: 1.6; max-width: 90%; }

/* DASHBOARD CARDS */
.dashboard { padding: 0 24px 20px; display: flex; flex-direction: column; gap: 15px; }
.stat-card { background: var(--surface-color); border: 1px solid var(--border-color); border-radius: 20px; padding: 20px; display: flex; align-items: center; gap: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); position: relative; overflow: hidden; }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--primary-gradient); }
.stat-icon { font-size: 28px; background: rgba(0, 242, 254, 0.1); width: 50px; height: 50px; display: flex; justify-content: center; align-items: center; border-radius: 14px; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 600; margin-bottom: 4px; }
.stat-value { font-size: 24px; font-weight: 800; color: var(--primary); }
.stat-max { font-size: 14px; color: var(--text-muted); font-weight: 500; }

/* Blokir Card */
.block-card { border-color: rgba(239, 68, 68, 0.3); }
.block-card::before { background: var(--danger); }

/* MAIN CONTENT (RIWAYAT) */
.main-content { padding: 10px 24px 100px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.section-header h3 { font-size: 16px; font-weight: 700; }
.btn-text-danger { background: none; border: none; color: var(--danger); font-size: 13px; font-weight: 600; cursor: pointer; }
.history-container { display: flex; flex-direction: column; gap: 12px; }
.history-item { background: var(--surface-color); border: 1px solid var(--border-color); border-radius: 16px; padding: 16px; display: flex; justify-content: space-between; align-items: center; }
.history-info h4 { font-size: 14px; font-weight: 600; margin-bottom: 6px; word-break: break-all; }
.history-info p { font-size: 12px; color: var(--text-muted); }
.badge-fps { background: rgba(0, 242, 254, 0.1); color: var(--primary); border: 1px solid rgba(0, 242, 254, 0.2); padding: 6px 12px; border-radius: 10px; font-size: 12px; font-weight: 800; white-space: nowrap; }

/* EMPTY STATE */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; background: rgba(11, 17, 32, 0.5); border: 1px dashed var(--border-color); border-radius: 20px; }
.empty-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.7; }
.empty-state p { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.empty-state span { font-size: 12px; color: var(--text-muted); max-width: 250px; }

/* FAB */
.fab-wrapper { position: fixed; bottom: 30px; left: 0; width: 100%; display: flex; justify-content: center; pointer-events: none; z-index: 50; }
.fab { pointer-events: auto; background: var(--primary-gradient); width: 64px; height: 64px; border-radius: 50%; display: flex; justify-content: center; align-items: center; border: 4px solid var(--bg-color); box-shadow: 0 8px 25px rgba(0, 242, 254, 0.4); cursor: pointer; transition: transform 0.2s; }
.fab:active { transform: scale(0.92); }

/* =========================================
   KUNCI MODAL (PAMUNGKAS)
   ========================================= */
.modal { 
    display: flex !important; 
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    position: fixed; 
    top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0, 0, 0, 0.85); 
    backdrop-filter: blur(8px); 
    z-index: 100; 
    justify-content: center; 
    align-items: flex-end; 
    transition: opacity 0.3s ease;
}

.modal.active { 
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.modal-content { background: var(--surface-color); width: 100%; max-width: 500px; border-radius: 28px 28px 0 0; padding: 28px 24px; border-top: 1px solid rgba(255,255,255,0.05); animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1); max-height: 95vh; overflow-y: auto; }
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; } .mt-5 { margin-top: 5px; } .mb-20 { margin-bottom: 20px; }
.text-muted { color: var(--text-muted); font-size: 13px; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* HEADER MODAL & FORM */
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.modal-header h3 { font-size: 20px; font-weight: 800; }
.btn-close { background: var(--surface-hover); color: var(--text-muted); border: none; width: 36px; height: 36px; border-radius: 50%; font-size: 22px; display: flex; justify-content: center; align-items: center; cursor: pointer; }
.form-group { margin-bottom: 24px; }
.label { font-size: 13px; color: var(--text-muted); font-weight: 600; margin-bottom: 12px; display: block; }

/* FPS GRID */
.fps-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); /* UBAH DARI 4 MENJADI 3 */
    gap: 12px; 
}
.fps-grid input[type="radio"] { display: none; }
.fps-grid label { background: var(--bg-color); border: 1px solid var(--border-color); color: var(--text-muted); padding: 14px 0; text-align: center; border-radius: 14px; font-weight: 700; font-size: 16px; cursor: pointer; transition: 0.2s; }
.fps-grid input[type="radio"]:checked + label { background: rgba(0, 242, 254, 0.1); border-color: var(--primary); color: var(--primary); box-shadow: 0 0 15px rgba(0, 242, 254, 0.15); }

/* UPLOAD AREA */
.upload-area { background: var(--bg-color); border: 2px dashed var(--border-color); border-radius: 16px; padding: 30px 20px; text-align: center; cursor: pointer; transition: 0.3s; }
.upload-area:active { border-color: var(--primary); background: rgba(0, 242, 254, 0.05); }
.upload-icon { font-size: 32px; margin-bottom: 12px; }
.upload-area p { font-size: 13px; color: var(--text-muted); font-weight: 500; word-break: break-all; }
.input-file { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* BUTTONS */
.btn-primary { background: var(--primary-gradient); color: #000; width: 100%; border: none; padding: 18px; border-radius: 16px; font-size: 16px; font-weight: 800; cursor: pointer; transition: 0.3s; opacity: 0.3; pointer-events: none; }
.btn-primary.ready { opacity: 1; pointer-events: auto; box-shadow: 0 8px 20px rgba(0, 242, 254, 0.3); }
.btn-primary:active { transform: scale(0.98); }

/* =========================================
   FULLSCREEN IKLAN VIDEO
   ========================================= */
#modalAdVideo { 
    align-items: center; 
    background: #000; /* Latar hitam pekat */
    padding: 0;
}

.ad-video-modal { 
    background: transparent; /* Hilangkan background kotak */
    border-radius: 0; 
    max-width: 100%; 
    width: 100%;
    height: 100vh; /* Penuhi tinggi layar */
    margin: 0; 
    padding: 0;
    border: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Container Video */
.video-container { 
    width: 100%; 
    height: 100%; 
    background: #000; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    position: absolute;
    top: 0; left: 0;
    z-index: 1;
}

.video-container video { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; /* Video utuh tidak terpotong, sisa ruang jadi hitam */
}

/* Area Kontrol (Timer & Tombol) di atas video */
.ad-controls {
    position: absolute;
    bottom: 40px; /* Jarak dari bawah layar */
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
    padding: 0 20px;
}

.ad-text-container {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 20px;
    margin-bottom: 15px;
    text-align: center;
}

/* SUKSES ICON */
.success-icon { width: 80px; height: 80px; background: rgba(16, 185, 129, 0.1); border-radius: 50%; display: flex; justify-content: center; align-items: center; margin: 0 auto; }