body {
    margin: 0;
    font-family: sans-serif;
}

.main-container {
    text-align: center;
    align-items: center;
    padding: 20px;
}

.buttons {
    position: absolute;
    top: 10px;
    right: 10px;
}

.buttons img {
    width: 40px;
    margin-left: 10px;
    cursor: pointer;
}

.controls {
    margin: 50px auto 20px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: right;
    gap: 10px;
}

.image-area {
    position: relative;
    display: inline-block;
}

#baseImage {
    max-width: 100%;
    height: auto;
    display: block;
}

#textCanvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 400px;
    box-sizing: border-box;
}

#textInput {
    width: 100%;
    height: 100px;
    font-size: 16px;
    margin-bottom: 10px;
}

#applyText {
    margin-top: 10px;
    padding: 10px;
    width: 100%;
    font-size: 16px;
}

#textCanvas {
    position: absolute;
    top: 0;
    left: 0;
    touch-action: none;
    pointer-events: auto;
}