/* --- RESET GLOBAL UNTUK MOBILE --- */
* {
    /* Ini yang hapus warna biru pas diklik di HP */
    -webkit-tap-highlight-color: transparent;
    
    /* Ini biar teks gak gampang ke-select pas lagi scroll (opsional tapi keren) */
    -webkit-touch-callout: none;
    
    /* Memastikan box-sizing tetap aman */
    box-sizing: border-box;
}

/* Biar gak ada garis kotak (outline) pas diklik di desktop juga */
*:focus {
    outline: none;
}
:root {
    --primary: #007AFF;
    --primary-gradient: linear-gradient(135deg, #007AFF 0%, #00C6FF 100%);
    --radius: 22px;

    /* DARK MODE (Default) */
    --bg: #000000;
    --bg-image: radial-gradient(circle at top right, #1c1c1e, transparent), radial-gradient(circle at bottom left, #0a0a0a, transparent);
    --card: rgba(28, 28, 30, 0.8);
    --text: #f5f5f7;
    --text-sub: #a1a1a6;
    --nav-bg: rgba(0, 0, 0, 0.75);
    --input-bg: #1c1c1e;
    --border-color: rgba(255, 255, 255, 0.1);
    --card-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

/* LIGHT MODE REFINEMENT */
body.light-mode {
    --bg: #f2f2f7; 
    --bg-image: radial-gradient(circle at top right, #ffffff, transparent 70%), radial-gradient(circle at bottom left, #e5e5ea, transparent 70%);
    --card: rgba(255, 255, 255, 0.7); 
    --text: #1d1d1f;
    --text-sub: #86868b;
    --nav-bg: rgba(255, 255, 255, 0.8);
    --input-bg: rgba(0, 0, 0, 0.04);
    --border-color: rgba(0, 0, 0, 0.08);
    --card-border: rgba(255, 255, 255, 0.8);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

body { 
    background-color: var(--bg);
    background-image: var(--bg-image);
    color: var(--text); 
    line-height: 1.5;
    overflow-x: hidden;
    transition: background 0.4s ease, color 0.3s ease;
    min-height: 100vh;
}

.container { width: 92%; max-width: 800px; margin: 0 auto; }

/* NAVBAR */
.nav { 
    background: var(--nav-bg); 
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px);
    position: sticky; 
    top: 0; 
    z-index: 100; 
    border-bottom: 1px solid var(--border-color); 
}
.nav-wrapper { height: 74px; display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 24px; font-weight: 800; letter-spacing: -1px; color: var(--text); }
.logo span { background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* NAV RIGHT */
.nav-right { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-toggle:hover { transform: scale(1.05); background: var(--border-color); }

.status-web { 
    font-size: 11px; 
    font-weight: 700; 
    color: #34C759; 
    background: rgba(52, 199, 89, 0.1); 
    padding: 6px 14px; 
    border-radius: 20px; 
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* HERO */
.hero { text-align: center; padding: 80px 0 50px; animation: fadeInUp 0.8s ease-out; }
.hero h1 { font-size: 56px; font-weight: 800; letter-spacing: -2.5px; line-height: 1.1; color: var(--text); }
.hero h1 span { background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { color: var(--text-sub); margin-top: 15px; font-size: 20px; font-weight: 500; }

/* GLASS CARD */
.glass-card { 
    background: var(--card); 
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 40px; 
    border-radius: var(--radius); 
    box-shadow: var(--shadow);
    border: 1px solid var(--card-border);
    animation: fadeInUp 1s ease-out;
}

/* TABS */
.tab-container {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
    background: var(--input-bg);
    padding: 5px;
    border-radius: 16px;
}
.tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: var(--text-sub);
    font-weight: 700;
    cursor: pointer;
    border-radius: 12px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}
.tab-btn.active { background: var(--bg); color: var(--primary); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.4s ease; }

/* FORM GROUPS */
.form-group { margin-bottom: 25px; }
.form-group label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 8px; color: var(--text-sub); text-transform: uppercase; letter-spacing: 0.8px; }

.input-wrapper { 
    background: var(--input-bg); 
    border-radius: 16px; 
    display: flex; 
    align-items: center; 
    padding: 4px 18px; 
    border: 2px solid transparent; 
    transition: all 0.3s ease;
}
.input-wrapper:focus-within { border-color: var(--primary); background: var(--bg); }
.input-wrapper i { color: var(--text-sub); font-size: 18px; }
.input-wrapper input { border: none; background: transparent; padding: 14px; width: 100%; font-size: 16px; outline: none; color: var(--text); font-weight: 500; }
.domain-prefix { font-weight: 700; color: var(--primary); padding-right: 2px; }

/* BUTTONS */
.btn-primary { 
    width: 100%; 
    background: var(--primary-gradient); 
    color: white; 
    border: none; 
    padding: 18px; 
    border-radius: 18px; 
    font-size: 17px; 
    font-weight: 700; 
    cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(0, 122, 255, 0.3); }

/* --- FULL REFINEMENT: SECONDARY BUTTON (ADAPTIVE) --- */
.btn-secondary {
    background: var(--input-bg);
    color: var(--text);
    border: 1px solid var(--border-color); /* Menggunakan variabel border agar sinkron */
    padding: 14px;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 15px; /* Memberi jarak dari QR wrapper */
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* EFEK HOVER - ADAPTIF BERDASARKAN TEMA */
.btn-secondary:hover {
    transform: translateY(-3px);
    border-color: var(--primary); /* Pantulan warna biru tipis di border saat hover */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* KHUSUS DARK MODE (Default) */
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12); /* Efek glass putih tipis */
    color: #ffffff;
}

/* KHUSUS LIGHT MODE - Supaya tidak hilang/tetap kontras */
body.light-mode .btn-secondary:hover {
    background: #1d1d1f; /* Warna hitam elegan (Apple style) */
    color: #ffffff;      /* Teks jadi putih agar kontras di BG terang */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    border-color: transparent;
}

/* EFEK KLIK (Feedback Visual) */
.btn-secondary:active {
    transform: translateY(-1px);
    opacity: 0.8;
}

/* ANIMASI IKON DI DALAM TOMBOL */
.btn-secondary i {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 16px;
}

.btn-secondary:hover i {
    transform: translateY(2px); /* Efek ikon download seolah menunjuk ke bawah */
    color: var(--primary);      /* Ikonnya berubah biru sedikit biar cakep */
}

/* Biar rapi kalau ada teks di sebelah ikon */
.btn-secondary span {
    font-size: 14px;
    letter-spacing: 0.2px;
}
/* HISTORY SECTION */
.history-section { margin-top: 60px; padding-bottom: 40px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.section-header h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; color: var(--text); }

#clearBtn { background: rgba(255, 59, 48, 0.1); border: none; color: #ff3b30; cursor: pointer; font-weight: 700; padding: 8px 16px; border-radius: 12px; transition: 0.3s; }
#clearBtn:hover { background: #ff3b30; color: white; }

.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.link-item { 
    background: var(--card); 
    padding: 24px; 
    border-radius: 20px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    box-shadow: var(--shadow); 
    border: 1px solid var(--border-color);
    transition: 0.3s;
}
.link-item:hover { transform: translateY(-5px); border-color: var(--primary); }
.link-info h4 { font-size: 17px; color: var(--primary); font-weight: 700; margin-bottom: 4px; }
.link-info p { font-size: 13px; color: var(--text-sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }

.link-actions { display: flex; gap: 8px; }
.copy-btn-mini, .view-btn-mini { 
    background: var(--input-bg); 
    border: none; 
    width: 42px; 
    height: 42px; 
    border-radius: 12px; 
    cursor: pointer; 
    transition: 0.3s;
    font-size: 16px;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
}
.copy-btn-mini:hover, .view-btn-mini:hover { background: var(--primary); color: white; }


/* FOOTER */
.footer-pro { background: var(--card); border-top: 1px solid var(--border-color); padding: 60px 0 40px; margin-top: 80px; }
.footer-main { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; margin-bottom: 40px; }
.system-tag { font-size: 10px; font-weight: 800; color: var(--text-sub); letter-spacing: 2px; text-transform: uppercase; margin-top: 8px; }

.footer-stats { display: flex; gap: 40px; }
.stat-box { display: flex; flex-direction: column; }
.stat-label { font-size: 9px; font-weight: 800; color: var(--text-sub); letter-spacing: 1.5px; margin-bottom: 4px; }
.stat-value { font-family: 'SF Mono', monospace; font-size: 14px; font-weight: 700; color: var(--text); }
.status-online { color: #34C759; display: flex; align-items: center; gap: 6px; }
.status-online::before { content: ''; width: 6px; height: 6px; background: #34C759; border-radius: 50%; }

.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 30px; border-top: 1px solid var(--border-color); }
.copyright { font-size: 10px; font-weight: 700; color: var(--text-sub); letter-spacing: 1px; }
.social-links-pro a { color: var(--text); font-size: 18px; margin-left: 20px; opacity: 0.6; transition: 0.3s; }
.social-links-pro a:hover { opacity: 1; color: var(--primary); }

/* DEVELOPER SECTION STYLING */
/* FOOTER DEVELOPER SECTION */
/* --- FOOTER DEVELOPER SECTION (ORIGINAL RETAINED) --- */
.footer-developer {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.dev-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

.dev-info {
    display: flex;
    flex-direction: column;
}

/* LINK PORTFOLIO STYLING */
.dev-name-link {
    text-decoration: none;
    display: inline-block;
    position: relative;
    padding-bottom: 2px;
    transition: transform 0.3s ease;
}

.dev-name-link:hover {
    transform: translateY(-2px);
}

/* TEXT GRADIENT */
.dev-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: 0.5px;
    /* Tetap pakai var(--text) agar otomatis ganti warna jika variabelmu berubah */
    background: linear-gradient(135deg, var(--text) 0%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: 0.3s;
}

/* ANIMASI GARIS: KANAN KE KIRI */
.dev-name-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    /* Menggunakan gradien biru ke warna teks utama */
    background: linear-gradient(to left, #38bdf8, var(--text));
    transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 2px;
}

.dev-name-link:hover::after {
    width: 100%;
    left: 0;
}

/* GLOW EFFECT SAAT HOVER */
.dev-name-link:hover .dev-name {
    filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.4));
}

.dev-status {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-sub);
    opacity: 0.7;
    text-transform: uppercase;
    margin-top: 2px;
}

/* --- LIGHT MODE ADAPTATION --- */
/* Menyesuaikan elemen spesifik saat mode light aktif */
body.light-mode .dev-name {
    /* Di mode terang, kita pastikan warna teks dasar adalah hitam/gelap agar gradiennya terlihat */
    background: linear-gradient(135deg, #0f172a 0%, #007AFF 100%);
    -webkit-background-clip: text;
}

body.light-mode .dev-name-link::after {
    /* Garis underline disesuaikan agar lebih kontras di background putih */
    background: linear-gradient(to left, #007AFF, #0f172a);
}

body.light-mode .dev-status {
    color: #475569; /* Abu-abu yang lebih gelap agar terbaca */
    opacity: 0.9;
}

/* RESPONSIVITAS (ASLI + PENYESUAIAN) */
@media (max-width: 768px) {
    .footer-main {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }
    
    .footer-stats, 
    .footer-developer, 
    .dev-profile {
        align-items: center;
        justify-content: center;
    }

    .dev-info {
        align-items: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
    }

    .social-links-pro a {
        margin: 0 10px;
    }
}
/* LEGAL LINKS (TOS & PRIVACY) */
.footer-legal {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legal-link {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-sub);
    text-decoration: none;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: 0.3s;
    opacity: 0.6;
}

.legal-link:hover {
    opacity: 1;
    color: #38bdf8; /* Warna biru biar sinkron sama nama developer */
}

/* Warna separator default (Mode Gelap) */
.separator {
    font-size: 12px;
    color: var(--card-border); /* Mengikuti border card agar halus */
    opacity: 0.5;
    user-select: none;
    transition: color 0.3s ease;
}

/* KHUSUS LIGHT MODE */
/* Pastikan ini diletakkan setelah definisi .separator asli */
body.light-mode .separator {
    color: #000000; /* Titik jadi hitam pekat */
    opacity: 0.3;    /* Dikasih opacity dikit biar gak terlalu kontras/galak */
}

/* Pastikan teks link legal juga menyesuaikan di Light Mode */
body.light-mode .legal-link {
    color: #000000; 
}

body.light-mode .legal-link:hover {
    color: #38bdf8; /* Tetap biru biar konsisten brandingnya */
    opacity: 1;
}

/* Penyesuaian Responsivitas (Tambahkan di dalam media query 768px kamu) */
@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: 15px; /* Kurangi gap biar gak terlalu panjang */
    }
    
    .footer-legal {
        order: 2; /* Taruh di tengah-tengah saat mode HP */
    }
    
    .social-links-pro {
        order: 3;
    }
    
    .copyright {
        order: 1;
    }
}

/* TOAST */
.toast {
    position: fixed; top: -100px; left: 50%; transform: translateX(-50%);
    min-width: 250px; background: var(--card); backdrop-filter: blur(20px);
    padding: 14px 24px; border-radius: 20px; box-shadow: var(--shadow);
    border: 1px solid var(--card-border); z-index: 10000; transition: 0.5s cubic-bezier(0.2, 1, 0.2, 1); opacity: 0;
}
.toast.show { top: 30px; opacity: 1; }
.toast-content { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 600; }

/* Efek Geter untuk Error */
.error-shake {
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

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

/* Warna khusus icon error */
.error-icon {
    color: #FF3B30;
}

.success-icon {
    color: #34C759;
}

/* MODAL OVERLAY */
.modal-overlay {
    position: fixed; 
    inset: 0; 
    background: rgba(0, 0, 0, 0.5); /* Gelapkan sedikit agar lebih fokus */
    backdrop-filter: blur(10px); /* Blur lebih halus */
    display: none; 
    align-items: center; 
    justify-content: center; 
    z-index: 11000; 
    opacity: 0; 
    transition: opacity 0.3s ease;
}

.modal-overlay.show { 
    display: flex; 
    opacity: 1; 
}

/* MODAL CARD */
.modal-card {
    background: var(--card); 
    padding: 32px; /* Padding lebih lega */
    border-radius: 28px; 
    max-width: 380px; 
    width: 90%;
    text-align: center; 
    border: 1px solid var(--card-border); 
    transform: scale(0.9); 
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); /* Efek spring sedikit */
}

.modal-overlay.show .modal-card { 
    transform: scale(1); 
}

/* ICON */
/* ICON - Tambahkan animasi di sini */
.modal-icon { 
    width: 56px; 
    height: 56px; 
    background: rgba(255, 59, 48, 0.15); /* Sedikit lebih terang */
    color: #FF3B30; 
    font-size: 22px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 50%; 
    margin: 0 auto 20px;
    
    /* Tambahkan Baris Ini */
    position: relative;
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.4);
    animation: trash-pulse 2s infinite; /* Efek nyala berdenyut */
}

/* Animasi Sampah Nyala */
@keyframes trash-pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.5);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 15px rgba(255, 59, 48, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0);
    }
}

/* Opsional: Bikin icon di dalamnya goyang dikit (Wiggle) */
.modal-icon i {
    animation: trash-wiggle 3s infinite;
}

@keyframes trash-wiggle {
    0%, 90%, 100% { transform: rotate(0); }
    92% { transform: rotate(-10deg); }
    94% { transform: rotate(10deg); }
    96% { transform: rotate(-10deg); }
    98% { transform: rotate(10deg); }
}

/* TYPOGRAPHY */
.modal-card h3 {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
}

.modal-card p {
    margin: 0 0 24px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* BUTTONS */
.modal-buttons { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 12px; 
}

.modal-buttons button {
    padding: 12px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: 0.2s;
}

/* BTN DANGER */
.btn-danger { 
    background: #FF3B30; 
    color: white; 
}

.btn-danger:hover {
    background: #E0352B;
    transform: translateY(-1px);
}

/* BTN SECONDARY */
.btn-secondary2 { 
    background: var(--card-border); /* Gunakan warna border agar nyambung */
    color: var(--text-primary);
    border: 1px solid transparent;
}

.btn-secondary2:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-secondary);
}

/* ICONS COLORS */
.fa-moon { color: #5e5ce6; }
.fa-sun { color: #ff9f0a; }


.optional-text {
    font-size: 10px;
    text-transform: none; /* Supaya tidak jadi UPPERCASE seperti labelnya */
    font-weight: 500;
    color: var(--text-sub);
    opacity: 0.7;
    margin-left: 4px;
    letter-spacing: 0;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .hero h1 { font-size: 42px; }
    .footer-main, .footer-bottom { flex-direction: column; text-align: center; gap: 30px; }
    .footer-stats { justify-content: center; width: 100%; }
    .social-links-pro a { margin: 0 10px; }
}

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


/* --- STYLING KHUSUS REDIRECT --- */

/* Container Utama Overlay */
.overlay {
    position: fixed;
    inset: 0;
    background: var(--bg);
    background-image: var(--bg-image);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: background 0.4s ease;
}

/* Card Redirect */
.overlay-card {
    background: var(--card);
    padding: 40px;
    border-radius: 32px;
    box-shadow: var(--shadow);
    text-align: center;
    max-width: 420px;
    width: 90%;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: fadeInUp 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Spinner Animasi */
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--input-bg);
    border-left-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 25px;
    animation: spin 1s linear infinite;
}

.overlay-card h3 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    color: var(--text);
}

/* Host Tujuan */
#targetHost {
    font-family: 'SF Mono', 'JetBrains Mono', monospace;
    font-size: 14px;
    color: var(--primary);
    background: var(--input-bg);
    padding: 8px 16px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 30px;
    word-break: break-all;
    max-width: 100%;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--input-bg);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary-gradient);
    border-radius: 10px;
    animation: progressLoad 2s ease-in-out forwards;
}

