/* =========================================
   RESET
========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: #f8fafc;
    color: #0f172a;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}


/* =========================================
   CONTAINER
========================================= */

.container {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}


/* =========================================
   HEADER
========================================= */

.site-header {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid #e2e8f0;

    position: sticky;
    top: 0;
    z-index: 100;

    backdrop-filter: blur(12px);
}

.header-content {
    height: 72px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo span {
    color: #2563eb;
}

.navigation {
    display: flex;
    align-items: center;
    gap: 30px;
}

.navigation a {
    color: #475569;
    font-size: 14px;
    font-weight: 600;

    transition: color 0.2s ease;
}

.navigation a:hover {
    color: #2563eb;
}


/* =========================================
   HERO
========================================= */

.hero {
    padding: 90px 0 55px;

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(37, 99, 235, 0.10),
            transparent 45%
        );
}

.hero-content {
    text-align: center;
    max-width: 850px;
}

.hero-badge {
    display: inline-flex;

    padding: 7px 14px;

    border: 1px solid #dbeafe;
    border-radius: 999px;

    background: #eff6ff;
    color: #2563eb;

    font-size: 13px;
    font-weight: 700;

    margin-bottom: 22px;
}

.hero h1 {
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.05;

    letter-spacing: -3px;
    font-weight: 850;

    max-width: 850px;
    margin: 0 auto;
}

.hero h1 span {
    display: block;
    color: #2563eb;
}

.hero-description {
    max-width: 650px;
    margin: 26px auto 0;

    color: #64748b;

    font-size: 18px;
    line-height: 1.7;
}


/* =========================================
   COMPRESSOR
========================================= */

.compressor-section {
    padding: 25px 0 100px;
}

.compressor-card {
    max-width: 900px;
    margin: 0 auto;

    padding: 12px;

    background: white;

    border: 1px solid #e2e8f0;
    border-radius: 24px;

    box-shadow:
        0 20px 60px rgba(15, 23, 42, 0.08);
}

.upload-area {
    min-height: 360px;

    border: 2px dashed #cbd5e1;
    border-radius: 18px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;

    padding: 50px 20px;

    transition:
        border-color 0.2s ease,
        background 0.2s ease;
}

.upload-area:hover {
    border-color: #60a5fa;
    background: #f8fbff;
}

.upload-icon {
    width: 64px;
    height: 64px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 18px;

    background: #eff6ff;
    color: #2563eb;

    font-size: 30px;
    font-weight: 700;

    margin-bottom: 22px;
}

.upload-area h2 {
    font-size: 25px;
    letter-spacing: -0.5px;
}

.upload-area p {
    margin-top: 7px;
    color: #64748b;
}

