/* ===== СТИЛИ ДЛЯ СТРАНИЦЫ ПРОФИЛЯ ===== */
/* ===== ВЕРСИЯ: 17.0.0 (СВЯЩЕННАЯ) ===== */
/* ===== АДАПТИВНОСТЬ: ВСЕ ЭКРАНЫ ОТ 360px ДО 4K ===== */

/* ===== БАЗОВЫЕ СТИЛИ ===== */
html, body.profile-page {
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

body.profile-page {
    background-color: transparent;
    font-family: 'Georgia', 'Times New Roman', serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

/* Фоновый слой */
.profile-background-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/static/components/personal_account/img/kabinet/kabinet_fon.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    pointer-events: none;
}

.profile-background-layer::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: -1;
    pointer-events: none;
}

/* ===== ОСНОВНАЯ КАРТОЧКА ===== */
.profile-card {
    display: flex;
    justify-content: center;
    align-items: stretch;
    width: 98%;
    max-width: 2000px;
    margin: 0 auto;
    padding: 5px 0 0;
    gap: 20px;
    height: calc(100vh - 70px) !important;
    max-height: calc(100vh - 70px) !important;
    min-height: calc(100vh - 70px) !important;
}

/* ===== БАЗОВЫЙ СТИЛЬ ДЛЯ ВСЕХ КОЛОНОК ===== */
.realm {
    border-radius: 0;
    background: rgba(255, 248, 235, 0.85);
    backdrop-filter: blur(5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 100% !important;
    overflow: hidden;
}

/* ===== ЛЕВАЯ КОЛОНКА ===== */
.left-realm {
    flex: 3 1 400px;
    min-width: 320px;
    background: rgba(240, 235, 225, 0.8);
    padding: 20px;
   
}

/* ===== ЦЕНТРАЛЬНАЯ КОЛОНКА (ИДЕАЛЬНАЯ) ===== */
.center-realm {
    flex: 1.2 1 300px;
    min-width: 280px;
    background: rgba(255, 248, 235, 0.95);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    padding: 20px;
}

/* Контейнер для всей информации в центре */
.center-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    width: 100%;
}

/* Заголовок "Личный кабинет" */
.center-content h1,
.center-content .page-title {
    font-size: clamp(20px, 2.5vw, 24px);
    margin: 0 0 15px 0;
    padding: 0 0 10px 0;
    color: #4a2c1a;
    text-align: center;
    flex-shrink: 0;
    border-bottom: 2px solid #b39264;
}

/* Блок с аватаром и кнопкой */
.avatar-section {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
}

.avatar {
    width: clamp(100px, 10vw, 120px);
    height: clamp(100px, 10vw, 120px);
    border-radius: 50%;
    border: 4px solid #b39264;
    margin: 0 auto 10px;
    display: block;
    object-fit: cover;
    background: #e7dbbc;
}

.upload-btn {
    background: #cbb27e;
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: clamp(12px, 1.5vw, 14px);
    display: inline-block;
    margin: 0;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    background: #d4bc8f;
    transform: translateY(-2px);
}

/* Блок с данными пользователя (ТОЛЬКО ЗДЕСЬ СКРОЛЛ) */
.user-info {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
    min-height: 0;
    width: 100%;
}

/* Красивый скролл */
.user-info::-webkit-scrollbar {
    width: 4px;
}

.user-info::-webkit-scrollbar-thumb {
    background: #b39264;
    border-radius: 4px;
}

.user-info p {
    border-bottom: 1px dashed #b39264;
    padding: 6px 0;
    margin: 6px 0;
    font-size: clamp(13px, 1.8vw, 15px);
}

/* ===== ПРАВАЯ КОЛОНКА (АБСОЛЮТНО РАБОЧАЯ ВЕРСИЯ) ===== */
.right-realm {
    flex: 3 1 400px;
    min-width: 320px;
    background: rgba(240, 235, 225, 0.8);
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    align-self: stretch;
}