/* Keyframes */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes progressLoad {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}


/* --- HISTORY ITEM & LINK STYLING --- */
.link-item { 
    background: var(--card); 
    padding: 20px; 
    border-radius: 20px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    box-shadow: var(--shadow); 
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 15px; /* Jarak antara teks dan tombol */
}

.link-item:hover { 
    transform: translateY(-4px); 
    border-color: var(--primary); 
    background: var(--input-bg);
}

/* Membungkus info agar flexbox bekerja dengan benar untuk pemotongan teks */
.link-info {
    flex: 1;
    min-width: 0; /* Penting agar text-overflow: ellipsis bekerja */
}

/* --- HISTORY LINK MODERN STYLING --- */
.history-link {
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 16px;
    transition: color 0.3s ease;
    display: inline-block; 
    position: relative; /* Penting untuk posisi garis */
    padding-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Membuat garis bawah statis yang halus */
.history-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--border-color); /* Warna awal (abu-abu/soft) */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

/* Efek saat Hover: Garis berubah warna dan sedikit menebal/bercahaya */
.history-link:hover {
    color: var(--primary);
}

.history-link:hover::after {
    background-color: var(--primary);
    height: 2px;
    box-shadow: 0 1px 4px rgba(0, 122, 255, 0.3); /* Sedikit efek glow biru */
    transform: translateY(-1px); /* Garis naik sedikit agar dinamis */
}

