/* Кастомные стили для KnackTask */

/* Стили для категорий */
.category-section {
    margin-bottom: 32px;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.category-title {
    font-size: 20px;
    font-weight: 600;
    color: #FFD54F;
}

.category-progress {
    font-size: 14px;
    opacity: 0.9;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: move;
    transition: background 0.2s;
}

.category-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.category-item.dragging {
    opacity: 0.5;
}

.category-item input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 8px 12px;
    color: #fff;
}

.category-item input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.category-item button {
    background: rgba(244, 67, 54, 0.3);
    border: 1px solid rgba(244, 67, 54, 0.5);
    color: #ffcdd2;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
}

.category-item button:hover {
    background: rgba(244, 67, 54, 0.5);
}

.add-category-btn {
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px dashed rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
}

.add-category-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.drag-handle {
    cursor: move;
    user-select: none;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.6);
}

.drag-handle:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Кастомные стили для KnackTask */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Ubuntu+Sans+Mono:wght@400;500;600;700&display=swap');

/* CSS переменные */
:root {
    --primary-color: #7445FF;
    --text-color: #FFFFFF;
    --card-bg: rgba(255, 255, 255, 0.1);
    --card-border: rgba(255, 255, 255, 0.3);
    --card-radius: 4px;
    --button-radius: 6px;
    --button-color: #FDDD35;
    --button-text-color: #030303;
    --button-shadow: 0 12px 24px 0 rgba(0, 0, 0, 0.22);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --heading-font-family: 'Ubuntu Sans Mono', monospace;
    
    /* Специальные переменные для форм авторизации */
    --auth-form-bg: #7445FF;
    --auth-form-text: #FFFFFF;
    --auth-form-border: rgba(255, 255, 255, 0.3);
}

/* Общие стили */
* {
    font-family: var(--font-family) !important;
}

html {
    background: #7445FF;
    min-height: 100vh;
}

body {
    background: linear-gradient(135deg, var(--primary-color) 0%, #5A35CC 100%);
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 24px 24px;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Контейнеры */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Заголовок */
.header {
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-right {
    display: flex;
    gap: 10px;
}

.welcome-section h1 {
    font-size: 32px;
    font-weight: 500;
    font-family: var(--heading-font-family) !important;
    margin-bottom: 5px;
    text-align: left;
}

.welcome-section p {
    font-size: 16px;
    opacity: 0.8;
    margin: 0;
}

/* Секции */
.section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 24px;
    font-weight: 500;
    font-family: var(--heading-font-family) !important;
    margin-bottom: 20px;
    text-align: left;
}

/* Заголовки */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-color);
    font-weight: 500;
    font-family: var(--heading-font-family) !important;
    margin: 0;
}

/* Кнопки */
.btn {
    background: var(--button-color);
    border: none;
    border-radius: var(--button-radius);
    color: var(--button-text-color);
    padding: 12px 24px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    box-shadow: var(--button-shadow);
}

.btn:hover {
    background: #FFE866;
    box-shadow: 0 14px 28px 0 rgba(0, 0, 0, 0.25);
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--button-color);
    color: var(--button-text-color);
    box-shadow: var(--button-shadow);
}

.btn-secondary {
    background: rgba(116, 69, 255, 0.2);
    border: 2px solid rgba(116, 69, 255, 0.4);
    color: #FFFFFF;
    box-shadow: 0 12px 24px 0 rgba(0, 0, 0, 0.22);
}

.btn-secondary:hover {
    background: rgba(116, 69, 255, 0.3);
    border-color: rgba(116, 69, 255, 0.5);
}