/* Контейнер для правой части */
.right-content {
    display: flex;
    flex-direction: column;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 100% !important;
    overflow: hidden;
    gap: 10px;
    flex: 1;
    min-height: 0;
    padding: 15px;
    box-sizing: border-box;
}

/* Заголовок правой части */
.right-title {
    flex-shrink: 0;
    font-size: clamp(16px, 2vw, 18px);
    color: #4a2c1a;
    margin: 0 0 5px 0;
    font-weight: bold;
    text-align: center;
}

/* Контейнер для мозаики */
.mosaic-workspace {
    flex: 1;
    min-height: 0;
    height: calc(100% - 40px) !important;
    max-height: calc(100% - 40px) !important;
    min-height: calc(100% - 40px) !important;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid rgba(255, 216, 102, 0.3);
    display: flex;
    flex-direction: column;
}

.epoch-panno {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex: 1;
    width: 100%;
    min-height: 0;
    height: 100%;
}

.mosaic-grid {
    padding: clamp(10px, 2vw, 15px);
    color: white;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    height: 100%;
}

/* ===== КНОПКИ (СТОЯТ НАСМЕРТЬ) ===== */
.mosaic-actions-under {
    flex-shrink: 0;
    margin: 0 auto 5px;
    display: flex;
    flex-direction: row;
    gap: clamp(10px, 2vw, 20px);
    justify-content: center;
    align-items: center;
    max-width: min(90%, 450px);
    padding: 0 15px;
    height: 50px;
}

.mosaic-actions-under .epoch-choose-btn,
.mosaic-actions-under .heraldry-open-btn {
    flex: 1 1 auto;
    min-width: clamp(130px, 20vw, 160px);
    max-width: 190px;
    padding: clamp(6px, 1.5vw, 8px) clamp(12px, 2vw, 16px);
    font-size: clamp(12px, 1.8vw, 14px);
    font-weight: 600;
    border-radius: 40px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.5);
    min-height: 40px;
    line-height: 1.2;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    text-align: center;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.mosaic-actions-under .epoch-choose-btn {
    color: #1a1a1a;
    background: linear-gradient(135deg, #ffd866 0%, #ffb347 100%);
}

.mosaic-actions-under .heraldry-open-btn {
    color: #f5f5f5;
    background: linear-gradient(135deg, #4a4a4a 0%, #2a2a2a 100%);
    border: 1px solid #ffd866;
}

.mosaic-actions-under .heraldry-open-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(70%);
    border-color: #888;
}

.mosaic-actions-under .epoch-choose-btn:hover,
.mosaic-actions-under .heraldry-open-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(255, 216, 102, 0.6);
}

/* ===== СУПЕР-ШИРОКИЕ ЭКРАНЫ (ОТ 1800px) ===== */
@media (min-width: 1800px) {
    .profile-card {
        width: 85%;
        max-width: 2200px;
    }
    
    .left-realm, .right-realm {
        flex: 3 1 500px;
        min-width: 400px;
    }
    
    .center-realm {
        flex: 1.3 1 400px;
        min-width: 350px;
    }
    
    .avatar {
        width: 140px;
        height: 140px;
    }
    
    .center-content h1 {
        font-size: 28px;
    }
}

/* ===== СРЕДНИЕ ЭКРАНЫ (1400px - 1799px) ===== */
@media (max-width: 1799px) and (min-width: 1400px) {
    .left-realm, .right-realm {
        flex: 2.8 1 380px;
    }
    
    .center-realm {
        flex: 1.15 1 320px;
    }
}

/* ===== ПЛАНШЕТЫ И НЕБОЛЬШИЕ НОУТЫ (1000px - 1399px) ===== */
@media (max-width: 1399px) and (min-width: 1001px) {
    .left-realm, .right-realm {
        flex: 2.5 1 350px;
        min-width: 300px;
    }
    
    .center-realm {
        flex: 1.1 1 280px;
        min-width: 260px;
    }
    
    .avatar {
        width: 100px;
        height: 100px;
    }
    
    .mosaic-actions-under {
        max-width: 400px;
    }
}

