@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    font-family: "Poppins", sans-serif;
    color: #1f2937;

    background-image: url("/assets/bg.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* NAVBAR */

.navbar {
    width: 100%;
    min-height: 72px;

    padding: 0 32px;

    display: flex;
    align-items: center;

    background: #ffffff;

    border-bottom: 1px solid #e5e7eb;

    box-shadow: 0 4px 20px rgba(0, 0, 0, .06);

    position: relative;
    z-index: 10;
}

.brand {
    color: #2563eb;

    font-size: 21px;
    font-weight: 800;
}

/* PAGE */

.page {
    width: min(1180px, calc(100% - 32px));

    min-height: calc(100vh - 150px);

    margin: auto;

    padding-top: 90px;
}

/* DOWNLOADER */

.downloader-card {
    width: min(700px, 100%);

    margin: auto;

    padding: 38px 28px;

    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 26px;

    box-shadow: 0 18px 50px rgba(15, 23, 42, .16);
}

.downloader-card h1 {
    text-align: center;

    color: #2563eb;

    font-size: clamp(27px, 5vw, 38px);
    line-height: 1.25;
}

.subtitle {
    margin-top: 14px;

    text-align: center;

    color: #6b7280;

    font-size: 14px;
}

.form-group {
    margin-top: 32px;

    display: flex;
    flex-direction: column;

    gap: 14px;
}

/* INPUT */

#url,
#platform {
    width: 100%;
    height: 54px;

    padding: 0 18px;

    border: 1px solid #dbe3ef;
    outline: none;

    border-radius: 15px;

    font-family: inherit;
    font-size: 14px;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

#url {
    background: #eff6ff;
}

#platform {
    background: #f8fafc;
}

#url:focus,
#platform:focus {
    border-color: #2563eb;

    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

/* MAIN DOWNLOAD BUTTON */

#downloadBtn {
    position: relative;

    overflow: hidden;

    width: 100%;
    min-height: 54px;

    border: 0;
    border-radius: 15px;

    color: #ffffff;
    background: #2563eb;

    font-family: inherit;
    font-weight: 700;

    cursor: pointer;

    box-shadow: 0 8px 20px rgba(37, 99, 235, .28);

    transition:
        background .2s ease,
        transform .15s ease,
        box-shadow .2s ease;
}

#downloadBtn:hover {
    background: #1d4ed8;

    box-shadow: 0 10px 25px rgba(37, 99, 235, .35);
}

#downloadBtn:active {
    transform: scale(.98);
}

#downloadBtn:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
}

/* RESULT */

#result {
    width: 100%;
    margin-top: 8px;
}

.download-card {
    width: 100%;

    padding: 18px;

    overflow: hidden;

    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 18px;

    box-shadow: 0 10px 30px rgba(15, 23, 42, .12);
}

/* THUMBNAIL */

.download-thumb {
    display: block;

    width: 100%;
    height: auto;
    max-height: 360px;

    object-fit: cover;

    background: #f1f5f9;

    border-radius: 14px;
}

/* TITLE */

.download-title {
    margin-top: 15px;

    color: #111827;

    font-size: 17px;
    font-weight: 700;

    line-height: 1.5;

    word-break: break-word;
}

/* META */

.download-meta {
    margin-top: 10px;

    display: flex;
    gap: 10px;

    flex-wrap: wrap;

    color: #6b7280;

    font-size: 12px;
}

.download-meta span {
    padding: 5px 9px;

    background: #eff6ff;

    border-radius: 8px;
}

/* DOWNLOAD ACTIONS */

.download-actions {
    margin-top: 17px;

    display: flex;
    gap: 10px;

    flex-wrap: wrap;
}

.download-actions button {
    position: relative;

    overflow: hidden;

    flex: 1 1 130px;

    min-height: 46px;

    padding: 11px 14px;

    border: none;
    border-radius: 12px;

    color: #ffffff;
    background: #2563eb;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    box-shadow: 0 6px 16px rgba(37, 99, 235, .20);

    transition:
        background .2s ease,
        transform .15s ease,
        box-shadow .2s ease;
}

.download-actions button:hover {
    background: #1d4ed8;

    box-shadow: 0 8px 20px rgba(37, 99, 235, .28);
}

.download-actions button:active {
    transform: scale(.97);
}

.download-actions button:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
}

/* ALERT */

.alert {
    padding: 15px;

    border-radius: 12px;
}

.alert.error {
    color: #991b1b;

    background: #fee2e2;

    border: 1px solid #fecaca;
}

/* LOADING PROGRESS */

.loader-bar {
    width: 100%;
    height: 8px;

    overflow: hidden;

    background: #dbeafe;

    border-radius: 20px;
}

#progressBar {
    width: 75%;
    height: 100%;

    border-radius: inherit;

    background: #2563eb;

    animation: progressMove 1.2s ease-in-out infinite alternate;
}

@keyframes progressMove {
    from {
        width: 10%;
    }

    to {
        width: 95%;
    }
}

/* FEATURES */

.features {
    width: 100%;

    margin-top: 120px;

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 20px;
}

.feature-card {
    min-height: 150px;

    padding: 28px;

    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 22px;

    box-shadow: 0 10px 35px rgba(15, 23, 42, .12);
}

.feature-card h3 {
    color: #2563eb;

    font-size: 18px;
    font-weight: 700;
}

.feature-card p {
    margin-top: 12px;

    color: #6b7280;

    font-size: 13px;

    line-height: 1.7;
}

/* FOOTER */

footer {
    padding: 45px 20px 30px;

    text-align: center;

    color: #ffffff;

    font-size: 13px;
    font-weight: 600;

    text-shadow: 0 1px 5px rgba(0, 0, 0, .8);
}

/* MOBILE */

@media (max-width: 768px) {

    body {
        background-attachment: scroll;
        background-position: center;
    }

    .navbar {
        min-height: 64px;

        padding: 0 22px;
    }

    .brand {
        font-size: 18px;
    }

    .page {
        width: calc(100% - 30px);

        padding-top: 70px;
    }

    .downloader-card {
        padding: 30px 20px;

        border-radius: 22px;
    }

    .downloader-card h1 {
        font-size: 28px;
    }

    .features {
        margin-top: 100px;

        grid-template-columns: 1fr;
    }

    .download-actions {
        flex-direction: column;
    }

    .download-actions button {
        width: 100%;

        flex: none;
    }
}