.btn-small {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-delete {
    background: rgba(116, 69, 255, 0.3);
    border: 2px solid rgba(116, 69, 255, 0.5);
    color: #FFFFFF;
    box-shadow: 0 12px 24px 0 rgba(0, 0, 0, 0.22);
}

.btn-delete:hover {
    background: rgba(116, 69, 255, 0.4);
    border-color: rgba(116, 69, 255, 0.6);
}

.btn-delete:hover {
    background: rgba(244, 67, 54, 0.3);
    border-color: rgba(244, 67, 54, 0.6);
    box-shadow: 0 14px 28px 0 rgba(0, 0, 0, 0.25);
}

/* Карточки */
.card {
    background: var(--card-bg);
    border: 3px solid var(--card-border);
    border-radius: var(--card-radius);
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.card:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Плитки чертежей - одинаковый размер */
.figures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 280px));
    gap: 20px;
    margin-top: 20px;
}

.figure-card {
    background: #7445FF !important;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--card-radius);
    height: 320px;
    display: flex;
    flex-direction: column;
    padding: 0;
    margin-bottom: 20px;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

.figure-card:hover {
    background: #5C3FB4 !important;
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Изображение чертежа */
.figure-image {
    height: 60%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--card-radius) var(--card-radius) 0 0;
    margin: 8px 8px 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.figure-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--card-radius) var(--card-radius) 0 0;
}

/* Заглушка для изображения */
.figure-image-placeholder {
    width: 100%;
    height: 100%;
    background: url('figure-images/placeholder.png') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Контент плитки */
.figure-content {
    padding: 15px;
    height: 40%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.figure-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: white;
    line-height: 1.3;
}

.figure-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-name {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.figure-date {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

/* Плитка "Создать новый" */
.create-card {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 320px;
    background: #FDDD35;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--card-radius);
    padding: 0;
}

.create-card:hover {
    background: #F4D530;
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-4px);
}

.create-icon {
    font-size: 48px;
    font-weight: 300;
    margin-bottom: 15px;
    opacity: 0.8;
    color: black;
}

.create-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: black;
}

/* Убираем статистику объектов */
.figure-stats {
    display: none;
}

.figure-actions {
    display: flex;
    gap: 8px;
}

.figure-actions .btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 12px;
    border-radius: var(--button-radius);
}

/* Системные чертежи */
.system-card {
    /* Используем те же стили, что и обычные карточки */
    border: 3px solid rgba(255, 255, 255, 0.3);
    background: #7445FF !important;
}

.system-badge {
    background: var(--main-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
}

/* Уведомление о копии системного чертежа */
.system-copy-notice {
    background: rgba(116, 69, 255, 0.2);
    border: 2px solid rgba(116, 69, 255, 0.5);
    border-radius: 12px;
    padding: 4px 12px;
    font-size: 12px;
    color: white;
    font-weight: 500;
    margin-right: 10px;
}

/* Категории */
.categories {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.category-btn {
    background: var(--card-bg);
    border: 3px solid var(--card-border);
    border-radius: var(--card-radius);
    color: var(--text-color);
    padding: 10px 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.category-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Формы */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--card-bg);
    border: 3px solid var(--card-border);
    border-radius: var(--card-radius);
    color: var(--text-color);
    font-size: 14px;
    box-sizing: border-box;
}

.form-group input::placeholder, .form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

/* Панели */
.top-panel, .bottom-panel {
    background: var(--card-bg);
    border: 3px solid var(--card-border);
    border-radius: var(--card-radius);
    padding: 15px 20px;
    margin: 10px 0;
}

/* Статус и сообщения */
.status {
    color: var(--text-color);
    font-size: 14px;
    opacity: 0.9;
}

.error {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    border: 2px solid rgba(255, 107, 107, 0.3);
    border-radius: var(--card-radius);
    padding: 10px;
    margin: 10px 0;
}

.success {
    color: #51cf66;
    background: rgba(81, 207, 102, 0.1);
    border: 2px solid rgba(81, 207, 102, 0.3);
    border-radius: var(--card-radius);
    padding: 10px;
    margin: 10px 0;
}

/* Загрузка */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(116, 69, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    margin: 0;
    padding: 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--text-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg);
    border: 3px solid var(--card-border);
    border-radius: var(--card-radius);
    margin-top: 40px;
}

