
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    padding: 30px 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f4f7fb;
    font-family: Arial, sans-serif;
}

.container {
    width: 100%;
    max-width: 625px;
    padding: 40px 37px 60px;
    background: #ffffff;
    border-radius: 19px;
    text-align: center;
    box-shadow: 0 12px 35px rgba(20, 38, 95, 0.07);
}

h1 {
    color: #10266b;
    font-size: 29px;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    color: #68728b;
    font-size: 17px;
    line-height: 1.5;
    margin-bottom: 30px;
}

/* Photo preview area */

.preview-container {
    width: 100%;
    max-width: 445px;
    aspect-ratio: 1 / 1;
    margin: 0 auto 30px;
    background: #ffffff;
    border: 2px dashed #cccccc;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #8790a0;
    font-size: 16px;
    padding: 20px;
    pointer-events: none;
}

#frameCanvas {
    width: 100%;
    height: 100%;
    display: block;
    background: #ffffff;
    touch-action: none;
    cursor: grab;
}

#frameCanvas:active {
    cursor: grabbing;
}

/* Photo controls */

.controls {
    max-width: 445px;
    margin: 20px auto 25px;
}

.controls[hidden],
#frameCanvas[hidden],
.download-button[hidden] {
    display: none;
}

.controls label {
    display: block;
    color: #10266b;
    font-size: 17px;
    font-weight: bold;
    margin-bottom: 15px;
}

#zoomSlider {
    width: 100%;
    accent-color: #10266b;
    cursor: pointer;
}

.tip {
    color: #788194;
    font-size: 13px;
    margin-top: 15px;
    line-height: 1.5;
}

/* Buttons */

button {
    width: 100%;
    border: none;
    border-radius: 9px;
    padding: 15px;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease;
}

.choose-button {
    background: #10266b;
    color: #ffffff;
}

.choose-button:hover {
    background: #1b378b;
}

.download-button {
    margin-top: 12px;
    background: #e8aa32;
    color: #171717;
}

.download-button:hover {
    background: #d99a20;
}

.reset-button {
    margin-top: 15px;
    background: #edf0f7;
    color: #10266b;
    font-size: 14px;
}

button:focus-visible {
    outline: 3px solid #e8aa32;
    outline-offset: 3px;
}

/* Mobile responsive design */

@media (max-width: 600px) {

    body {
        padding: 15px 10px;
    }

    .container {
        padding: 28px 18px 35px;
    }

    h1 {
        font-size: 25px;
    }

    .subtitle {
        font-size: 15px;
    }

    .preview-container {
        margin-bottom: 23px;
    }

    button {
        font-size: 16px;
    }
}
