:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --warning-color: #ffc107;
    --light-gray: #f7f8fa; /* Sedikit lebih abu-abu */
    --dark-gray: #1a202c; /* Lebih gelap untuk kontras */
    --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; }

/* Header & Navbar Baru */
.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); }

/* Gaya Pilihan Bahasa */
.lang-switcher { display: flex; align-items: center; gap: 0.5rem; }
.lang-switcher label { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }
.lang-switcher select {
    background-color: transparent;
    border: 1px solid var(--text-muted);
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--dark-gray);
    cursor: pointer;
}

/* Hero Section */
.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; }

/* Formulir Input */
.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; }

/* Platform yang Didukung */
.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; }
.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; }
.platform-icon svg { width: 20px; height: 20px; }
.platform-icon.youtube { fill: #FF0000; }
.platform-icon.tiktok { fill: #000000; }

/* Kontainer untuk Konten Lainnya */
.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); } }

/* Hasil Unduhan */
#error-message { color: #dc3545; background-color: #f8d7da; border: 1px solid #f5c2c7; padding: 1rem; border-radius: 8px; text-align: center; }
.video-info { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 20px; background-color: #f9f9f9; padding: 15px; border-radius: 8px;}
.video-info img { max-width: 160px; border-radius: 8px; flex-shrink: 0;}
.video-info-text h3 { margin: 0 0 10px 0; font-size: 1.2rem; }
.video-info-text p { margin: 0; font-size: 0.9rem; color: var(--text-muted); }

/* Gaya Kartu untuk How-To-Use dan FAQ */
.content-card {
    background-color: var(--white-color);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.content-card h2 {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

/* Gaya baru untuk FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
}
.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1.5rem 0;
    font-weight: 500;
    font-size: 1.1rem;
    cursor: pointer;
    gap: 1rem;
}

.faq-question:hover, .faq-question.active {
    color: var(--primary-color);
}
.faq-question:hover .faq-icon, .faq-question.active .faq-icon,
.faq-question:hover .faq-chevron, .faq-question.active .faq-chevron {
    stroke: var(--primary-color);
}

.faq-question .faq-icon {
    color: var(--primary-color);
    stroke: var(--primary-color);
    flex-shrink: 0;
}

.faq-question span {
    flex-grow: 1;
}

.faq-question .faq-chevron {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-question.active .faq-chevron {
    transform: rotate(180deg);
}

.faq-answer {
    display: none; /* Disembunyikan secara default */
    padding: 0 1rem 1.5rem 3rem; /* Padding agar sejajar dengan teks pertanyaan */
    color: var(--text-muted);
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.faq-answer p {
    margin: 0;
}

.formats-table { width: 100%; border-collapse: collapse; }
.formats-table th, .formats-table td { border: 1px solid var(--border-color); padding: 12px; text-align: center; }
.formats-table th { background-color: #f2f2f2; font-weight: 600; }
.download-link { font-weight: 500; background-color: var(--success-color); color: white !important; padding: 8px 14px; text-decoration: none; border-radius: 5px; display: inline-block; transition: background-color 0.2s; }
.download-link:hover { background-color: #157347; }
.download-link.merge { background-color: var(--warning-color); color: var(--dark-gray) !important; }
.download-link.merge:hover { background-color: #e6a700; }

/* Footer */
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; }
.footer-nav a { color: var(--text-muted); text-decoration: none; margin: 0 10px; }
.footer-nav a:hover { color: var(--primary-color); }

/* Penyesuaian untuk Mobile */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.25rem; }
    #process-btn { font-size: 0.9rem; padding: 0.75rem 1rem; }
    .nav-right { gap: 1rem; } /* Kurangi jarak di mobile */
}
@media (max-width: 480px) {
    .supported-platforms { flex-direction: column; gap: 0.5rem; }
}