.history-link span {
    color: var(--primary);
    transition: filter 0.3s ease;
}

.history-link:hover span {
    filter: brightness(1.2); /* Span biru jadi lebih menyala saat di-hover */
}

/* URL Tujuan (Long URL) */
.link-info p {
    font-size: 12px;
    color: var(--text-sub);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%; /* Mengikuti lebar container */
}

/* --- TOMBOL AKSI (SOLID & MODERN) --- */
.link-actions { 
    display: flex; 
    gap: 10px; 
    flex-shrink: 0; /* Mencegah tombol gepeng di HP */
}

.copy-btn-mini, .view-btn-mini { 
    background: var(--input-bg); 
    border: 1px solid var(--border-color);
    width: 44px; 
    height: 44px; 
    border-radius: 12px; 
    cursor: pointer; 
    transition: all 0.2s ease;
    font-size: 16px;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hover State untuk Tombol Copy */
.copy-btn-mini:hover { 
    background: var(--primary); 
    color: white; 
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

/* Hover State untuk Tombol View QR */
.view-btn-mini:hover { 
    background: #34C759; /* Hijau Segar */
    color: white; 
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3);
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 480px) {
    .link-item {
        padding: 16px;
        border-radius: 18px;
    }
    
    .history-link { font-size: 15px; }
    
    .copy-btn-mini, .view-btn-mini { 
        width: 40px; 
        height: 40px; 
        font-size: 14px;
    }
}
#qrcode {
    padding: 20px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    display: inline-block;
    transition: transform 0.3s ease;
}

