/* ---------- General page styling ---------- */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background: #11121a;
    color: #f3f4f6;
    line-height: 1.6;
}

.container {
    width: min(1000px, 92%);
    margin: 0 auto;
    padding: 48px 0;
}

h1 {
    margin-bottom: 8px;
    font-size: 2.5rem;
    text-align: center;
}

.subtitle {
    margin-bottom: 36px;
    color: #a1a1b5;
    text-align: center;
}


/* ---------- Project image ---------- */

.project-image {
    display: flex;
    justify-content: center;
    margin: 24px 0;
}

.project-image img {
    display: block;
    max-width: 100%;
    max-height: 300px;
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 0;
}


/* ---------- Sections / panels ---------- */

/* ---------- Disabled generation sections ---------- */

.animation-section,
.result-section {
    opacity: 0.35;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.animation-section.active,
.result-section.active {
    opacity: 1;
    pointer-events: auto;
}

section {
    margin-bottom: 24px;
    padding: 28px;
    background: #1c1d29;
    border: 3px solid #303142;
    border-radius: 1px;
}

h2 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.4rem;
}

section > p {
    color: #a1a1b5;
}


/* ---------- Digit selection controls ---------- */

.controls label {
    display: block;
    margin-bottom: 12px;
    font-weight: bold;
}

#digitValue,
#batchValue,
#stepsValue {
    display: inline-block;
    min-width: 32px;
    margin-left: 8px;
    padding: 2px 10px;
    color: #c4b5fd;
    background: #30264b;
    border-radius: 8px;
    text-align: center;
}

input[type="range"] {
    display: block;
    width: 100%;
    margin: 16px 0 24px;
    accent-color: #a78bfa;
    cursor: pointer;
}


/* ---------- Buttons ---------- */

button {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    background: #8b5cf6;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

button:hover {
    background: #7c3aed;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}


/* ---------- Image display areas ---------- */

.image-placeholder {
    display: flex;
    min-height: 280px;
    margin: 20px 0;
    padding: 20px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    background: #12131c;
    border: 1px dashed #45465c;
    border-radius: 12px;
    text-align: center;
}

.image-placeholder p {
    margin: 0;
    color: #88899e;
}

.image-placeholder img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

#animation,
#finalImage {
    width: 280px;
    image-rendering: pixelated;
}


/* ---------- Animation timeline ---------- */

#stepLabel {
    margin-top: -16px;
    margin-bottom: 20px;
    color: #a1a1b5;
    font-size: 0.9rem;
    text-align: center;
}


/* ---------- Download button ---------- */

#download {
    display: inline-block;
    margin-top: 8px;
    text-decoration: none;
}


/* ---------- Smaller screens ---------- */

@media (max-width: 600px) {
    .container {
        padding: 28px 0;
    }

    h1 {
        font-size: 2rem;
    }

    section {
        padding: 20px;
    }

    .image-placeholder {
        min-height: 240px;
    }

    .image-placeholder img {
        width: 196px;
        height: 196px;
    }

    button {
        width: 100%;
    }
}
