/* =============================================== */
/* === STYLE.CSS - ANDROID LIGHT GRID & EDITOR === */
/* =============================================== */

:root {
    --bg-color: #edf7fe;       /* Latar belakang cerah */
    --text-primary: #333333;
    --card-bg: #ffffff;
    --radius: 30px;            /* Sudut membulat modern */
    
    /* Warna Editor */
    --editor-bg: #121212;
    --panel-bg: #1e1e1e;
}

body { 
    font-family: 'Segoe UI', Roboto, Helvetica, sans-serif; 
    background-color: var(--bg-color); 
    color: var(--text-primary);
    margin: 0; 
    padding: 0;
    /* Pattern background halus */
    background-image: radial-gradient(#e0e0e0 1px, transparent 1px);
    background-size: 20px 20px;
}

.header {
    padding: 20px 20px 10px 20px;
    text-align: left;
    background: transparent;
}
.header h1 { margin: 0; font-size: 1.6em; color: #2c3e50; font-weight: 800; }
.header p { margin: 5px 0 0 0; color: #7f8c8d; font-size: 0.9em; }

/* Slider Container (Horizontal Scroll) */
.slider-wrapper {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 20px 25px 20px;
    scrollbar-width: none; 
}
.slider-wrapper::-webkit-scrollbar { display: none; }

.slide-card {
    min-width: 85%;
    height: 160px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: var(--radius);
    box-shadow: 0 10px 20px rgba(118, 75, 162, 0.3);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    color: white;
    position: relative;
}
/* Variasi Warna Slider */
.slide-1 { background: linear-gradient(135deg, #00b09b, #96c93d); }
.slide-2 { background: linear-gradient(135deg, #ff9966, #ff5e62); }

.slide-card h3 { margin: 0; font-size: 1.4em; text-shadow: 0 2px 4px rgba(0,0,0,0.2); }

/* Label Kategori */
.menu-label {
    padding: 0 25px;
    font-weight: bold;
    color: #2c3e50;
    margin-top: 5px;
    border-left: 4px solid #00b09b;
    text-align: left;
}

/* Grid Menu Container */
.menu-container {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 15px;
    padding: 20px;
    max-width: 600px;
    margin: 0 auto 40px auto;
}

/* Card Style */
.menu-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-primary);
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    aspect-ratio: 1 / 1; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid transparent;
    transition: transform 0.2s;
}
.menu-card:active { transform: scale(0.95); }

.icon-box { font-size: 2.5em; margin-bottom: 10px; line-height: 1; }
.menu-card h2 { font-size: 0.9em; margin: 0; font-weight: 700; color: #34495e; text-transform: uppercase; }
.menu-card p { display: none; } 

/* Warna Aksen Border Bawah */
.card-inpainting { border-bottom: 4px solid #2ecc71; }
.card-bg-remove { border-bottom: 4px solid #3498db; }
.card-replace { border-bottom: 4px solid #e67e22; }
.card-blur { border-bottom: 4px solid #00bcd4; }
.card-upscale { border-bottom: 4px solid #9c27b0; }
.card-toonify { border-bottom: 4px solid #e91e63; }

/* =============================================== */
/* === BAGIAN 2: HALAMAN FITUR (EDITOR STYLE) === */
/* =============================================== */

.app-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    /* PERBAIKAN DI SINI: Hapus tanda pagar ganda (##) jadi (#) */
    background-color: #00f6ff; 
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* GAYA TOMBOL KEMBALI (REVISI AGAR TERLIHAT JELAS) */
.nav-btn-back {
    /* Gunakan inline-flex agar tombol membungkus ikon & teks dengan rapi */
    display: inline-flex; 
    align-items: center;
    justify-content: center;
    gap: 8px; /* Jarak ikon ke teks */
    
    /* WARNA TOMBOL: Putih agar kontras dengan Navbar Biru */
    background-color: #ffffff; 
    
    /* WARNA TEKS: Hitam/Gelap agar terbaca */
    color: #006064;            
    
    /* BENTUK: Lonjong (Kapsul) */
    padding: 8px 16px;         
    border-radius: 50px;       
    border: none; 
    
    text-decoration: none;     
    font-size: 0.9rem;         
    font-weight: 800; /* Font tebal */
    text-transform: uppercase; /* Huruf besar semua */
    
    /* BAYANGAN: Agar terlihat timbul (Tombol) */
    box-shadow: 0 3px 6px rgba(0,0,0,0.15); 
    transition: transform 0.2s ease, box-shadow 0.2s ease; 
}

/* Efek saat ditekan (Klik) */
.nav-btn-back:active {
    transform: scale(0.95); /* Mengecil saat ditekan */
    background-color: #f0f0f0; 
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.nav-title { 
    font-size: 1.1em; 
    font-weight: 900; 
    color: #004d40; /* Warna Judul Gelap */
    margin: 0; 
    text-transform: uppercase; 
    letter-spacing: 1px;
}
/* Upload Card */
.upload-card {
    margin: 40px 20px;
    height: 300px;
    background: white;
    border: 2px dashed #ccc;
    border-radius: 20px;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    color: #888; cursor: pointer;
}
.upload-icon { font-size: 4em; margin-bottom: 10px; }

/* Editor Container */
.editor-container { display: none; padding-bottom: 120px; }

/* Canvas Box */
.canvas-box {
    margin: 20px;
    background: #ccc; 
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: flex; justify-content: center;
    background-image: linear-gradient(45deg, #eee 25%, transparent 25%), linear-gradient(-45deg, #eee 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #eee 75%), linear-gradient(-45deg, transparent 75%, #eee 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

canvas { display: block; max-width: 100%; height: auto; }
#imageCanvas { position: relative; z-index: 1; }
#maskCanvas { 
    position: absolute; top: 0; left: 0; z-index: 10; 
    cursor: crosshair; touch-action: none; 
    background: transparent !important; 
}

/* Bottom Panel */
.bottom-panel {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: white;
    padding: 20px;
    border-top-left-radius: 25px; border-top-right-radius: 25px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    z-index: 999;
    max-height: 80vh;
    overflow-y: auto;
}

.status-badge { text-align: center; font-weight: bold; font-size: 0.9em; margin-bottom: 15px; }
.control-row { display: flex; gap: 10px; margin-bottom: 15px; align-items: center; }

/* Tombol */
.btn-primary-action {
    width: 100%; padding: 15px;
    border: none; border-radius: 12px;
    color: white; font-weight: bold; font-size: 1.1em;
    cursor: pointer; box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.btn-primary-action:active { transform: scale(0.98); }

.btn-secondary {
    background: #f5f5f5; border: 1px solid #ddd;
    color: #555; padding: 10px 20px;
    border-radius: 10px; flex: 1; cursor: pointer;
}

/* Slider */
input[type=range] { width: 100%; accent-color: #333; }

/* Comparison Result */
.comparison-container {
    display: flex;
    flex-direction: column; 
    gap: 15px;
    margin-top: 15px;
}
@media (min-width: 600px) { .comparison-container { flex-direction: row; } }

.compare-card {
    flex: 1;
    background: #f9f9f9;
    border-radius: 12px;
    padding: 10px;
    border: 1px solid #eee;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.compare-card img { width: 100%; height: auto; display: block; border-radius: 8px; }

.badge-label {
    position: absolute; top: 15px; left: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white; padding: 5px 12px;
    border-radius: 20px; font-size: 0.8em; font-weight: bold;
    backdrop-filter: blur(4px); z-index: 5;
}
.badge-success { background: rgba(46, 204, 113, 0.9); }

/* Result Page */
.result-view-container {
    display: none; 
    padding: 20px; padding-bottom: 50px;
    animation: fadeIn 0.3s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-header { text-align: center; margin-bottom: 25px; }
.result-header h2 { margin: 0; color: #2c3e50; }
.result-header p { margin: 5px 0 0 0; color: #7f8c8d; font-size: 0.9em; }

.result-card {
    background: white; border-radius: 15px;
    overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    margin-bottom: 25px; border: 1px solid #eee;
}
.result-card img { width: 100%; height: auto; display: block; }

.result-label {
    background: #f8f9fa; padding: 10px 15px;
    font-weight: bold; color: #555;
    border-bottom: 1px solid #eee;
    display: flex; justify-content: space-between; align-items: center;
}

.action-buttons-container { display: flex; flex-direction: column; gap: 15px; }