#qrcode:hover {
    transform: scale(1.02);
}

.qr-logo-overlay {
    pointer-events: none; /* Agar tidak mengganggu klik kanan simpan gambar */
    user-select: none;
}

/* iCard Popup Styling */
/* iCard Popup Styling - Adaptive & Modern */
.icard-popup {
    position: fixed;
    bottom: -500px; /* Sembunyi lebih dalam */
    right: 20px;
    width: 320px;
    background: var(--card); /* Mengikuti variabel tema kamu */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    z-index: 9999;
    display: flex;
    gap: 15px;
    transition: all 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.icard-popup.show {
    bottom: 25px;
}

.icard-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--input-bg); /* Mengikuti BG input kamu */
    border: 1px solid var(--border-color); /* Beri border tipis agar terlihat di mode light */
    color: var(--text-sub);
    cursor: pointer;
    font-size: 12px; /* Ukuran icon X diperkecil sedikit agar elegan */
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease; /* Transisi lebih cepat (snappy) */
    z-index: 10;
    outline: none;
}

.icard-close:hover {
    background: #ff3b30; /* Merah khas iOS */
    color: white;
    border-color: transparent;
    transform: rotate(90deg); /* Efek putar sedikit saat hover agar dinamis */
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3); /* Glow merah tipis */
}

