:root {
    --primary: #2563EB; /* Blue 600 */
    --primary-dark: #1d4ed8;
    --secondary: #7C3AED; /* Violet 600 */
    --accent: #10B981; /* Emerald 500 */
    --bg-body: #F8FAFC;
    --text-dark: #0F172A;
    --text-gray: #64748B;
    --surface: #FFFFFF;
    --radius-lg: 16px;
    --radius-md: 12px;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.2);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Decoration (Mesh Gradient Tipis) */
.bg-decoration {
    position: fixed;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    height: 60vh;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.08) 0%, rgba(124, 58, 237, 0.05) 40%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.app-container {
    max-width: 540px; /* Mobile-first width tapi rapi di desktop */
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Navbar */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.brand { display: flex; align-items: center; gap: 10px; }
.logo-icon svg { width: 36px; height: 36px; }
.brand-text h1 { font-size: 1.25rem; font-weight: 800; color: var(--text-dark); line-height: 1; }
.brand-text span { font-size: 0.7rem; color: var(--primary); font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }

.status-badge {
    background: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dark);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex; align-items: center; gap: 6px;
    border: 1px solid #E2E8F0;
}
.dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 8px var(--accent); }

/* Hero Section */
.hero-text { text-align: center; margin-bottom: 2rem; }
.hero-text h2 { font-size: 1.75rem; font-weight: 800; line-height: 1.2; margin-bottom: 0.75rem; }
.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-text p { font-size: 0.95rem; color: var(--text-gray); line-height: 1.5; padding: 0 1rem; }

/* Main Card */
.main-card {
    background: var(--surface);
    padding: 6px; /* Padding luar untuk efek border tipis jika mau, disini clean */
    border-radius: var(--radius-lg);
    /* No shadow on container to match clean look, inputs have style */
}

/* Input Group yang Mirip Referensi */
.input-group {
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-md);
    padding: 6px 6px 6px 16px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: white;
}

.input-icon { font-size: 1.1rem; opacity: 0.7; margin-right: 10px; }

input {
    border: none;
    background: transparent;
    flex: 1;
    padding: 10px 0;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-dark);
    outline: none;
    min-width: 0;
}

.btn-paste {
    background: white;
    border: 1px solid #E2E8F0;
    color: var(--text-dark);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-paste:hover { background: #E2E8F0; }

.mt-3 { margin-top: 0.75rem; }

/* Button Utama */
.btn-primary-gradient {
    width: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, #4F46E5 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary-gradient:active { transform: scale(0.98); }
.btn-primary-gradient:hover { box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4); }

/* Feature Grid (Cards di bawah) */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

/* --- Folder Navigation (Breadcrumb) --- */
.folder-nav {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

#backBtn {
    background: transparent;
    border: 1px solid #E2E8F0; /* Border abu-abu tipis */
    color: var(--primary); /* Warna text biru */
    padding: 8px 16px;
    border-radius: 20px; /* Bentuk kapsul */
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

#backBtn:hover {
    background: #EFF6FF; /* Background biru muda saat hover */
    border-color: #DBEAFE;
    transform: translateX(-3px); /* Efek geser sedikit ke kiri */
    text-decoration: none;
}

@media (min-width: 480px) { .features-grid { grid-template-columns: 1fr; } } /* Stack di mobile */

.feature-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    text-align: center;
    border: 1px solid #F1F5F9;
    transition: transform 0.2s;
}
.feature-card:hover { transform: translateY(-2px); }

.feature-icon {
    width: 48px; height: 48px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
}
.feature-icon.blue { background: #EFF6FF; color: var(--primary); }
.feature-icon.purple { background: #F5F3FF; color: var(--secondary); }
.feature-icon.green { background: #ECFDF5; color: var(--accent); }

.feature-card h4 { margin-bottom: 0.5rem; font-weight: 700; }
.feature-card p { font-size: 0.85rem; color: var(--text-gray); line-height: 1.4; }

/* Result Section Styles (Agar hasil tetap konsisten dengan tema) */
.result-container { margin-top: 2rem; }
.result-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.btn-text { background: none; border: none; color: var(--text-gray); cursor: pointer; text-decoration: underline; font-size: 0.9rem; }

.file-card {
    background: white;
    padding: 1rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    margin-bottom: 1rem;
    border: 1px solid #F1F5F9;
}
.file-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.file-thumb-icon { font-size: 2rem; }
.file-info-text { flex: 1; overflow: hidden; }
.filename { font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filesize { font-size: 0.8rem; color: var(--text-gray); }

/* Update di style.css */
.file-thumb-img {
    width: 60px;  /* Sedikit lebih besar agar detail terlihat */
    height: 60px;
    border-radius: 8px;
    object-fit: contain; /* WAJIB: Agar gambar utuh, tidak di-crop/zoom */
    background-color: #000000; /* Background Hitam */
    border: 1px solid #333; /* Border tipis agar menyatu dengan dark bg */
    display: block;
}

/* Penyesuaian agar icon default (folder/file) tetap rapi */
.file-thumb-icon {
    width: 60px;
    height: 60px;
    background: #f1f5f9; /* Icon tetap background terang */
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.media-container video, .media-container img {
    width: 100%; border-radius: 8px; margin-bottom: 12px; background: #000;
}

.action-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-action {
    text-decoration: none; padding: 10px; border-radius: 8px; font-size: 0.85rem; font-weight: 600; text-align: center;
}
.btn-fast { background: #EFF6FF; color: var(--primary); border: 1px solid #DBEAFE; }
.btn-ori { background: white; color: var(--text-dark); border: 1px solid #E2E8F0; }

/* Utility */
.hidden { display: none !important; }
.loading-state { text-align: center; margin-top: 2rem; color: var(--text-gray); }
.spinner { width: 30px; height: 30px; border: 3px solid #E2E8F0; border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 10px; }
@keyframes spin { to { transform: rotate(360deg); } }
.alert-box { background: #FEF2F2; color: #DC2626; padding: 12px; border-radius: 8px; margin-top: 1rem; border: 1px solid #FEE2E2; font-size: 0.9rem; text-align: center; }
.footer { text-align: center; margin-top: 3rem; color: #94A3B8; font-size: 0.8rem; }

/* --- UPDATE STYLE UNTUK LAYOUT BARU --- */

/* Container Media (Thumbnail/Video) */
.media-cover {
    position: relative;
    width: 100%;
    /* Aspect ratio 16:9 agar terlihat cinematic */
    aspect-ratio: 16/9; 
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
}

.media-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Gambar utuh, sisa hitam */
}

/* Tombol Play Overlay di tengah thumbnail (Opsional, biar user tau itu video) */
.play-overlay {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 50px; height: 50px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid white;
    pointer-events: none; /* Klik tembus ke tombol/img */
}
.play-overlay svg { fill: white; width: 20px; height: 20px; margin-left: 2px; }

/* Layout Tombol Baru */
.action-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Tombol Streaming (Primary Action) */
.btn-stream {
    width: 100%;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%); /* Warna Amber/Orange */
    color: white;
    border: none;
    padding: 12px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: transform 0.2s;
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.3);
}
.btn-stream:active { transform: scale(0.98); }

/* Grid Tombol Download (Baris ke-2) */
.download-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Bagi 2 kolom rata */
    gap: 8px;
}

.btn-dl {
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    border: 1px solid #E2E8F0;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}

.btn-dl.fast { background: #EFF6FF; color: var(--primary); border-color: #DBEAFE; }
.btn-dl.ori { background: white; color: var(--text-dark); }