* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    overflow-y: hidden;
    height: 100vh;
}

/* Специальные стили для landing-page, отменяющие ограничение скролла */
body.landing-page {
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
    background-color: #f8f9fa;
    color: #333;
}

.container {
    display: flex;
    height: 100vh;
    max-width: 100%;
    overflow: hidden;
}

.sidebar {
    width: 280px;
    background-color: #f4f4f4;
    padding: 20px;
    overflow-y: auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-bottom: 220px; /* Добавляем отступ снизу для истории */
}

.main-content {
    flex-grow: 1;
    background-color: #e9e9e9;
    padding: 20px;
    overflow: auto;
    max-width: calc(100vw - 280px);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.canvas-container {
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    max-height: calc(100vh - 40px);
    overflow: hidden;
}

canvas {
    border: 1px solid #ddd;
    margin: 0 auto;
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 40px);
}

h2 {
    font-size: 18px;
    margin: 15px 0 10px;
}

.tools, .templates, .properties {
    margin-bottom: 20px;
}

.actions {
    margin-bottom: 20px;
}

.tool-btn, .template-btn, .action-btn {
    display: block;
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 5px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
}

.tool-btn:hover, .template-btn:hover, .action-btn:hover {
    background-color: #eaeaea;
}

.property {
    margin-bottom: 10px;
}

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

input[type="number"], input[type="text"] {
    width: 100%;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Палитра цветов */
.color-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

.color-swatch:hover {
    transform: scale(1.1);
}

.color-swatch.active {
    box-shadow: 0 0 0 2px #000;
}

/* Текстовые свойства */
.text-property {
    transition: all 0.3s ease;
}

.history-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 280px;
    background-color: #f4f4f4;
    padding: 10px;
    border-top: 1px solid #ddd;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
}

.history-list {
    max-height: 180px;
    overflow-y: auto;
}