/* Efek saat di-klik (feedback visual) */
.icard-close:active {
    transform: scale(0.9) rotate(90deg);
    opacity: 0.8;
}

.icard-icon {
    background: var(--primary-gradient);
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 26px;
    flex-shrink: 0;
    box-shadow: 0 8px 16px rgba(0, 122, 255, 0.2);
}

.icard-text h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
}

.icard-text p {
    font-size: 13px;
    color: var(--text-sub);
    margin: 0 0 14px 0;
    line-height: 1.4;
}

.icard-text span { font-weight: 700; color: var(--primary); }

.icard-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    transition: 0.3s;
}

.icard-btn:hover { 
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 122, 255, 0.4);
}

/* Mobile: Full Width di bawah */
@media (max-width: 480px) {
    .icard-popup {
        left: 15px;
        right: 15px;
        width: auto;
        bottom: -250px;
    }
    .icard-popup.show {
        bottom: 20px;
    }
}


/* --- ABOUT SECTION STYLING --- */
.about-section {
    padding: 100px 0;
    position: relative;
}

.about-header {
    text-align: center;
    margin-bottom: 60px;
}

.badge-ai {
    background: var(--input-bg);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.about-header h2 {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
}

.about-header h2 span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lead-text {
    color: var(--text-sub);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}

/* Grid Layout */
.about-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* Content Block */
.content-block h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--text);
}

