* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', monospace;
}

:root {
    --primary-color: #000000;
    --accent-color: #333333;
    --bg-color: #f5f5f5;
    --panel-bg: #ffffff;
    --text-color: #333333;
    --border-color: #dddddd;
    --border-radius: 4px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
}

.container {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    background-color: var(--panel-bg);
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    position: relative;
}

.canvas {
    flex: 1;
    padding: 20px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    height: 100vh;
    position: relative;
}

.canvas-header {
    text-align: center;
    margin-bottom: 20px;
}

.canvas-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.canvas-header h1 span {
    color: var(--accent-color);
}

.tagline {
    font-size: 1rem;
    color: #666;
}

.output-text {
    width: 100%;
    min-height: 250px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    border-radius: 0;
    padding: 20px;
    overflow: hidden;
    position: relative;
}

.output-text > div {
    width: 100%;
    height: 100%;
    overflow: visible;
    position: relative;
}

.alphabet-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-gap: 10px;
    width: 100%;
    margin-top: 10px;
    overflow: hidden;
}

.letter-cell {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
    background-color: #fff;
    overflow: hidden;
    position: relative;
}

.letter-cell svg {
    width: auto;
    height: 70%;
    max-width: 70%;
    overflow: visible;
    position: relative;
    z-index: 1;
    margin: 0 auto;
    display: block;
    preserveAspectRatio: "xMidYMid meet";
}

.value-display {
    margin-left: 5px;
    font-weight: normal;
    color: var(--primary-color);
}

/* Улучшаем внешний вид SVG букв */
.output-text svg {
    width: 100%;
    height: 100%;
    max-width: none;
    overflow: visible;
}

/* Добавляем анимацию для эффекта сброса настроек */
.reset-flash {
    animation: flash 0.3s ease-in-out;
}

@keyframes flash {
    0% { background-color: #ffffff; }
    50% { background-color: #f0f0f0; }
    100% { background-color: #ffffff; }
}

/* Анимация для визуальной индикации изменения настроек */
@keyframes settingsUpdated {
    0% { background-color: var(--panel-bg); }
    50% { background-color: #f5f5f5; }
    100% { background-color: var(--panel-bg); }
}

.settings-updated {
    animation: settingsUpdated 0.3s ease-out;
}

/* Стили для панели настроек */
.settings-panel {
    width: 350px;
    min-width: 350px;
    padding: 20px;
    background-color: var(--panel-bg);
    overflow-y: auto;
    height: 100vh;
    max-height: 100vh;
    position: sticky;
    right: 0;
    top: 0;
    z-index: 100;
    font-family: 'Courier New', monospace;
    font-size: 0.8em;
}

h2, h3, h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.input-area {
    margin-bottom: 20px;
}

input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-top: 5px;
}

.effect-settings {
    margin-bottom: 20px;
}

.setting {
    margin-bottom: 15px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.setting label {
    font-family: 'Courier New', monospace;
    font-weight: normal;
    display: block;
    margin-bottom: 5px;
}

.setting-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.range-container {
    flex-grow: 1;
    width: 80%;
}

.value-input {
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 30px;
    padding: 3px 1px;
    font-size: 13px;
    text-align: center;
    background: #fff;
    -moz-appearance: textfield; /* Firefox */
}

/* Скрываем стрелки в Chrome, Safari, Edge, Opera */
.value-input::-webkit-outer-spin-button,
.value-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.value-display {
    display: none;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="range"] {
    width: 100%;
    margin-top: 5px;
    -webkit-appearance: none;
    height: 2px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 1px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #000;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #000;
    cursor: pointer;
    border: none;
}

input[type="range"]::-ms-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #000;
    cursor: pointer;
}

button {
    width: 100%;
    border: none;
    padding: 12px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    margin-bottom: 10px;
    transition: all 0.3s;
}

#resetSettings {
    background-color: white;
    color: black;
    border: 1px solid black;
}

#resetSettings:hover {
    background-color: #f5f5f5;
}

#exportSvg {
    background-color: black;
    color: white;
}

#exportSvg:hover {
    background-color: #333;
}

/* Медиа-запросы для адаптивности */
@media screen and (max-width: 1200px) {
    .container {
        flex-direction: row;
    }
    
    .canvas {
        width: calc(100% - 350px);
        height: 100vh;
    }
    
    .settings-panel {
        width: 350px;
        height: 100vh;
    }
}

@media screen and (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .canvas {
        width: 100%;
        height: 60vh;
    }
    
    .settings-panel {
        width: 100%;
        height: 40vh;
        min-width: auto;
    }
    
    .canvas-header h1 {
        font-size: 2rem;
    }
    
    .alphabet-grid {
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: repeat(6, 1fr);
        gap: 5px;
    }
    
    .letter-cell {
        font-size: 1.4rem;
    }
}

/* Улучшаем отображение option в select при разных шрифтах */
#fontSelect option {
    padding: 8px;
}

#fontSelect option[value="Arial"], 
#fontSelect option[value="Helvetica"] {
    font-family: Arial, Helvetica, sans-serif;
}

#fontSelect option[value="Times New Roman"], 
#fontSelect option[value="Georgia"] {
    font-family: 'Times New Roman', Georgia, serif;
}

#fontSelect option[value="Courier New"], 
#fontSelect option[value="Roboto Mono"] {
    font-family: 'Courier New', 'Roboto Mono', monospace;
}

#fontSelect option[value="Montserrat"] {
    font-family: 'Montserrat', sans-serif;
}

.font-settings {
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
}

.font-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.font-selector label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 5px 0;
}

.font-selector input[type="radio"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    margin: 0;
    cursor: pointer;
    position: relative;
}

.font-selector input[type="radio"]:checked {
    border-color: var(--primary-color);
    background-color: #f0f5ff;
}

.font-selector input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Стили для настроек выпуклого шрифта */
.embossed-settings {
    background-color: var(--secondary-bg-color);
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

.embossed-settings h4 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.checkbox-options {
    display: flex;
    gap: 15px;
}

/* Стили для радиокнопок выпуклого шрифта */
.radio-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-options label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.radio-options input[type="radio"] {
    margin-right: 5px;
}

.checkbox-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.checkbox-options input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
} 