.primary-button {
    margin-top: 25px;

    padding: 13px 24px;

    border: none;
    border-radius: 10px;

    background: #2563eb;
    color: white;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 8px 20px rgba(37, 99, 235, 0.22);

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.primary-button:hover {
    background: #1d4ed8;

    transform: translateY(-2px);

    box-shadow:
        0 12px 25px rgba(37, 99, 235, 0.28);
}

.supported-formats {
    margin-top: 20px;

    color: #94a3b8;

    font-size: 12px;
    font-weight: 600;

    letter-spacing: 0.5px;
}


/* =========================================
   INFORMATION SECTION
========================================= */

.info-section {
    padding: 100px 0;

    background: white;
}

.section-heading {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
}

.section-label {
    color: #2563eb;

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 1.5px;

    margin-bottom: 12px;
}

.section-heading h2 {
    font-size: clamp(30px, 4vw, 42px);

    line-height: 1.15;
    letter-spacing: -1.5px;
}

.section-heading p {
    margin-top: 15px;

    color: #64748b;

    font-size: 16px;
}


/* =========================================
   STEPS
========================================= */

.steps {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 22px;
}

.step-card {
    padding: 30px;

    border: 1px solid #e2e8f0;
    border-radius: 18px;

    background: #ffffff;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.step-card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 15px 35px rgba(15, 23, 42, 0.07);
}

.step-number {
    color: #2563eb;

    font-size: 13px;
    font-weight: 800;

    margin-bottom: 20px;
}

.step-card h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.step-card p {
    color: #64748b;
    font-size: 15px;
}


/* =========================================
   FAQ
========================================= */

.faq-section {
    padding: 100px 0;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;

    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-list details {
    background: white;

    border: 1px solid #e2e8f0;
    border-radius: 14px;

    padding: 20px 22px;

    cursor: pointer;
}

.faq-list summary {
    font-weight: 700;
    cursor: pointer;
}

.faq-list details p {
    margin-top: 12px;

    color: #64748b;

    font-size: 15px;
}


/* =========================================
   FOOTER
========================================= */

.site-footer {
    padding: 45px 0;

    background: #0f172a;
    color: white;
}

.footer-content {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 30px;
}

.footer-logo {
    color: white;
}

.footer-logo span {
    color: #60a5fa;
}

.footer-content p {
    margin-top: 7px;

    color: #94a3b8;

    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 25px;
}

.footer-links a {
    color: #cbd5e1;

    font-size: 14px;
}

.footer-links a:hover {
    color: white;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 700px) {

    .container {
        width: min(100% - 28px, 1120px);
    }

    .header-content {
        height: 64px;
    }

    .navigation {
        gap: 15px;
    }

    .navigation a {
        font-size: 12px;
    }

    .hero {
        padding: 65px 0 35px;
    }

    .hero h1 {
        letter-spacing: -2px;
    }

    .hero-description {
        font-size: 16px;
    }

    .compressor-section {
        padding-bottom: 70px;
    }

    .upload-area {
        min-height: 320px;
        padding: 35px 15px;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .info-section,
    .faq-section {
        padding: 70px 0;
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-links {
        flex-wrap: wrap;
    }
}
/* =========================================
   IMAGE RESULT
========================================= */

.image-result {
    padding: 20px;

    margin-top: 20px;

    background: #ffffff;

    border: 1px solid #e2e8f0;

    border-radius: 18px;
}


/* =========================================
   IMAGE PREVIEW
========================================= */

.preview-container {
    width: 100%;

    min-height: 300px;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 25px;

    background: #f8fafc;

    border-radius: 14px;

    overflow: hidden;
}

.preview-container img {
    display: block;

    max-width: 100%;

    max-height: 500px;

    width: auto;

    height: auto;

    object-fit: contain;

    border-radius: 8px;
}


/* =========================================
   IMAGE INFORMATION
========================================= */

.image-information {
    padding-top: 22px;
}

.file-name {
    font-size: 17px;

    font-weight: 700;

    word-break: break-word;

    margin-bottom: 18px;
}

.file-details {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 12px;
}

.detail-box {
    padding: 16px;

    background: #f8fafc;

    border: 1px solid #e2e8f0;

    border-radius: 12px;
}

.detail-box span {
    display: block;

    color: #64748b;

    font-size: 12px;

    font-weight: 600;

    margin-bottom: 5px;
}

.detail-box strong {
    font-size: 15px;
}

.change-image-button {
    margin-top: 20px;

    padding: 11px 18px;

    background: white;

    color: #2563eb;

    border: 1px solid #bfdbfe;

    border-radius: 9px;

    font-size: 14px;

    font-weight: 700;

    cursor: pointer;

    transition: all 0.2s ease;
}

.change-image-button:hover {
    background: #eff6ff;

    border-color: #93c5fd;
}


/* =========================================
   RESULT MOBILE
========================================= */

@media (max-width: 700px) {

    .file-details {
        grid-template-columns: 1fr;
    }

    .preview-container {
        min-height: 220px;

        padding: 15px;
    }

    .preview-container img {
        max-height: 350px;
    }

}
/* =========================================
   COMPRESSION CONTROLS
========================================= */

.compression-controls {
    margin-top: 30px;

    padding-top: 28px;

    border-top: 1px solid #e2e8f0;
}

.control-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.control-header h3 {
    font-size: 19px;
}

.control-header p {
    margin-top: 3px;

    color: #64748b;

    font-size: 13px;
}

#qualityValue {
    color: #2563eb;

    font-size: 18px;
}


/* =========================================
   QUALITY SLIDER
========================================= */

#qualitySlider {
    width: 100%;

    margin-top: 22px;

    accent-color: #2563eb;

    cursor: pointer;
}

#qualitySlider:disabled {
    opacity: 0.4;

    cursor: not-allowed;
}

.slider-labels {
    display: flex;

    justify-content: space-between;

    margin-top: 7px;

    color: #94a3b8;

    font-size: 12px;
}


/* =========================================
   TARGET SIZE
========================================= */

.target-size-section {
    margin-top: 30px;
}

.target-title {
    margin-bottom: 12px;

    font-size: 14px;

    font-weight: 700;
}

.target-buttons {
    display: flex;

    flex-wrap: wrap;

    gap: 9px;
}

.target-buttons button {
    padding: 9px 14px;

    background: white;

    color: #475569;

    border: 1px solid #cbd5e1;

    border-radius: 8px;

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;

    transition: all 0.2s ease;
}

.target-buttons button:hover {
    border-color: #93c5fd;

    color: #2563eb;
}

.target-buttons button.active {
    background: #eff6ff;

    border-color: #2563eb;

    color: #2563eb;
}


/* =========================================
   COMPRESS BUTTON
========================================= */

.compress-button {
    width: 100%;

    margin-top: 28px;

    padding: 15px;

    border: none;

    border-radius: 10px;

    background: #2563eb;

    color: white;

    font-size: 15px;

    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.compress-button:hover {
    background: #1d4ed8;

    transform: translateY(-1px);
}

.compress-button:disabled {
    opacity: 0.65;

    cursor: wait;

    transform: none;
}


/* =========================================
   COMPRESSION RESULT
========================================= */

.compression-result {
    display: none;

    grid-template-columns:
        1fr auto 1fr;

    gap: 12px;

    align-items: center;

    margin-top: 25px;

    padding: 20px;

    background: #f8fafc;

    border: 1px solid #e2e8f0;

    border-radius: 14px;
}

.result-stat span,
.saved-stat span {
    display: block;

    color: #64748b;

    font-size: 12px;

    margin-bottom: 4px;
}

.result-stat strong {
    font-size: 17px;
}

.result-arrow {
    color: #94a3b8;

    font-size: 20px;
}

.saved-stat {
    grid-column: 1 / -1;

    padding-top: 15px;

    border-top: 1px solid #e2e8f0;
}

.saved-stat strong {
    color: #16a34a;

    font-size: 20px;
}


/* =========================================
   DOWNLOAD
========================================= */

.download-button {
    grid-column: 1 / -1;

    display: block;

    padding: 13px;

    text-align: center;

    background: #0f172a;

    color: white;

    border-radius: 9px;

    font-size: 14px;

    font-weight: 700;

    cursor: pointer;

    transition: background 0.2s ease;
}

.download-button:hover {
    background: #1e293b;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 700px) {

    .compression-result {
        grid-template-columns:
            1fr auto 1fr;
    }

    .target-buttons button {
        flex: 1 1 calc(50% - 9px);
    }

}