.content-block p {
    color: var(--text-sub);
    line-height: 1.6;
}

/* Stats Styling */
.stats-row {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.stat-item {
    flex: 1;
    background: var(--card);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid var(--card-border);
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
}

.stat-desc {
    font-size: 11px;
    color: var(--text-sub);
    text-transform: uppercase;
    font-weight: 700;
}

/* Feature Cards */
.about-features {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.feature-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--card);
    border-radius: 20px;
    border: 1px solid var(--card-border);
    transition: 0.3s ease;
}

.feature-card:hover {
    transform: translateX(10px);
    border-color: var(--primary);
}

.f-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.f-info h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.f-info p {
    font-size: 13px;
    color: var(--text-sub);
}

/* Tech Icons */
.about-tech {
    text-align: center;
    margin-top: 80px;
}

.about-tech p {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-sub);
    letter-spacing: 2px;
    margin-bottom: 25px;
}

.tech-icons {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 32px;
    color: var(--text-sub);
    opacity: 0.6;
}

.tech-icons i:hover {
    color: var(--primary);
    opacity: 1;
    transform: scale(1.1);
    transition: 0.3s;
}

/* Responsivitas About */
@media (max-width: 768px) {
    .about-main-grid {
        grid-template-columns: 1fr;
    }
    
    .about-header h2 {
        font-size: 32px;
    }
    
    .stats-row {
        flex-wrap: wrap;
    }
}


