.image-template-shell {
    padding-top: 1rem;
    padding-bottom: 3rem;
}

.image-template-header {
    margin: 0 auto 1rem;
    max-width: 62rem;
    text-align: center;
}

.image-template-header h1 {
    margin-bottom: 0.3rem;
}

.image-template-header p {
    margin-bottom: 0.7rem;
}

.image-template-back {
    display: inline-block;
    font-size: 0.74em;
}

.image-template-load-test {
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    display: inline-block;
    font-family: inherit;
    margin-top: 0.2rem;
}

.image-template-layout {
    align-items: flex-start;
    gap: 1rem;
}

.image-template-sidebar,
.image-template-stage-panel {
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    padding: 0.75rem;
}

.image-template-group {
    background: rgba(14, 18, 24, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.4rem;
    margin-bottom: 0.7rem;
    padding: 0.55rem;
}

.image-template-group h3 {
    font-size: 0.92em;
    margin-bottom: 0.35rem;
}

.image-template-group p {
    font-size: 0.55em;
    margin-bottom: 0.35rem;
}

.image-template-group label {
    display: block;
    font-size: 0.54em;
    letter-spacing: 0.07em;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
}

.image-template-group input,
.image-template-group select,
.image-template-group textarea {
    background: rgba(19, 23, 32, 0.9);
    border: 1px solid rgba(67, 229, 251, 0.35);
    border-radius: 0.32rem;
    color: #ecfbff;
    font-family: Consolas, Menlo, Monaco, monospace;
    font-size: 0.58em;
    margin-bottom: 0.35rem;
    padding: 0.45rem;
    width: 100%;
}

.image-template-group textarea {
    min-height: 15rem;
    resize: vertical;
}

.image-template-drop-zone {
    border-style: dashed;
}

.image-template-drop-zone.is-over {
    border-color: rgba(98, 251, 67, 0.7);
    box-shadow: 0 0 0 1px rgba(98, 251, 67, 0.35);
}

.image-template-actions {
    display: grid;
    gap: 0.35rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.image-template-actions button {
    background: linear-gradient(120deg, rgba(67, 229, 251, 0.22), rgba(251, 199, 67, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 0.32rem;
    color: #f4fdff;
    cursor: pointer;
    font-size: 0.52em;
    font-weight: bold;
    letter-spacing: 0.04em;
    padding: 0.45rem 0.28rem;
    text-transform: uppercase;
}

.image-template-actions button:hover {
    border-color: rgba(98, 251, 67, 0.7);
}

.image-template-status {
    border-left: 3px solid rgba(67, 229, 251, 0.75);
    font-size: 0.57em;
    line-height: 1.35;
    padding-left: 0.45rem;
}

.image-template-stage-wrap {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.4rem;
    margin-bottom: 0.65rem;
    overflow: hidden;
    position: relative;
}

#image-stage-canvas {
    background: #0d1117;
    display: block;
    height: 54vh;
    width: 100%;
}

.image-template-stage-help {
    background: rgba(0, 0, 0, 0.62);
    bottom: 0.35rem;
    color: #dbe9f5;
    font-size: 0.5em;
    left: 0.35rem;
    padding: 0.25rem 0.35rem;
    position: absolute;
}

.image-template-output-head {
    margin-bottom: 0.4rem;
}

.image-template-output-head h3 {
    font-size: 1em;
    margin-bottom: 0.2rem;
}

.image-template-output-head p {
    font-size: 0.55em;
}

.image-output-grid {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
}

.image-output-card {
    background: rgba(12, 15, 21, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0.35rem;
    padding: 0.45rem;
}

.image-output-card h4 {
    font-size: 0.62em;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
}

.image-output-card p {
    color: #b5cad8;
    font-size: 0.52em;
    margin-bottom: 0.35rem;
}

.image-output-card canvas {
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.25rem;
    display: block;
    height: auto;
    margin-bottom: 0.35rem;
    max-width: 100%;
}

.image-output-card a {
    background: rgba(98, 251, 67, 0.16);
    border: 1px solid rgba(98, 251, 67, 0.42);
    border-radius: 0.26rem;
    color: #deffd8;
    display: inline-block;
    font-size: 0.5em;
    letter-spacing: 0.06em;
    padding: 0.3rem 0.4rem;
    text-transform: uppercase;
}

.image-output-actions {
    display: flex;
    gap: 0.3rem;
    margin-top: 0.3rem;
}

.image-output-replace {
    background: rgba(67, 229, 251, 0.1);
    border: 1px dashed rgba(67, 229, 251, 0.5);
    border-radius: 0.26rem;
    color: #dbf8ff;
    cursor: pointer;
    font-size: 0.48em;
    letter-spacing: 0.05em;
    margin-top: 0.3rem;
    padding: 0.26rem 0.34rem;
    text-transform: uppercase;
}

.image-output-replace.is-over {
    border-color: rgba(98, 251, 67, 0.75);
    box-shadow: 0 0 0 1px rgba(98, 251, 67, 0.35);
}

.image-output-note {
    color: #9ddfb2;
    font-size: 0.5em;
    margin-top: 0.24rem;
}

@media (max-width: 1024px) {
    .image-template-actions {
        grid-template-columns: 1fr;
    }

    #image-stage-canvas {
        height: 40vh;
    }
}