/* ===== ПЕРЕЛОМ В ВЕРТИКАЛЬНЫЙ СТЕК (ДО 1000px) ===== */
@media (max-width: 1000px) {
    html, body.profile-page {
        height: auto;
        min-height: 100vh;
        max-height: none;
        overflow-y: auto;
    }
    
    .profile-card {
        flex-wrap: wrap;
        height: auto !important;
        max-height: none !important;
        min-height: auto !important;
        gap: 15px;
        padding: 10px 0 20px;
    }
    
    /* Сброс жёсткой фиксации */
    .right-realm, 
    .left-realm, 
    .center-realm,
    .right-content,
    .mosaic-workspace,
    .epoch-panno,
    .mosaic-grid {
        height: auto !important;
        max-height: none !important;
        min-height: auto !important;
    }
    
    .realm {
        height: auto !important;
        min-height: 350px;
        width: 100%;
    }
    
    .right-content {
        height: auto !important;
        min-height: 400px;
    }
    
    .mosaic-workspace {
        min-height: 300px;
    }
    
    .mosaic-actions-under {
        margin: 10px auto;
    }
}

/* ===== МОБИЛЬНЫЕ (600px - 999px) ===== */
@media (max-width: 999px) and (min-width: 601px) {
    .left-realm, .center-realm, .right-realm {
        min-width: 90%;
        margin: 0 auto;
    }
    
    .right-title {
        font-size: 20px;
    }
}

/* ===== МАЛЕНЬКИЕ МОБИЛЬНЫЕ (ДО 600px) ===== */
@media (max-width: 600px) {
    body.profile-page {
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
    }
    
    .profile-card {
        width: 95%;
        padding: 5px 0;
        gap: 10px;
    }
    
    .realm {
        padding: 15px;
        min-height: 300px;
    }
    
    .left-realm, 
    .center-realm, 
    .right-realm {
        min-width: 100%;
        margin: 0;
    }
    
    .avatar {
        width: 90px;
        height: 90px;
    }
    
    .center-content h1 {
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .right-title {
        font-size: 18px;
    }
    
    .mosaic-actions-under {
        flex-wrap: wrap;
        height: auto;
        gap: 8px;
        padding: 0 10px;
        margin: 5px auto;
    }
    
    .mosaic-actions-under .epoch-choose-btn,
    .mosaic-actions-under .heraldry-open-btn {
        min-width: 130px;
        white-space: normal;
        font-size: 12px;
        padding: 8px 12px;
        flex: 1 1 45%;
    }
}

/* ===== ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ (ДО 400px) ===== */
@media (max-width: 400px) {
    .realm {
        padding: 12px;
    }
    
    .avatar {
        width: 80px;
        height: 80px;
    }
    
    .center-content h1 {
        font-size: 18px;
    }
    
    .user-info p {
        font-size: 12px;
        padding: 4px 0;
    }
    
    .mosaic-actions-under .epoch-choose-btn,
    .mosaic-actions-under .heraldry-open-btn {
        min-width: 100%;
        font-size: 11px;
        white-space: normal;
    }
    
    .right-title {
        font-size: 16px;
    }
    
    .mosaic-grid {
        padding: 10px;
    }
}

/* ===== ДЛЯ ОЧЕНЬ ВЫСОКИХ ЭКРАНОВ (height > 1200px) ===== */
@media (min-height: 1200px) {
    .profile-card {
        height: calc(100vh - 90px) !important;
    }
    
    .avatar {
        width: 150px;
        height: 150px;
    }
    
    .user-info p {
        padding: 10px 0;
        font-size: 18px;
    }
}





/* ===== КОНЕЦ ФАЙЛА v17.0.0 (СВЯЩЕННАЯ ВЕРСИЯ) ===== */