:root {
    --bg-dark: #0f172a;
    --card-bg: #1e293b;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --accent: #818cf8;
    --success: #10b981;
    --danger: #f43f5e;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* Hilangkan highlight biru di Android */
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px; /* Jarak aman di HP */
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
}

/* --- CONTAINER UTAMA --- */
.security-overlay {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.security-box {
    width: 100%;
    max-width: 460px; /* Batas lebar di Desktop */
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    position: relative;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* --- HEADER --- */
.header-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.shield-icon {
    font-size: 2.5rem;
    color: var(--primary);
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.3));
}

.header-info h1 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.header-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- CONTENT SECTIONS --- */
.verification-prompt p {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Tombol Utama */
.btn-verify-start {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: all 0.2s ease;
}

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

/* --- LOADING ANIMATION --- */
.radar-container {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    position: relative;
    border-radius: 50%;
    border: 1px solid rgba(99, 102, 241, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
}

.radar-scan {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0%, rgba(99,102,241,0.5) 100%);
    animation: scan 2s linear infinite;
}

.center-icon {
    z-index: 2;
    font-size: 1.8rem;
    color: var(--accent);
}

/* --- PROGRESS BAR --- */
.loading-section {
    margin-bottom: 1.5rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.progress-track {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--primary);
    border-radius: 10px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.timer-badge {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums; /* Agar angka timer tidak goyang */
}

/* --- CONSOLE LOG --- */
.console-log {
    background: #0b1121;
    padding: 12px;
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.75rem;
    color: var(--success);
    height: 85px;
    overflow-y: hidden;
    border: 1px solid var(--border);
    line-height: 1.5;
}

/* --- ERROR STATE --- */
.error-content {
    text-align: center;
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

.error-icon-box {
    width: 80px;
    height: 80px;
    background: rgba(244, 63, 94, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2.5rem;
    color: var(--danger);
    border: 1px solid rgba(244, 63, 94, 0.2);
}

.error-content h3 {
    color: var(--text);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.error-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.btn-retry {
    padding: 12px 28px;
    background: transparent;
    border: 2px solid var(--danger);
    color: var(--danger);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-retry:hover {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.3);
}

/* --- PROMO SECTION --- */
.promo-section {
    width: 100%;
    max-width: 460px;
}

.promo-card {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 1rem 1.25rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s;
}

.promo-card:hover {
    transform: translateY(-2px);
    background: rgba(16, 185, 129, 0.12);
}

.promo-icon {
    font-size: 1.5rem;
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.promo-text {
    flex: 1;
}

.promo-text small {
    display: block;
    font-size: 0.7rem;
    color: var(--success);
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.promo-text h4 {
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 600;
}

.btn-promo {
    background: var(--success);
    color: #022c22;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* --- FOOTER --- */
.footer {
    font-size: 0.75rem;
    color: #64748b;
    text-align: center;
    line-height: 1.6;
}

/* --- UTILITIES --- */
.hidden { display: none !important; }
.screen-section { animation: fadeIn 0.4s ease-out; }

/* --- ANIMATIONS --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scan {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* --- MEDIA QUERIES (RESPONSIVE LOGIC) --- */
@media (max-width: 480px) {
    body {
        padding: 15px; /* Kurangi padding body di HP */
    }

    .security-box {
        padding: 1.5rem; /* Kurangi padding kartu */
        border-radius: 16px;
    }

    .header-status {
        margin-bottom: 1.5rem;
        gap: 0.75rem;
    }

    .shield-icon {
        font-size: 2rem; /* Perkecil icon */
    }

    .header-info h1 {
        font-size: 1.3rem; /* Perkecil judul */
    }

    .radar-container {
        width: 70px;
        height: 70px;
        margin-bottom: 1rem;
    }

    .center-icon {
        font-size: 1.5rem;
    }

    .promo-card {
        flex-direction: column; /* Stack promo vertikal di HP sangat kecil */
        text-align: center;
        gap: 10px;
        padding: 1rem;
    }

    .promo-text {
        width: 100%;
    }

    .btn-promo {
        width: 100%; /* Tombol full width */
        text-align: center;
    }
    
    .promo-icon {
        margin: 0 auto;
    }
}