/* --- DYNAMIC DIVIDER STYLING --- */
.dynamic-divider {
    position: relative;
    height: 180px;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 40px 0;
}

/* Background Mesh Gradient yang Bergerak */
.mesh-gradient {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(0, 122, 255, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 80% 70%, rgba(0, 198, 255, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 50% 50%, rgba(94, 92, 230, 0.1) 0%, transparent 60%);
    filter: blur(40px);
    z-index: -1;
    animation: meshRotate 15s linear infinite alternate;
}

@keyframes meshRotate {
    0% { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
    100% { transform: translate(-50%, -50%) rotate(5deg) scale(1.1); }
}

.divider-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 1;
}

/* Badge Scroll yang Berdenyut */
.scroll-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-sub);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.6;
}

.scroll-badge i {
    font-size: 14px;
    animation: bounceDown 2s infinite;
}

@keyframes bounceDown {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(6px); }
    60% { transform: translateY(3px); }
}

/* Ikon Melayang 3D */
.floating-icons {
    display: flex;
    gap: 50px;
    position: relative;
}

.float-item {
    width: 54px;
    height: 54px;
    background: var(--card);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary);
    box-shadow: var(--shadow);
    transition: 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.float-item:hover {
    transform: translateY(-15px) rotateX(10deg) rotateY(10deg);
    border-color: var(--primary);
    color: var(--text);
    background: var(--primary-gradient);
}

/* Delay Animasi untuk masing-masing ikon */
.shadow-1 { animation: floatAnim 4s ease-in-out infinite; }
.shadow-2 { animation: floatAnim 4s ease-in-out infinite 1s; }
.shadow-3 { animation: floatAnim 4s ease-in-out infinite 2s; }

@keyframes floatAnim {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Penyesuaian Light Mode */
body.light-mode .float-item {
    background: rgba(255, 255, 255, 0.8);
}


/* PREVIEW MODAL STYLES */
.preview-card { max-width: 450px !important; }

.preview-options {
    display: flex;
    gap: 20px;
    margin: 25px 0;
    justify-content: center;
}

.option-item {
    flex: 1;
    cursor: pointer;
    transition: 0.3s;
    border: 2px solid transparent;
    padding: 10px;
    border-radius: 20px;
    text-align: center;
}

.option-item span {
    font-size: 12px;
    font-weight: 700;
    margin-top: 10px;
    display: block;
    color: var(--text-sub);
}

.option-item.active {
    background: rgba(0, 122, 255, 0.1);
    border-color: var(--primary);
}

.option-item.active span { color: var(--primary); }

/* Simulasi Preview Kecil */
.mini-preview {
    aspect-ratio: 1/1.2;
    background: white;
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 4px solid #007AFF;
    position: relative;
}

.qr-placeholder {
    width: 100%;
    height: 70%;
    background: #0f172a;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 3h8v8H3V3zm2 2v4h4V5H5zm8-2h8v8h-8V3zm2 2v4h4V5h-4zM3 13h8v8H3v-8zm2 2v4h4v-4H5zm13-2h3v2h-3v-2zm-3 0h2v2h-2v-2zm3 3h3v3h-3v-3zm-3 0h2v2h-2v-2zm3 3h3v2h-3v-2zm-3 0h2v2h-2v-2zm-3-3h2v2h-2v-2zm0-3h2v2h-2v-2z'/%3E%3C/svg%3E") no-repeat center;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 3h8v8H3V3zm2 2v4h4V5H5zm8-2h8v8h-8V3zm2 2v4h4V5h-4zM3 13h8v8H3v-8zm2 2v4h4v-4H5zm13-2h3v2h-3v-2zm-3 0h2v2h-2v-2zm3 3h3v3h-3v-3zm-3 0h2v2h-2v-2zm3 3h3v2h-3v-2zm-3 0h2v2h-2v-2zm-3-3h2v2h-2v-2zm0-3h2v2h-2v-2z'/%3E%3C/svg%3E") no-repeat center;
}

.style-mini { aspect-ratio: 1/1; }

.label-placeholder {
    font-size: 8px;
    font-weight: 900;
    color: #0f172a;
    margin-top: 5px;
}