/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "San Francisco", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body {
    background-color: #F5F5F7;
    color: #1D1D1F;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    padding-top: 60px;
    /* Space for Sticky Header */
}

/* Mesh Gradient Background */
body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120vw;
    height: 70vh;
    background:
        radial-gradient(circle at 15% 50%, rgba(255, 200, 221, 0.4) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(255, 228, 230, 0.4) 0%, transparent 25%);
    background-color: #F5F5F7;
    z-index: -1;
    filter: blur(60px);
}

/* --- Sticky Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 1000;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease, border-bottom 0.3s ease;
}

/* Scrolled State (Added via JS) */
.site-header.scrolled {
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-container {
    max-width: 980px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-size: 18px;
    font-weight: 700;
    color: #1D1D1F;
    cursor: default;
}

.nav-links a {
    text-decoration: none;
    color: #1D1D1F;
    font-size: 14px;
    margin-left: 24px;
    font-weight: 500;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.nav-links a:hover {
    opacity: 1;
}


/* --- Main Content --- */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 40px 20px;
    max-width: 980px;
    margin: 0 auto;
    /* Center main content */
}

/* Card Container */
.card {
    background-color: #FFFFFF;
    width: 100%;
    max-width: 480px;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease;
    margin-bottom: 80px;
    /* Space between card and features */
    z-index: 1;
}

h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

p.subtitle {
    font-size: 16px;
    color: #86868B;
    margin-bottom: 32px;
    line-height: 1.5;
}

/* Dropzone Area */
.dropzone {
    width: 100%;
    height: 200px;
    border: 2px dashed #D2D2D7;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    background-color: #FAFAFC;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: #0071E3;
    background-color: rgba(0, 113, 227, 0.04);
    transform: scale(1.02);
}

.dropzone .icon {
    font-size: 48px;
    margin-bottom: 16px;
    color: #86868B;
    transition: color 0.3s ease;
}

.dropzone:hover .icon,
.dropzone.dragover .icon {
    color: #0071E3;
}

.dropzone-text {
    font-size: 15px;
    color: #1D1D1F;
    font-weight: 500;
}

.dropzone-subtext {
    font-size: 13px;
    color: #86868B;
    margin-top: 4px;
}

/* Loading State */
.loading-container {
    display: none;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 113, 227, 0.1);
    border-radius: 50%;
    border-top-color: #0071E3;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 15px;
    color: #86868B;
}

/* Result Area */
.result-container {
    display: none;
    margin-top: 24px;
    animation: fadeIn 0.5s ease;
}

.btn-download {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 14px 24px;
    background-color: #0071E3;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.2);
}

.btn-download:hover {
    background-color: #0077ED;
}

.btn-download:active {
    transform: scale(0.98);
}

.btn-reset {
    background: none;
    border: none;
    color: #0071E3;
    font-size: 14px;
    margin-top: 16px;
    cursor: pointer;
    padding: 8px;
}

.btn-reset:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#fileInput {
    display: none;
}

/* Features Section */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 800px;
    margin-bottom: 100px;
    /* Spacer */
}

.feature-item {
    text-align: center;
}

.feature-icon {
    font-size: 28px;
    margin-bottom: 12px;
}

.feature-title {
    font-size: 17px;
    font-weight: 600;
    color: #1D1D1F;
    margin-bottom: 8px;
}

.feature-desc {
    font-size: 14px;
    color: #86868B;
    line-height: 1.5;
    word-break: keep-all;
}


/* --- Info Article Section --- */
.info-article {
    width: 100%;
    max-width: 700px;
    /* Readable width */
    margin-bottom: 60px;
    text-align: left;
}

.info-article h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1D1D1F;
    margin-top: 40px;
    margin-bottom: 16px;
}

.info-article h2:first-child {
    margin-top: 0;
}

.info-article p {
    font-size: 17px;
    color: #424245;
    /* Slightly darker than 86868B for readability */
    line-height: 1.6;
    margin-bottom: 24px;
}


/* --- Footer Section --- */
.site-footer {
    width: 100%;
    background-color: #FBFBFD;
    /* Light Gray Footer Background */
    padding: 60px 20px 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.footer-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* FAQ Styling */
.faq-section {
    width: 100%;
    margin-bottom: 60px;
    text-align: left;
}

.faq-heading {
    font-size: 21px;
    font-weight: 700;
    color: #1D1D1F;
    margin-bottom: 30px;
    text-align: center;
}

.faq-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    /* Darker border for footer */
    overflow: hidden;
}

.faq-question {
    font-size: 16px;
    font-weight: 600;
    color: #1D1D1F;
    padding: 24px 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s ease;
}

.faq-question:hover {
    color: #0071E3;
}

.faq-question::after {
    content: '+';
    font-size: 22px;
    font-weight: 400;
    color: #86868B;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
    color: #1D1D1F;
}

.faq-answer {
    font-size: 15px;
    color: #6E6E73;
    /* Readable footer text */
    line-height: 1.6;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1), opacity 0.3s ease, padding 0.3s ease;
    padding-bottom: 0;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    opacity: 1;
    padding-bottom: 24px;
    transition: max-height 0.3s cubic-bezier(1, 0, 1, 0), opacity 0.3s ease, padding 0.3s ease;
}

/* Footer Links */
.footer-links {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-links a {
    text-decoration: none;
    color: #86868B;
    font-size: 12px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #1D1D1F;
    text-decoration: underline;
}

.separator {
    color: #D2D2D7;
    font-size: 10px;
}

.copyright {
    font-size: 11px;
    color: #86868B;
    opacity: 0.8;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .features {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .feature-item {
        margin-bottom: 0;
    }

    .info-article h2 {
        font-size: 22px;
    }
}