/* ==========================================================================
   GitPack Downloader - Style Utama (GitHub Light Theme Accent)
   Author: Pembri
   ========================================================================== */

/* Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    font-size: 16px;
    line-height: 1.5;
    color: #24292f;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: #0969da;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Container */
.header-container,
.content-container,
.footer-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
    background-color: #f6f8fa;
    border-bottom: 1px solid #d0d7de;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 16px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: #24292f;
}

.site-logo:hover {
    text-decoration: none;
}

/* Navigation Links (Desktop) */
.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-link {
    color: #57606a;
    font-weight: 500;
    padding: 6px 8px;
    border-radius: 6px;
    transition: background-color 0.2s, color 0.2s;
}

.nav-link:hover {
    color: #24292f;
    background-color: #eaeef2;
    text-decoration: none;
}

.nav-link.active {
    color: #24292f;
    font-weight: 600;
}

/* Hamburger Toggle Button */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger-bar {
    width: 100%;
    height: 2px;
    background-color: #24292f;
    transition: all 0.3s ease;
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */
.main-content {
    flex: 1;
    padding: 40px 0;
}

.hero-section {
    text-align: center;
    margin-bottom: 40px;
}

.hero-section h1 {
    font-size: 2.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #24292f;
}

.hero-section p {
    font-size: 1.1rem;
    color: #57606a;
    max-width: 600px;
    margin: 0 auto;
}

/* Card Wrapper & Components */
.downloader-wrapper {
    max-width: 650px;
    margin: 0 auto 50px auto;
}

.card {
    background-color: #ffffff;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    font-weight: 500;
    font-size: 0.95rem;
    color: #24292f;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 1rem;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    background-color: #f6f8fa;
    color: #24292f;
    outline: none;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    background-color: #ffffff;
    border-color: #0969da;
    box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Buttons */
.btn {
    display: inline-block;
    width: 100%;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid rgba(27, 31, 36, 0.15);
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s, border-color 0.2s;
}

.btn-primary {
    color: #ffffff;
    background-color: #0969da;
}

.btn-primary:hover {
    background-color: #0c60cd;
    text-decoration: none;
}

.btn-success {
    color: #ffffff;
    background-color: #1f883d;
}

.btn-success:hover {
    background-color: #1a7f37;
    text-decoration: none;
}

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

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 16px;
    border: 1px solid transparent;
}

.alert-warning {
    background-color: #fff8c5;
    border-color: rgba(191, 133, 0, 0.2);
    color: #735c00;
}

.alert-danger {
    background-color: #ffebe9;
    border-color: rgba(255, 129, 130, 0.4);
    color: #cf222e;
    margin-top: 16px;
}

/* Loading Spinner */
.loading-wrapper {
    text-align: center;
    padding: 20px 0;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 4px solid #f6f8fa;
    border-top: 4px solid #0969da;
    border-radius: 50%;
    margin: 0 auto 12px auto;
    animation: spin 0.8s linear infinite;
}

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

.loading-wrapper p {
    font-size: 0.95rem;
    color: #57606a;
}

/* Result Box */
.result-wrapper {
    text-align: center;
    padding: 16px 0 0 0;
    border-top: 1px solid #d0d7de;
    margin-top: 20px;
}

.success-box {
    margin-bottom: 20px;
}

.success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background-color: #dafbe1;
    color: #1f883d;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 50%;
    margin-bottom: 12px;
}

.success-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f883d;
    margin-bottom: 4px;
}

.success-desc {
    font-size: 0.95rem;
    color: #57606a;
}

/* Guide Section */
.guide-section {
    border-top: 1px solid #d0d7de;
    padding-top: 40px;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.guide-card {
    background-color: #f6f8fa;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    padding: 20px;
}

.guide-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #24292f;
}

.guide-card p {
    font-size: 0.9rem;
    color: #57606a;
}

/* Pop-up / Modal Success (untuk Contact Form & Dialog Global) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background-color: #ffffff;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-box {
    transform: translateY(0);
}

.modal-btn {
    margin-top: 20px;
    width: auto;
    padding: 8px 24px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background-color: #f6f8fa;
    border-top: 1px solid #d0d7de;
    padding: 24px 0;
    text-align: center;
    font-size: 0.9rem;
    color: #57606a;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #f6f8fa;
        border-bottom: 1px solid #d0d7de;
        padding: 20px;
        display: none;
    }

    .nav-menu.active {
        display: block;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }

    /* Hamburger Animation to 'X' */
    .menu-toggle.active .hamburger-bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle.active .hamburger-bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active .hamburger-bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .guide-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .hero-section h1 {
        font-size: 1.75rem;
    }
}
