body {
    font-family: Arial, sans-serif; 
    background-color: #f8f8f8;
    margin: 5;
    padding: 5;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    background-color: #f4f9Ae; 
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    width: 450px;
    margin-top: 20px;
    text-align: center;
	box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5); 
}

button.active {
    background-color: #007bff; 
    color: white; 
    border: 2px solid #0056b3; 
}
.template-buttons-row button.active {
    background-color: blue; 
    color: white; 
    border: 2px solid darkblue; 
}


.small-title {
    font-size: 16px;
}
#instruction-text {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    width: 100%;
    border-radius: 5px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
}


.template-buttons-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
    justify-content: 10;
}
.template-buttons-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.1px; 
    justify-content: center; 
    margin-bottom: 10px; 
}
#screenshot-area {
    padding: 0px;
    border: 0px solid black;
    display: inline-block;
    text-align: center;
    width: fit-content; 
}


#input-plate {
    width: 80%; 
    font-size: 70px; 
    letter-spacing: -2px; 
    word-spacing: -3px; 
    line-height: 0.9; 
    text-align: left; 
    text-transform: uppercase; 
    border: 5px solid black; 
    border-radius: 10px; 
    resize: none; 
    padding: 3px; 
    box-sizing: border-box; 
    font-family: 'DIN1451', Arial, sans-serif; 
	verflow-wrap: break-word;
    white-space: pre-wrap;
    word-wrap: break-word;
	overflow: hidden; 
}
#text-container {
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 10px; 
}

.text-line {
    width: 100%;
    text-align: center;
    border: 1px solid #ccc;
    padding: 5px;
    font-size: 20px; 
    line-height: 1.5;
    min-height: 40px; 
}



button {
    padding: 5px;
    margin: 5px;
    font-size: 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.5);
    transition: box-shadow 0.s, transform 0.5s;
}

#top-button.active, #middle-button.active, #bottom-button.active {
    background-color: blue;
    color: white;
}

button.active {
    background-color: #007bff; 
    color: white; 
    border: 2px solid #0056b3; 
}

button:hover {
     box-shadow: 0 6px 8px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.5);
    transform: translateY(-2px);
}


.input-section {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}


#input-plate.middle-aligned {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 20%;
}

.additional-buttons {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px; 
}
.additional-buttons button {
    padding: 4px;
    margin: 4px;
    font-size: 14px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.5);
    transition: box-shadow 0.3s, transform 0.3s;
}
.additional-buttons button:hover {
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.5);
    transform: translateY(-2px);
}

.side-buttons {
    margin-top: -34px;
    display: flex;
    flex-direction: column;
    gap: -5px; 
    float: right; 
}

#font-plate {
    margin-bottom: 2px;
    display: inline-block;
}


.color-row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 5px;
}

.color-row button {
    margin: 0;
    padding: 6px 10px;
    font-size: 10px;
    border: none;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
    cursor: pointer;
}
select, button, input {
    display: block;
    margin: 6px auto;
}

button:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
}

#font-plate {
    appearance: none; 
    background-color: #fff; 
    border: 1px solid #ced4da; 
    padding: 6px; 
    border-radius: 5px; 
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5); 
    font-size: 14px; 
}

#font-plate:focus {
    outline: none; 
    box-shadow: 3px 3px 7px rgba(0, 0, 0, 0.5); 
}

select {
    direction: 1tr; 
    select {
    transition: all 0.5s ease; 
}
}

.active-template {
    background-color: blue; 
    color: white; 
    border: 2px solid darkblue; 
}

.template-buttons-row button.active {
    background-color: blue; 
    color: white; 
    border: 2px solid darkblue; 
}


#refresh-button, #order-button {
    padding: 5px 10px;
    margin: 10 5px;
    font-size: 14px;
    cursor: pointer;
}

#refresh-button {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 14px;
	box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5); 
}

#order-button {
	margin: 10 5px;
    padding: 5px 10px;
    background-color: #ffa10d;
    color: white;
    border: none;
    border-radius: 4px;
	margin-bottom: 2px;
}
#template-container {
    width: 80%; 
    font-size: 70px; 
    letter-spacing: -2px;
    word-spacing: -3px; 
    line-height: 0.9; 
    text-align: left; 
    text-transform: uppercase;
    border: 5px solid black; 
    border-radius: 10px; 
    resize: none; 
    padding: 3px; 
    box-sizing: border-box; 
    font-family: 'DIN1451', Arial, sans-serif; 
	overflow-wrap: break-word;
    white-space: pre-wrap;
    word-wrap: break-word;
	overflow: hidden; 
}

.smile-image {
    vertical-align: middle;
    height: 24px;
    margin: 0 5px;
}

[contenteditable=true]:empty:before{
    content: "Текст";
    pointer-events: none;
    display: block; 
    color: grey;
}

@font-face {
    font-family: 'Untitled1';
    src: url('Untitled1.woff2') format('woff2'),
        url('Untitled1.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@media (max-width: 600px) {
    #font-plate {
        width: 120px; 
        height: 35px;
        font-size: 14px;
    }
}



.editable-content {
    min-height: 80px;
    width: 80%;
    font-size: 70px;
    letter-spacing: -2px;
    word-spacing: -3px;
    line-height: 0.9;
    text-align: left;
    text-transform: uppercase;
    border: 5px solid black;
    border-radius: 10px;
    padding: 3px;
    box-sizing: border-box;
    font-family: 'DIN1451', Arial, sans-serif;
    white-space: pre-wrap;
    overflow: hidden;
    background-color: white;
    cursor: text; 
    outline: none; 
}

.editable-content:focus {
    border-color: #007bff; 
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}



.smile-image {
    vertical-align: middle;
    height: 1em; 
    margin: 0 2px;
    display: inline-block;
}