.empty-state h2 {
    font-size: 24px;
    font-family: var(--heading-font-family) !important;
    font-weight: 500;
    margin-bottom: 15px;
}

.empty-state p {
    font-size: 16px;
    opacity: 0.8;
    margin-bottom: 30px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .figures-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 150px));
        gap: 15px;
    }
    
    .figure-card {
        padding: 12px;
    }
    
    .figure-card h3 {
        font-size: 14px;
    }
    
    .container {
        padding: 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-right {
        justify-content: center;
    }
    
    .welcome-section h1 {
        text-align: center;
    }
}

/* Убираем все эмодзи */
.emoji {
    display: none;
}

/* Скрываем эмодзи в тексте */
h1::before, h2::before, h3::before, 
.btn::before, .figure-card::before {
    content: none !important;
}

/* Стили для логотипа */
.logo {
    max-height: 40px;
    max-width: 200px;
    object-fit: contain;
    margin-right: 15px;
}

.logo-small {
    max-height: 24px;
    max-width: 120px;
}

/* Профиль */
.profile-section {
    background: var(--card-bg);
    border: 3px solid var(--card-border);
    border-radius: var(--card-radius);
    padding: 30px;
    margin-bottom: 30px;
}

.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.profile-avatar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 3px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.link-btn {
    color: var(--text-color);
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.link-btn:hover {
    opacity: 1;
}

/* Modal стили */
.modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.7) !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.modal.show,
.modal[style*="display: flex"],
.modal[style*="display:flex"] {
    display: flex !important;
}

.modal-content {
    background: linear-gradient(135deg, #7445FF 0%, #5A35CC 100%) !important;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    color: var(--text-color);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
    position: relative;
    margin: 0 auto;
}

.modal-content h3 {
    font-size: 20px;
    font-weight: 500;
    font-family: var(--heading-font-family) !important;
    margin-bottom: 20px;
    color: var(--text-color);
}

.modal-content .form-group {
    margin-bottom: 20px;
}

.modal-content input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--card-radius);
    color: var(--text-color);
    font-size: 14px;
    box-sizing: border-box;
    font-family: var(--heading-font-family) !important;
}

.modal-content input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.modal-content input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

.modal-content p {
    color: var(--text-color);
    font-family: var(--heading-font-family) !important;
}

.modal-content input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.modal-content input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.modal-buttons .btn {
    min-width: 100px;
}

.btn-danger {
    background: rgba(244, 67, 54, 0.2);
    border: 3px solid rgba(244, 67, 54, 0.4);
    color: #FFFFFF;
    box-shadow: 0 12px 24px 0 rgba(0, 0, 0, 0.22);
}

.btn-danger:hover {
    background: rgba(244, 67, 54, 0.3);
    border-color: rgba(244, 67, 54, 0.5);
}

/* Логотип стили */
.dashboard-logo {
    width: 144px !important; /* 120 * 1.2 */
    height: 48px !important; /* 40 * 1.2 */
    max-width: 144px !important;
    max-height: 48px !important;
}

.welcome-section h1 {
    font-size: 24px; /* уменьшено с 28px */
    font-weight: 500;
    font-family: var(--heading-font-family) !important;
    margin-bottom: 5px;
}

.profile-info h2 {
    font-size: 28px;
    font-family: var(--heading-font-family) !important;
    font-weight: 500;
    margin-bottom: 5px;
}

.profile-info p {
    opacity: 0.8;
    font-size: 16px;
}

.profile-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .profile-form {
        grid-template-columns: 1fr;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }
}

/* Клетчатый фон */
.grid-background {
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 24px 24px;
    background-position: 0 0, 0 0;
}

/* Новый макет с хэдером и боковым меню */
.app-container {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, #3A4BB5 100%);
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 24px 24px;
    display: flex;
    flex-direction: column;
}

