/* Общие стили для всех модулей приложения */

/* Контейнер модуля */
.module-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: #e8f5e9;
}

/* Заголовок модуля (как на стартовой странице) */
.module-header {
    background: #f5f0e8;
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    border: 1px solid #d4c4b0;
    text-align: center;
}

.module-header h1 {
    color: #6b5d4f;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
}

.module-header h1 i {
    margin-right: 15px;
    color: #a88999;
}

.module-header p {
    margin: 0 0 20px 0;
    font-size: 1.2em;
    color: #8b6f5f;
}

/* Навигационное меню (как на стартовой странице) */
.main-nav {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    padding: 15px 30px;
    border-top: 1px solid #d4c4b0;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f0f0e8;
    color: #4a4a3a;
    text-decoration: none;
    border-radius: 25px;
    border: 2px solid #d4c4b0;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9em;
}

.nav-link:hover {
    background: #a88999;
    color: white;
    border-color: #a88999;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(168, 137, 153, 0.3);
    text-decoration: none;
}

.nav-link i {
    font-size: 1.1em;
}

/* Контент модуля */
.module-content {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

.module-section {
    margin-bottom: 30px;
    padding: 30px;
    background: #f5f0e8;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #d4c4b0;
}

.module-section h2 {
    color: #6b5d4f;
    margin-top: 0;
    border-bottom: 2px solid #b8a895;
    padding-bottom: 10px;
    font-size: 1.5em;
}

.module-section h2 i {
    margin-right: 10px;
    color: #a88999;
}

/* Карточки */
.module-card {
    background: #f5f0e8;
    border: 1px solid #d4c4b0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.module-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
}

.btn-primary {
    background: #a88999;
    color: white;
}

.btn-primary:hover {
    background: #987889;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(168, 137, 153, 0.3);
}

.btn-secondary {
    background: #b8a895;
    color: white;
}

.btn-secondary:hover {
    background: #a89885;
    transform: translateY(-1px);
}

.btn-success {
    background: #a8d5a8;
    color: #4a4a3a;
}

.btn-success:hover {
    background: #98c598;
    transform: translateY(-1px);
}

.btn-info {
    background: #b8d4b8;
    color: #4a4a3a;
}

.btn-info:hover {
    background: #a8c4a8;
    transform: translateY(-1px);
}

.btn-warning {
    background: #c9b8a3;
    color: #4a4a3a;
}

.btn-warning:hover {
    background: #b9a893;
    transform: translateY(-1px);
}

.btn-danger {
    background: #c9a9a9;
    color: #4a4a3a;
}

.btn-danger:hover {
    background: #b99999;
    transform: translateY(-1px);
}

/* Формы */
.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #b8a895;
    box-shadow: 0 0 0 3px rgba(184, 168, 149, 0.15);
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #4a4a3a;
}

/* Адаптивность */
@media (max-width: 768px) {
    .module-header {
        padding: 15px;
        margin: 0 0 10px 0;
        border-radius: 0;
    }
    
    .module-header h1 {
        font-size: 1.8em;
    }
    
    .main-nav {
        flex-direction: row;
        align-items: flex-start;
        gap: 8px;
        padding: 10px 15px;
    }
    
    .nav-link {
        flex: 1 1 auto;
        min-width: 100px;
        justify-content: center;
        padding: 8px 12px;
        font-size: 0.85em;
    }
    
    .module-content {
        padding: 10px;
    }
    
    .module-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    /* Уменьшение отступов для основного контента */
    .main-content {
        padding: 15px;
        margin: 0;
    }
    
    /* Специальные стили для техно-юриста */
    .tech-lawyer-container {
        padding: 0;
    }
    
    .auth-panel,
    .chat-panel {
        padding: 10px;
        margin: 0;
    }
    
    .chat-header {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .chat-messages {
        padding: 10px;
        margin-bottom: 10px;
        max-height: calc(100vh - 250px);
    }
    
    .chat-input-area {
        padding: 10px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .auth-form {
        padding: 15px;
    }
    
    /* Уменьшение отступов для header */
    .header {
        padding: 20px 15px;
        margin-bottom: 15px;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    /* Уменьшение отступов для секций */
    .section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    /* Уменьшение отступов для карточек */
    .module-card {
        padding: 15px;
        margin-bottom: 15px;
    }
}

/* Специальные стили для игрового режима */
.game-mode .module-container {
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}

.game-mode .module-header {
    border-radius: 0;
}

/* Стили для сохранения состояния */
.hidden {
    display: none !important;
}

.loading {
    text-align: center;
    padding: 50px;
    color: #4a4a3a;
    font-size: 1.1em;
}

.error {
    background: #f5ebe8;
    color: #4a4a3a;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    border-left: 4px solid #c9a9a9;
}

.success {
    background: #e8f0e8;
    color: #4a4a3a;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    border-left: 4px solid #a8d5a8;
}

/* Анимации */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}
