:root {
    --primary-red: #ff0000;
    --dark-red: #cc0000;
    --bg-light: #f9f9f9;
    --white: #ffffff;
    --text-main: #0f0f0f;
    --text-muted: #606060;
    --border-color: #e5e5e5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header & Navigasi */
header {
    background-color: var(--white);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
}

.red-text {
    color: var(--primary-red);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 3px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--primary-red);
}

/* Main Content & Converter */
main {
    flex: 1;
    padding: 40px 5%;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.converter-section {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
    margin-bottom: 40px;
}

.converter-section h2 {
    margin-bottom: 10px;
    font-size: 28px;
}

.converter-section p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Input Area */
#input-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

input[type="text"] {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border 0.3s;
}

input[type="text"]:focus {
    border-color: var(--primary-red);
}

button {
    background-color: var(--primary-red);
    color: var(--white);
    border: none;
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background-color: var(--dark-red);
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Loading Spinner */
#loading-container {
    padding: 20px 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-red);
    border-radius: 50%;
    margin: 0 auto 15px auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Result Area */
#result-container {
    margin-top: 20px;
}

.video-info {
    margin-bottom: 20px;
}

.video-info img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
    max-height: 250px;
    object-fit: cover;
}

#download-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    margin: 0 auto 20px auto;
}

.download-btn {
    background-color: #28a745; /* Warna hijau untuk tombol download agar kontras */
}
.download-btn:hover {
    background-color: #218838;
}

.outline-btn {
    background-color: transparent;
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
}
.outline-btn:hover {
    background-color: var(--primary-red);
    color: var(--white);
}

/* Features / Info Cards */
.features-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.feature-card {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.feature-card h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

/* Footer */
footer {
    background-color: var(--white);
    text-align: center;
    padding: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 14px;
    margin-top: auto;
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 4px 6px rgba(0,0,0,0.05);
        z-index: 100;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
    }

    nav ul li a {
        display: block;
        padding: 15px 5%;
        border-top: 1px solid var(--border-color);
    }
}
