* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: #0f1115;
    color: #ffffff;
}

.container {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    padding: 100px 0 60px;
    text-align: center;
}

.hero h1 {
    margin: 0;

    font-size: 52px;
    font-weight: 800;
    letter-spacing: -2px;
}

.subtitle {
    margin: 14px 0 35px;

    color: #9ca3af;
    font-size: 18px;
}

.url-box {
    display: flex;

    max-width: 800px;
    margin: auto;

    padding: 6px;

    background: #191c23;
    border: 1px solid #2b303a;
    border-radius: 16px;
}

.url-box input {
    flex: 1;

    min-width: 0;

    padding: 16px;

    background: transparent;
    border: 0;
    outline: 0;

    color: white;
    font-size: 16px;
}

.url-box input::placeholder {
    color: #6b7280;
}

.url-box button,
.download-all {
    padding: 14px 22px;

    border: 0;
    border-radius: 11px;

    background: #ffffff;
    color: #111111;

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

    cursor: pointer;
}

.url-box button:hover,
.download-all:hover {
    opacity: 0.85;
}

.gallery-section {
    padding-bottom: 80px;
}

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

    margin-bottom: 25px;
}

.gallery-header h2 {
    margin: 0 0 5px;

    font-size: 28px;
}

.gallery-header p {
    margin: 0;

    color: #9ca3af;
}

.gallery-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fill, minmax(220px, 1fr));

    gap: 16px;
}

.image-card {
    position: relative;

    overflow: hidden;

    background: #191c23;
    border: 1px solid #2b303a;
    border-radius: 14px;
}

.image-card img {
    display: block;

    width: 100%;
    height: 280px;

    object-fit: cover;

    background: #111318;
}

.image-card .image-info {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 10px;
}

.image-name {
    overflow: hidden;

    white-space: nowrap;
    text-overflow: ellipsis;

    color: #9ca3af;
    font-size: 13px;
}

.download-button {
    flex-shrink: 0;

    padding: 7px 10px;

    border: 0;
    border-radius: 8px;

    background: #2b303a;
    color: white;

    cursor: pointer;
}

.download-button:hover {
    background: #3a404c;
}

.error {
    margin-top: 20px;

    color: #ff6b6b;
}

.hidden {
    display: none !important;
}

.loading {
    position: fixed;

    inset: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background: rgba(15, 17, 21, 0.9);

    z-index: 100;
}

.spinner {
    width: 40px;
    height: 40px;

    border: 4px solid #2b303a;
    border-top-color: white;

    border-radius: 50%;

    animation: spin 0.8s linear infinite;
}

.loading p {
    margin-top: 15px;

    color: #9ca3af;
}

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


@media (max-width: 600px) {

    .hero {
        padding-top: 60px;
    }

    .hero h1 {
        font-size: 40px;
    }

    .url-box {
        flex-direction: column;

        padding: 8px;
    }

    .url-box button {
        width: 100%;
    }

    .gallery-header {
        align-items: flex-start;
        gap: 15px;
        flex-direction: column;
    }

    .gallery-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 10px;
    }

    .image-card img {
        height: 220px;
    }

}
