:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --warning-color: #ffc107;
    --light-gray: #f7f8fa;
    --dark-gray: #1a202c;
    --border-color: #e2e8f0;
    --white-color: #fff;
    --text-muted: #6c757d;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--white-color);
    color: var(--dark-gray);
    margin: 0;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1; }

.main-header {
    background: #d5dbdb;
    border-bottom: 1px solid #c8cdcd;
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar { padding: 0 2rem; }
.nav-container { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; height: 64px; }
.nav-brand { font-size: 1.25rem; font-weight: 700; text-decoration: none; color: var(--dark-gray); }
.nav-right { display: flex; align-items: center; gap: 2rem; }
.nav-menu { list-style: none; display: flex; gap: 2rem; margin: 0; padding: 0; }
.nav-menu a { text-decoration: none; color: var(--text-muted); font-weight: 500; transition: color 0.2s; }
.nav-menu a:hover { color: var(--dark-gray); }

.hero-section { text-align: center; padding: 4rem 1rem; }
.hero-content { max-width: 700px; margin: 0 auto; }
.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    background: linear-gradient(90deg, #0d6efd, #00c6ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    margin-bottom: 1rem;
}
.hero-content .subtitle { font-size: 1.125rem; color: var(--text-muted); margin-bottom: 2.5rem; }
.form-container { max-width: 600px; margin: 0 auto; }

.input-group { 
    display: flex; align-items: center; background: var(--white-color); border-radius: 12px; 
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color); padding: 0.5rem; transition: box-shadow 0.2s;
}
.input-group:focus-within { box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25); border-color: var(--primary-color); }
.input-icon { margin: 0 0.75rem; color: var(--text-muted); }
#video-url { flex-grow: 1; padding: 0.75rem 0.25rem; border: none; background: transparent; font-size: 1rem; outline: none; color: var(--dark-gray); }
#process-btn { 
    padding: 0.75rem 1.5rem; border: none; background-color: var(--primary-color); color: white; 
    font-size: 1rem; font-weight: 500; cursor: pointer; border-radius: 8px; transition: background-color 0.2s;
}
#process-btn:hover { background-color: #0b5ed7; }
#process-btn:disabled { background-color: #a0cfff; cursor: not-allowed; }

.supported-platforms { margin-top: 2rem; display: flex; justify-content: center; align-items: center; gap: 1rem; color: var(--text-muted); }
.platform-icons { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.platform-icon { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; border: 1px solid var(--border-color); border-radius: 8px; font-size: 0.9rem; font-weight: 500; transition: all 0.2s ease-in-out; color: var(--dark-gray); }
a.platform-icon, a.platform-icon:visited { text-decoration: none !important; color: var(--dark-gray) !important; }
a.platform-icon svg { fill: var(--dark-gray); }
.platform-icon:hover { border-color: var(--primary-color); background-color: var(--light-gray); color: var(--primary-color) !important; cursor: pointer; }
a.platform-icon:hover svg, .platform-icon:hover svg { fill: var(--primary-color); }
.platform-icon svg { width: 20px; height: 20px; transition: fill 0.2s ease-in-out; }
.platform-icon.youtube svg { fill: #FF0000; }
.platform-icon.facebook svg { fill: #1877F2; }
.platform-icon.tiktok svg { fill: #000000; }
.platform-icon.instagram svg { fill: #333; }

.container { max-width: 800px; margin: 2rem auto; padding: 0 1rem; }
#results { margin-top: 30px; }
#loader { display: none; margin: 25px auto; border: 5px solid #f3f3f3; border-radius: 50%; border-top: 5px solid var(--primary-color); width: 40px; height: 40px; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

footer { text-align: center; padding: 2rem; margin-top: 2rem; background-color: #fafafa; border-top: 1px solid var(--border-color); font-size: 0.9rem; }
footer .container { padding: 0; box-shadow: none; background: transparent; }

/* --- GAYA UNTUK POPUP MODAL --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none; /* INI YANG PENTING: MENYEMBUNYIKAN POPUP SECARA DEFAULT */
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 550px;
    position: relative;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
}
.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #888;
}
.modal-video-info { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.modal-video-info img { width: 100px; height: auto; border-radius: 8px; object-fit: cover; }
.modal-video-details h3 { margin: 0 0 0.5rem 0; font-size: 1.2rem; line-height: 1.3; }
.modal-video-details p { margin: 0; color: var(--text-muted); }
.modal-tabs { display: flex; border-bottom: 1px solid var(--border-color); margin-bottom: 1.5rem; }
.tab-link {
    padding: 0.8rem 1rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 3px solid transparent;
}
.tab-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}
.tab-content { display: none; }
.tab-content.active { display: block; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-weight: 500; margin-bottom: 0.5rem; }
.form-group select, .form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}
.btn.btn-primary { width: 100%; padding: 1rem; font-size: 1.1rem; background: var(--primary-color); color: white; border: none; border-radius: 8px; cursor: pointer; }

/* Gaya untuk Toggle Switch */
.toggle-group { display: flex; justify-content: space-between; align-items: center; }
.switch { position: relative; display: inline-block; width: 50px; height: 28px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; }
.slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 4px; bottom: 4px; background-color: white; transition: .4s; }
input:checked + .slider { background-color: var(--primary-color); }
input:checked + .slider:before { transform: translateX(22px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }
.cut-file-inputs { display: none; gap: 1rem; margin-top: -1rem; margin-bottom: 1.5rem; }
.processing-message { display: none; text-align: center; margin-top: 1rem; color: var(--text-muted); }