* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: Arial, sans-serif;
    background: #f5f5f5;
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 24px;
    text-align: center;
    background: #fff;
    border-radius: 12px;
}

h1 {
    margin: 0 0 8px;
    font-size: 28px;
}

.subtitle {
    margin: 0 0 24px;
    color: #666;
    line-height: 1.5;
}

#download-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

input,
button {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    font-size: 16px;
    border-radius: 8px;
}

input {
    border: 1px solid #ccc;
}

button {
    border: 0;
    cursor: pointer;
    background: #111;
    color: #fff;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

#result {
    margin-top: 20px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

#download-link {
    display: inline;
    width: auto;
    padding: 0;
    border: 0;
    background: none;
    color: #111;
    font: inherit;
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
}

#download-link:hover {
    opacity: 0.7;
}

.expiry {
    margin: 8px 0 0;
    font-size: 14px;
    color: #777;
}

.error {
    margin: 0;
    font-weight: bold;
}

.loading-line {
    width: 100%;
    height: 2px;
    overflow: hidden;
    position: relative;
    background: #eee;
}

.loading-line span {
    position: absolute;
    width: 30%;
    height: 100%;
    background: #111;
    animation: loading 1.2s infinite ease-in-out;
}

@keyframes loading {
    0% {
        left: -30%;
    }

    100% {
        left: 100%;
    }
}

@media (min-width: 600px) {
    .container {
        padding: 32px;
    }

    #download-form {
        flex-direction: row;
    }

    input {
        flex: 1;
    }

    button {
        width: auto;
        white-space: nowrap;
    }
}