/* Хэдер */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-right {
    display: flex;
    gap: 10px;
}

.header .logo {
    height: 50px;
    width: auto;
}

/* Основной макет */
.main-layout {
    display: flex;
    flex: 1;
    margin-top: 0; /* Хэдер убран, отступ не нужен */
}

/* Боковая панель */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 250px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto; /* Скролл для длинного меню */
}

.sidebar-logo {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo .logo {
    height: 50px;
    width: auto;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 20px;
    flex: 1;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--heading-font-family) !important;
}

.sidebar-btn-logout {
    background: var(--button-color);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--button-text-color);
}

.sidebar-btn:not(.sidebar-btn-logout) {
    background: rgba(244, 67, 54, 0.2);
    border-color: rgba(244, 67, 54, 0.4);
    color: #FFFFFF;
}

.sidebar-btn:not(.sidebar-btn-logout):hover {
    background: rgba(244, 67, 54, 0.3);
    border-color: rgba(244, 67, 54, 0.5);
}

.sidebar-btn-logout:hover {
    background: #FFE866;
    box-shadow: 0 14px 28px 0 rgba(0, 0, 0, 0.25);
    transform: translateY(-1px);
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    font-weight: 500;
    font-family: var(--heading-font-family) !important;
    border-radius: var(--card-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.nav-text {
    font-weight: 500;
    font-family: var(--heading-font-family) !important;
}

/* Основной контент */
.main-content {
    flex: 1;
    margin-left: 250px; /* Отступ для закрепленной боковой панели */
    padding: 30px;
    overflow-y: auto;
    min-height: 100vh; /* Полная высота экрана */
}


/* Секции контента */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* Уведомление о разработке */
.development-notice {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--card-radius);
    padding: 60px 40px;
    text-align: center;
    margin-top: 40px;
}

.development-notice p {
    font-size: 18px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* Адаптивность */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px; /* Обновляем отступ для уменьшенной боковой панели */
        padding: 20px;
    }
    
    .sidebar-logo .logo {
        height: 45px;
    }
}

@media (max-width: 600px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        position: fixed;
        top: 0;
        height: 100vh; /* Полная высота экрана */
        z-index: 1001;
        width: 250px; /* Полная ширина на мобильных */
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0; /* Убираем отступ на мобильных */
        padding: 15px;
    }
    
    .sidebar-logo .logo {
        height: 40px;
    }
}

/* Footer */
.footer {
    background: #FFFFFF;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 20px 30px;
    margin-top: auto;
}

.footer-content {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    height: 40px;
    width: auto;
}

/* Адаптивность для footer */
@media (max-width: 768px) {
    .footer {
        padding: 15px 20px;
    }
    
    .footer-logo {
        height: 35px;
    }
}

@media (max-width: 600px) {
    .footer {
        padding: 10px 15px;
    }
    
    .footer-logo {
        height: 30px;
    }
}

/* Уведомления (Notifications) - общие стили для всего сайта */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 8px 32px rgba(116, 69, 255, 0.3);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    animation: slideIn 0.3s ease-out;
}

.notification.success {
    border-left: 4px solid var(--button-color, #FDDD35);
    background: rgba(255, 255, 255, 0.98);
}

.notification.error {
    border-left: 4px solid #ff6b6b;
    background: rgba(255, 255, 255, 0.98);
}

.notification-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    font-size: 22px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--button-color, #FDDD35);
    color: #030303;
    border-radius: 50%;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--primary-color, #7445FF);
    margin-bottom: 4px;
}

.notification-message {
    font-size: 13px;
    color: #2C3E50;
}

.notification-close {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.notification-close:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Модальные окна (Modal) - общие стили для всего сайта */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 20px !important;
    background: rgba(116, 69, 255, 0.85); /* Фиолетовый фон вместо чёрного */
    backdrop-filter: blur(4px);
    z-index: 10001 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    animation: fadeIn 0.3s ease-out;
    box-sizing: border-box;
}

