/* --- CSS VARIABLES (Tema Biru Cerah / Light Blue) --- */
:root {
    --primary-color: #0ea5e9; /* Biru Cerah (Cyan) */
    --primary-dark: #0284c7;
    --secondary-color: #f0f9ff; /* Biru sangat muda untuk background */
    --text-main: #1e293b; /* Abu-abu kehitaman untuk teks */
    --text-muted: #64748b;
    --bg-main: #ffffff;
    --bg-alt: #f8fafc;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* --- RESET & TIPOGRAFI --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-alt);
    color: var(--text-main);
    line-height: 1.6;
}

/* --- PAGE TRANSITION --- */
.page-transition {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: #ffffff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease-out, visibility 1s ease-out;
}
.page-transition.hidden {
    opacity: 0;
    visibility: hidden;
}
.loader {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* --- NAVBAR --- */
.navbar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    padding: 15px 50px;
    z-index: 1000;
    transition: transform 0.4s ease, opacity 0.4s ease;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transform: translateY(-100%); /* Sembunyi di atas secara default */
    opacity: 0;
}
.navbar.scrolled {
    transform: translateY(0); /* Muncul meluncur ke bawah saat discroll */
    opacity: 1;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-logo {
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: 1.5px;
    color: #1a1a1a;
}
.nav-subtitle {
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    color: var(--text-main);
}

/* --- HERO SECTION --- */
.hero-section {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background-color: #fafafa;
}
.hero-bg-grid {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: 90px 90px;
    background-image: 
        linear-gradient(to right, rgba(0,0,0,0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0,0,0,0.05) 1px, transparent 1px);
    z-index: 0;
    /* Efek mask gradien dari solid ke transparan di bagian bawah */
    -webkit-mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
}
.hero-glow {
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.12) 0%, transparent 60%);
    z-index: 0;
}
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1000px;
}
.hero-title {
    font-size: 6rem;
    font-weight: 900;
    color: #1a1a1a;
    letter-spacing: -2px;
    margin-bottom: 20px;
    line-height: 1.1;
}
.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 40px;
}
.btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    font-weight: 700;
    padding: 15px 35px;
    border-radius: 4px;
    text-decoration: none;
    border: 1px solid var(--primary-dark);
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
    .hero-title { font-size: 3.5rem; }
    .navbar { padding: 15px 20px; }
}

/* --- FAQ SECTION (Accordion) --- */
.faq-section {
    padding: 60px 0;
    background-color: var(--bg-main);
}

.faq-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
}

.accordion {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.accordion-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.accordion-btn {
    width: 100%;
    text-align: left;
    padding: 20px;
    background-color: var(--bg-main);
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-btn:hover, .accordion-btn.active {
    background-color: var(--secondary-color);
    color: var(--primary-dark);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: var(--bg-alt);
}

.accordion-content p {
    padding: 20px;
    color: var(--text-muted);
}

.relative-z {
    position: relative;
    z-index: 1;
}

/* --- WORKSPACE SECTION --- */
.workspace-section {
    padding: 80px 0;
    position: relative;
    background-color: #fafafa;
    overflow: hidden;
}

.workspace-section h2 {
    text-align: center;
    font-size: 3.5rem;
    font-weight: 900;
    color: #1a1a1a;
    letter-spacing: -1px;
    margin-bottom: 50px;
}

.input-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.sample-images, .upload-box {
    background: var(--bg-main);
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.sample-gallery {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.sample-img-box {
    width: 100px;
    height: 100px;
    object-fit: cover;
    background-color: var(--secondary-color);
    border: 3px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.sample-img-box:hover, .sample-img-box.selected {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 150px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    padding: 20px;
}

.upload-label:hover {
    border-color: var(--primary-color);
    background-color: var(--secondary-color);
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* --- MODEL SELECTION (5 Buttons) --- */
.model-selection {
    text-align: center;
    background: var(--bg-main);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.model-selection h3 {
    margin-bottom: 20px;
}

.model-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.model-btn {
    padding: 12px 24px;
    background-color: var(--bg-main);
    color: var(--primary-dark);
    border: 2px solid var(--primary-color);
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.model-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* --- RESULT SECTION (Dynamic & Tabs) --- */
.result-section {
    padding: 20px 0 60px 0;
}

/* Desain untuk setiap blok hasil yang dirender dinamis */
.result-card {
    background: var(--bg-main);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 30px;
    margin-bottom: 40px;
    animation: fadeIn 0.5s ease-out;
}

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

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.result-stats {
    display: flex;
    gap: 20px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.btn-delete {
    background-color: var(--secondary-color);
    color: var(--primary-dark);
    border: none;
    border-radius: 10%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.5s ease;
}

.btn-delete:hover {
    background-color: #ef4444;
    color: white;
    transform: scale(1.05);
}

/* --- 3 Column Grid Result --- */
.result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.result-column {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.result-column h4 {
    margin-bottom: 15px;
    color: var(--primary-dark);
    font-size: 1.1rem;
}

.result-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    object-fit: cover;
    border: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .result-grid {
        grid-template-columns: 1fr;
    }
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 30px 0;
    background-color: #0f172a; /* Warna biru sangat gelap (slate-900) */
    color: white;
}

footer .team-members {
    margin-top: 10px;
    color: #cbd5e1;
    font-size: 0.9rem;
}

/* Responsif untuk Layar Kecil */
@media (max-width: 768px) {
    .input-area {
        grid-template-columns: 1fr;
    }
    .slider-container, .img-foreground {
        max-width: 100%;
    }
}
