/* --- 1. SETUP VARIABLES (THEME) --- */
:root {
    --font: 'Plus Jakarta Sans', sans-serif;
    
    /* Light Mode */
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --border: #e2e8f0;
    --input-bg: #f1f5f9;
    --dot-color: #cbd5e1;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --primary: #818cf8;
    --primary-hover: #6366f1;
    --border: #334155;
    --input-bg: #0f172a;
    --dot-color: #334155;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

/* --- 2. RESET & BASE STYLES --- */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: var(--font);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    transition: background 0.3s, color 0.3s;
    overflow-x: hidden;
    font-size: 16px; 
}

.bg-pattern {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(var(--dot-color) 1.5px, transparent 1.5px);
    background-size: 24px 24px;
    z-index: -1;
    opacity: 0.6;
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

.container {
    width: 100%;
    max-width: 1000px; 
    margin: 0 auto;
    padding: 0 20px;
}

.hidden { display: none !important; }

/* --- 3. NAVBAR --- */
.navbar { padding: 15px 0; margin-bottom: 20px; }
.nav-content { display: flex; justify-content: space-between; align-items: center; }

.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.2rem; }
.logo-icon { color: var(--primary); }

.nav-right { display: flex; align-items: center; gap: 12px; }

/* Tombol Dark Mode & Sociabuzz yang Rapi */
.btn-icon {
    background: var(--input-bg); border: 1px solid var(--border);
    color: var(--text-main); padding: 0; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
    width: 40px; height: 40px; 
}
.btn-icon:hover { background: var(--border); }

.btn-sociabuzz {
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-main); padding: 0 12px; border-radius: 50px;
    font-weight: 600; text-decoration: none; font-size: 0.875rem;
    display: flex; align-items: center; gap: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    white-space: nowrap;
    height: 40px;
}

/* Sembunyikan text di mobile biar ga mepet */
.mobile-hide { display: none; } 

/* --- 4. HERO SECTION --- */
.hero-section { text-align: center; margin-bottom: 30px; padding: 0 10px; }
.hero-section h1 { 
    font-size: 1.75rem; 
    line-height: 1.25; 
    margin-bottom: 12px; 
    font-weight: 800; 
}
.hero-section span { color: var(--primary); }
.hero-section p { 
    color: var(--text-muted); 
    font-size: 0.95rem; 
    max-width: 500px; 
    margin: 0 auto; 
}

/* --- 5. AD BANNERS --- */
.ad-container { 
    text-align: center; 
    margin-bottom: 30px; 
    width: 100%;
    padding: 0 10px;
}
.ad-box {
    display: inline-flex; align-items: center; justify-content: center;
    width: 100%; max-width: 800px; 
    min-height: 100px; 
    background: var(--bg-card); border: 2px dashed var(--border);
    border-radius: 16px; color: var(--text-muted); font-size: 0.85rem;
    padding: 10px; box-shadow: var(--shadow);
    overflow: hidden;
}

/* --- 6. CARDS & UPLOAD --- */
.card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 20px; padding: 20px; 
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.upload-card {
    text-align: center; cursor: pointer; border: 2px dashed var(--border);
    padding: 50px 20px !important; /* Padding Lega */
    margin-bottom: 30px;
}
.upload-card:hover { border-color: var(--primary); transform: translateY(-3px); }
.upload-card.drag-active { background: var(--input-bg); border-color: var(--primary); }

.icon-wrap {
    width: 64px; height: 64px; background: var(--input-bg); color: var(--primary);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
}
.upload-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.upload-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 24px; }

/* --- 7. WORKSPACE --- */
.workspace { display: flex; flex-direction: column; gap: 24px; } 

.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.card-header h2 { font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }

.badge-btn {
    background: var(--input-bg); color: var(--primary); border: none;
    font-size: 0.75rem; font-weight: 700; padding: 6px 12px; border-radius: 8px;
    cursor: pointer; transition: opacity 0.2s;
}
.badge-btn:active { opacity: 0.7; }

.input-group { margin-bottom: 24px; }
.label-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-weight: 600; font-size: 0.9rem;}
.value-highlight { color: var(--primary); }

input[type=range] { width: 100%; accent-color: var(--primary); height: 6px; border-radius: 5px; cursor: pointer; }
.slider-labels { display: flex; justify-content: space-between; color: var(--text-muted); font-size: 0.75rem; margin-top: 8px; }

.custom-input, .custom-select {
    width: 100%; padding: 12px; border-radius: 12px; border: 1px solid var(--border);
    background: var(--bg-card); color: var(--text-main); font-size: 0.95rem; outline: none;
    margin-bottom: 5px;
}
.custom-input:focus, .custom-select:focus { border-color: var(--primary); }

.btn-primary {
    background: var(--primary); color: white; border: none;
    padding: 16px; border-radius: 14px; font-weight: 700; font-size: 1rem;
    cursor: pointer; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: background 0.2s; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }

/* --- 8. RESULTS CARD --- */
.result-item { border: 1px solid var(--border); }
.compare-wrapper { display: flex; flex-direction: column; gap: 15px; align-items: center; margin-bottom: 24px; }

.img-box {
    width: 100%; background: var(--input-bg); padding: 12px; border-radius: 16px;
    position: relative; text-align: center; border: 1px solid var(--border);
}
.img-box img { width: 100%; height: 200px; object-fit: contain; }
.img-box p { font-size: 0.9rem; font-weight: 700; margin-top: 10px; }

.img-tag {
    position: absolute; top: 12px; left: 12px; font-size: 0.7rem;
    padding: 4px 10px; border-radius: 6px; color: white; font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.gray { background: #64748b; }
.green { background: #10b981; }

.arrow-divider { color: var(--text-muted); font-size: 1.5rem; }

.footer { text-align: center; padding: 40px 0; color: var(--text-muted); font-size: 0.85rem; border-top: 1px solid var(--border); margin-top: 40px; }

/* --- 9. DESKTOP MEDIA QUERY (>768px) --- */
@media (min-width: 768px) {
    body { font-size: 16px; }
    
    .mobile-hide { display: inline; } /* Teks Support muncul di PC */
    .btn-sociabuzz { padding: 0 16px; }
    
    .hero-section h1 { font-size: 2.5rem; }
    
    .workspace { flex-direction: row; align-items: flex-start; }
    .settings-card { flex: 0 0 320px; position: sticky; top: 20px; }
    .result-list-container { flex: 1; }
    
    .compare-wrapper { flex-direction: row; justify-content: center; gap: 20px; }
    .img-box { width: 45%; }
    
    .arrow-divider { transform: rotate(-90deg); } /* Panah ke kanan */
    
    .card { padding: 30px; }
    .upload-card { padding: 60px 30px !important; }
}

/* --- INFO SECTION (How-To & Features) --- */

/* Steps Grid (1, 2, 3) */
.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
}

.step-item {
    padding: 10px;
}

.step-number {
    width: 40px; height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.2rem;
    margin: 0 auto 15px;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

/* Features Grid (Kotak-kotak Fitur) */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.feature-card {
    text-align: center;
    transition: transform 0.2s;
}
.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.feat-icon {
    width: 50px; height: 50px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 15px;
}

.feature-card h3, .step-item h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.feature-card p, .step-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* DESKTOP RESPONSIVE UNTUK INFO SECTION */
@media (min-width: 768px) {
    .steps-grid {
        grid-template-columns: 1fr 1fr 1fr; /* 3 Kolom sejajar */
        gap: 40px;
    }
    
    .features-grid {
        grid-template-columns: 1fr 1fr 1fr; /* 3 Kolom sejajar */
    }
}