.modal-overlay.hidden {
    display: none;
}

.modal-overlay .modal {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(116, 69, 255, 0.4);
    animation: modalSlideIn 0.3s ease-out;
    border: 2px solid var(--primary-color, #7445FF);
    margin: 0 auto;
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color, #7445FF) 0%, #5A35CC 100%);
    color: var(--text-color, #FFFFFF);
    padding: 20px 24px;
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--button-color, #FDDD35);
    color: #030303;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--text-color, #FFFFFF);
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    padding: 4px 10px;
    border-radius: 4px;
    transition: background 0.3s ease;
    opacity: 0.8;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
}

.modal-body {
    padding: 24px;
    color: #2C3E50;
}

.modal-message {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 8px;
    color: #2C3E50;
    max-width: calc(100% - 80px); /* Оставляем внутренние отступы */
    padding: 0 20px;
    margin-left: auto;
    margin-right: auto;
}

.modal-warning {
    background: rgba(253, 221, 53, 0.1);
    border-left: 4px solid var(--button-color, #FDDD35);
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 16px;
    margin-left: 20px;
    margin-right: 20px;
    font-size: 14px;
    color: #2C3E50;
    max-width: calc(100% - 80px); /* Оставляем внутренние отступы */
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(116, 69, 255, 0.1);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    max-width: calc(100% - 80px);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
}

.modal-btn {
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    min-width: 100px;
}

.modal-btn-primary {
    background: var(--button-color, #FDDD35);
    color: #030303;
    box-shadow: 0 4px 12px rgba(253, 221, 53, 0.3);
}

.modal-btn-primary:hover {
    background: #FFE866;
    box-shadow: 0 6px 16px rgba(253, 221, 53, 0.4);
    transform: translateY(-1px);
}

.modal-btn-secondary {
    background: rgba(116, 69, 255, 0.1);
    color: var(--primary-color, #7445FF);
    border: 1px solid rgba(116, 69, 255, 0.3);
}

.modal-btn-secondary:hover {
    background: rgba(116, 69, 255, 0.2);
    border-color: var(--primary-color, #7445FF);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Форма обратной связи */
.feedback-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #7445FF 0%, #5A35CC 100%);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transition: all 0.3s ease;
}

.feedback-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.feedback-button:active {
    transform: scale(0.95);
}

/* Модальное окно формы обратной связи */
#feedbackModal .modal-content {
    max-width: 500px;
    width: 90%;
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feedback-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feedback-form label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    font-family: var(--heading-font-family);
}

.feedback-form input,
.feedback-form textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--card-radius);
    color: var(--text-color);
    font-size: 14px;
    font-family: var(--font-family);
    box-sizing: border-box;
    resize: vertical;
}

.feedback-form input:focus,
.feedback-form textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

.feedback-form textarea {
    min-height: 120px;
}

.feedback-form .form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 10px;
}

.feedback-form .btn-submit {
    background: var(--button-color);
    border: 3px solid rgba(255, 255, 255, 0.3);
    color: var(--text-color);
    padding: 12px 24px;
    border-radius: var(--card-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--heading-font-family);
}

.feedback-form .btn-submit:hover {
    background: rgba(255, 193, 7, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.feedback-form .btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.feedback-form .btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--text-color);
    padding: 12px 24px;
    border-radius: var(--card-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--heading-font-family);
}

.feedback-form .btn-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Кнопка "Сообщить о баге" на viewer.html */
.btn-report-bug {
    background: rgba(244, 67, 54, 0.2);
    border: 2px solid rgba(244, 67, 54, 0.4);
    color: #fff;
    padding: 8px 16px;
    border-radius: var(--card-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--heading-font-family);
}

.btn-report-bug:hover {
    background: rgba(244, 67, 54, 0.3);
    border-color: rgba(244, 67, 54, 0.5);
}