.history-item {
    padding: 10px;
    margin: 5px 0;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.history-item:hover {
    background-color: #eaeaea;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 4px;
    width: 400px;
}

.close {
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.modal-form {
    margin-top: 20px;
}

.modal-form input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.modal-buttons {
    display: flex;
    justify-content: space-between;
}

.modal-buttons button {
    padding: 8px 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.modal-buttons button:hover {
    background-color: #45a049;
}

/* Стили для активных элементов на холсте */
.selected {
    border: 2px dashed #2196F3 !important;
}

/* Переключатель языка */
.language-switcher {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.lang-btn {
    flex: 1;
    padding: 5px 10px;
    border: 1px solid #ddd;
    background-color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
}

.lang-btn.active {
    background-color: #2196F3;
    color: white;
}

.lang-btn:hover {
    background-color: #eaeaea;
}

.lang-btn.active:hover {
    background-color: #1976D2;
}

/* Авторизация */
.auth-section {
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.auth-form input {
    width: 100%;
    padding: 8px;
    margin-bottom: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.auth-btn {
    width: 100%;
    padding: 8px;
    margin-bottom: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #2196F3;
    color: white;
    cursor: pointer;
    font-size: 14px;
}

.auth-btn:hover {
    background-color: #1976D2;
}

.user-info {
    text-align: center;
    padding: 10px;
}

/* Ориентация холста */
.canvas-orientation {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
}

.orientation-btn {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    background-color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.orientation-btn.active {
    background-color: #4CAF50;
    color: white;
}

.orientation-btn:hover {
    background-color: #eaeaea;
}

.orientation-btn.active:hover {
    background-color: #45a049;
}

/* Управление экранами */
.screens-control {
    margin-bottom: 15px;
}

.screen-btn {
    width: 100%;
    padding: 8px;
    margin-bottom: 5px;
    border: 1px solid #ddd;
    background-color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.screen-btn:hover {
    background-color: #eaeaea;
}

.screens-list {
    max-height: 100px;
    overflow-y: auto;
}

.screen-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    margin: 4px 0;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.screen-name {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

.screen-actions {
    display: flex;
    gap: 5px;
}

.screen-delete, .screen-rename {
    background: none;
    border: none;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    padding: 0;
}

.screen-delete {
    color: #f44336;
}

.screen-rename {
    color: #2196F3;
}

.screen-delete:hover {
    background-color: rgba(244, 67, 54, 0.1);
}

.screen-rename:hover {
    background-color: rgba(33, 150, 243, 0.1);
}

.screen-item.active {
    background-color: #e3f2fd;
    border-color: #2196F3;
}

.screen-item:hover {
    background-color: #f5f5f5;
}

.screen-item.active:hover {
    background-color: #bbdefb;
}

/* Стили удалены, так как они были заменены новыми */

/* Обновленные стили для предупреждающего модального окна */
.confirm-btn {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
}

.confirm-btn:hover {
    background-color: #d32f2f;
}

.cancel-btn {
    background-color: #9e9e9e;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

.cancel-btn:hover {
    background-color: #757575;
}

/* Анимации для появления элементов */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        padding-bottom: 10px;
    }

    .main-content {
        max-width: 100%;
        height: auto;
        padding: 10px;
    }

    .history-panel {
        position: relative;
        width: 100%;
        max-height: 150px;
    }

    .language-switcher,
    .canvas-orientation {
        flex-direction: column;
    }

    .auth-section {
        margin-bottom: 10px;
    }
}

/* Стили для главной страницы */
.landing-page {
    font-family: 'Montserrat', sans-serif;
    color: #333;
    background-color: #f9f9f9;
    margin: 0;
    padding: 0;
}

.header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #2196F3;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.main {
    padding-top: 80px;
    min-height: calc(100vh - 160px);
}

.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    text-align: center;
}

.title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #2196F3;
    line-height: 1.2;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

.subtitle {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 40px;
    color: #607D8B;
    line-height: 1.4;
}

.description {
    max-width: 900px;
    margin: 0 auto 40px;
    text-align: left;
}

.description p {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.features {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.feature {
    flex-basis: 30%;
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.feature h3 {
    color: #2196F3;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 20px;
}

.feature p {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

.how-to-use {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: left;
}

.how-to-use h3 {
    color: #2196F3;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 22px;
}

.how-to-use ol {
    padding-left: 20px;
    margin: 0;
}

.how-to-use li {
    margin-bottom: 12px;
    font-size: 16px;
    line-height: 1.5;
}

.start-button {
    display: inline-block;
    background-color: #2196F3;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    padding: 15px 40px;
    border-radius: 30px;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
    margin: 0 auto 30px;
    display: block;
    width: fit-content;
}

.start-button:hover {
    background-color: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.4);
}

.footer {
    background-color: #fff;
    padding: 20px 0;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    color: #607D8B;
    font-size: 14px;
}

.footer-contacts {
    margin-bottom: 15px;
}

.template-example {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
    margin-bottom: 30px;
}

.template-example h3 {
    color: #2196F3;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 22px;
}

.template-image {
    max-width: 100%;
    height: auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.template-image:hover {
    transform: scale(1.02);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .header-actions {
        flex-direction: column;
        align-items: flex-end;
        gap: 5px;
    }
    
    .contact-links {
        flex-direction: column;
        align-items: flex-end;
    }
    
    .title {
        font-size: 32px;
    }
    
    .subtitle {
        font-size: 20px;
    }
    
    .features {
        flex-direction: column;
    }
    
    .feature {
        flex-basis: 100%;
        margin-bottom: 20px;
    }
    
    .start-button {
        padding: 12px 30px;
        font-size: 16px;
    }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Переключатель языка в шапке */
.header .language-switcher {
    margin-bottom: 0;
    padding: 0;
    border: none;
}

.contact-links {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.contact-label {
    color: #607D8B;
    font-weight: 500;
}

.tg-link,
.email-link {
    color: #2196F3;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}

.tg-link:hover,
.email-link:hover {
    color: #1976D2;
    text-decoration: underline;
}

.design-param {
    font-style: italic;
    color: #607D8B;
    margin-bottom: 20px;
} 