/* Lineage II Styled Table Viewer - Красивый стиль для просмотра данных */

/* Использование стандартных шрифтов для надежности */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
    font-weight: 400;
    color: #ffedc2;
    background: #0d0b0e;
    background: linear-gradient(135deg, #0d0b0e 0%, #1a1418 50%, #0d0b0e 100%);
    min-height: 100vh;
    line-height: 1.6;
    padding: 20px;
    font-size: 14px; /* Уменьшен базовый размер шрифта */
}

/* ====== НАЧАЛО: КОНТЕЙНЕР И РАЗМЕРЫ ====== */
.container {
    max-width: 98%;
    margin: 0 auto;
    padding: 20px; /* Уменьшено с 25px */
}
/* ====== КОНЕЦ: КОНТЕЙНЕР И РАЗМЕРЫ ====== */

/* Заголовок */
.header {
    text-align: center;
    margin-bottom: 40px; /* Уменьшено с 50px */
    padding: 30px; /* Уменьшено с 40px */
    background: linear-gradient(135deg, 
        rgba(35, 25, 13, 0.95) 0%,
        rgba(59, 42, 22, 0.95) 50%,
        rgba(35, 25, 13, 0.95) 100%);
    border-radius: 20px;
    border: 3px solid #cb9b3d;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8),
                inset 0 0 30px rgba(203, 155, 61, 0.3);
    position: relative;
    overflow: hidden;
}

.header:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%,
        #FFD700 25%,
        #cb9b3d 50%,
        #FFD700 75%,
        transparent 100%);
}

.header h1 {
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    font-weight: 800;
    font-size: 2.5rem; /* Уменьшено с 3.5rem */
    background: linear-gradient(to bottom, #fcdb4e, #ff5400);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
    margin-bottom: 15px; /* Уменьшено с 20px */
}

.header .lead {
    font-size: 1.2rem; /* Уменьшено с 1.6rem */
    color: #ffedc2;
    margin-bottom: 10px; /* Уменьшено с 15px */
    font-weight: 700;
}

.header .mb-0 {
    font-size: 1rem; /* Уменьшено с 1.4rem */
    color: #cb9b3d;
}

.badge {
    display: inline-block;
    padding: 10px 25px; /* Уменьшено с 12px 30px */
    background: linear-gradient(to bottom, #cb9b3d, #8b6a28);
    color: #23190D;
    font-weight: 800;
    border-radius: 25px;
    border: 3px solid #FFD700;
    text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.3);
    font-size: 1.2rem; /* Уменьшено с 1.5rem */
}

/* ====== НАЧАЛО: СТАТИСТИКА - РАСШИРЕННЫЕ РАЗМЕРЫ ====== */
.row.mb-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Уменьшено с 350px */
    gap: 30px; /* Уменьшено с 40px */
    margin-bottom: 15px !important; /* Уменьшено с 20px */
}

/* Статистика */
.stats {
    background: rgba(35, 25, 13, 0.85);
    border-radius: 20px;
    padding: 15px 25px !important; /* Уменьшено с 20px 35px */
    text-align: center;
    border: 3px solid #876625;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 40px; /* Уменьшено с 50px */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stats:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, #FFD700, transparent);
}

.stats:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, #FFD700, transparent);
}

.stats:hover {
    transform: translateY(-8px); /* Уменьшено с 10px */
    box-shadow: 0 20px 45px rgba(203, 155, 61, 0.5);
    border-color: #FFD700;
}

.stats h5 {
    color: #cb9b3d;
    font-size: 0.9rem; /* Уменьшено с 1.0rem */
    font-weight: 500;
    margin-bottom: 15px; /* Уменьшено с 25px */
    text-transform: uppercase;
    letter-spacing: 1.5px; /* Уменьшено с 2px */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.stats h3 {
    font-size: 0.9rem; /* Уменьшено с 1.0rem */
    font-weight: 500;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.stats .text-primary {
    color: #ffedc2 !important;
    text-shadow: 0 0 10px rgba(255, 237, 194, 0.7);
}

.stats .text-success {
    color: #ffedc2 !important;
    text-shadow: 0 0 10px rgba(255, 237, 194, 0.7);
}

/* Специальные классы для цветов статистики */
.stats-number-primary {
    color: #ffedc2 !important;
    text-shadow: 0 0 10px rgba(255, 237, 194, 0.7);
}

.stats-number-success {
    color: #ffedc2 !important;
    text-shadow: 0 0 10px rgba(255, 237, 194, 0.7);
}

/* Дополнительные декоративные элементы для статистики */
.stats .stats-icon {
    font-size: 1.2rem; /* Уменьшено с 1.5rem */
    margin-bottom: 10px; /* Уменьшено с 15px */
    color: #cb9b3d;
    opacity: 0.8;
}

.stats .stats-label {
    font-size: 2.5rem; /* Уменьшено с 3rem */
    color: #876625;
    font-weight: 600;
    margin-top: 8px; /* Уменьшено с 10px */
    text-transform: uppercase;
    letter-spacing: 1px;
}
/* ====== КОНЕЦ: СТАТИСТИКА - РАСШИРЕННЫЕ РАЗМЕРЫ ====== */

/* Формы */
.form-select {
    width: 80%;
    padding: 12px 20px; /* Уменьшено с 15px 25px */
    background: #23190D;
    color: #ffedc2;
    border: 3px solid #876625;
    border-radius: 10px;
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 1.2rem; /* Уменьшено с 1.5rem */
    cursor: pointer;
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='%23cb9b3d' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center; /* Уменьшено с 20px */
    background-size: 20px;
    appearance: none;
}

.form-select:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.4);
}

/* Кнопки */
.btn {
    padding: 12px 30px; /* Уменьшено с 15px 40px */
    background: linear-gradient(to bottom, #cb9b3d, #8b6a28);
    color: #23190D;
    border: 3px solid #FFD700;
    border-radius: 10px;
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 0.9rem; /* Уменьшено с 1.0rem */
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    background: linear-gradient(to bottom, #FFD700, #cb9b3d);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(203, 155, 61, 0.5);
    color: #23190D;
}

.btn:active {
    transform: translateY(0);
}

.btn-outline-primary {
    background: transparent;
    color: #cb9b3d;
    border-color: #cb9b3d;
}

.btn-outline-primary:hover {
    background: linear-gradient(to bottom, #cb9b3d, #8b6a28);
    color: #23190D;
}

.btn-sm {
    padding: 8px 15px; /* Уменьшено с 10px 20px */
    font-size: 0.8rem; /* Уменьшено с 0.5rem */
}

/* ====== НАЧАЛО: КОНТЕЙНЕР ТАБЛИЦЫ ====== */
.table-container {
    background: rgba(35, 25, 13, 0.95);
    border-radius: 20px;
    padding: 25px; /* Уменьшено с 35px */
    margin-bottom: 30px; /* Уменьшено с 40px */
    border: 3px solid #cb9b3d;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8),
                inset 0 0 30px rgba(203, 155, 61, 0.2);
    overflow: hidden;
}

.table-responsive {
    overflow-x: auto;
    border-radius: 15px;
    max-height: 70vh; /* Уменьшено с 75vh */
}
/* ====== КОНЕЦ: КОНТЕЙНЕР ТАБЛИЦЫ ====== */

/* ====== НАЧАЛО: ОСНОВНЫЕ СТИЛИ ТАБЛИЦЫ ====== */
.table {
    width: 95%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
    font-size: 0.95rem; /* Уменьшено с 1.1rem */
    background: transparent;
}

/* Заголовки таблицы */
.table th {
    background: linear-gradient(to bottom, 
        rgba(35, 25, 13, 0.95) 0%,
        rgba(59, 42, 22, 0.95) 100%);
    color: #cb9b3d;
    font-weight: 800;
    font-size: 1.1rem; /* Уменьшено с 1.3rem */
    padding: 20px 15px; /* Уменьшено с 25px 20px */
    border: 2px solid #876625;
    text-align: center;
    text-transform: lowercase; /* Изменено с uppercase на lowercase */
    letter-spacing: 1px; /* Уменьшено с 1.5px */
    position: sticky;
    top: 0;
    z-index: 10;
    min-width: 100px; /* Уменьшено с 120px */
}

.table th:first-child {
    border-top-left-radius: 15px;
}

.table th:last-child {
    border-top-right-radius: 15px;
}

/* Ячейки таблицы - ВСЕ ЯЧЕЙКИ ОДНОГО ЦВЕТА */
.table td {
    background: rgba(35, 25, 13, 0.8);
    color: #ffedc2 !important;
    padding: 18px 15px; /* Уменьшено с 22px 18px */
    border: 2px solid rgba(135, 102, 37, 0.4);
    text-align: center;
    vertical-align: middle;
    font-weight: 400;
    font-size: 0.9rem; /* Уменьшено с 1.05rem */
    transition: all 0.3s ease;
    min-width: 90px; /* Уменьшено с 100px */
}

/* УБИРАЕМ ЧЕРЕДОВАНИЕ СТРОК */
.table-striped tbody tr:nth-of-type(odd) td {
    background: rgba(35, 25, 13, 0.8);
}

/* УБИРАЕМ ЧЕРЕДОВАНИЕ СТРОК ДЛЯ ОБЫЧНОЙ ТАБЛИЦЫ */
.table tbody tr:nth-child(even) td {
    background: rgba(35, 25, 13, 0.8);
}

/* Эффект при наведении на строку */
.table-hover tbody tr:hover td {
    background: rgba(203, 155, 61, 0.15);
    color: #ffedc2 !important;
}
/* ====== КОНЕЦ: ОСНОВНЫЕ СТИЛИ ТАБЛИЦЫ ====== */

/* ====== НАЧАЛО: ЯЧЕЙКИ С ПРЕДПРОСМОТРОМ - ОТКЛЮЧАЕМ ВСПЫВАНИЕ ====== */
.preview-cell {
    max-width: 180px !important; /* Уменьшено с 200px */
    min-height: 25px; /* Уменьшено с 30px */
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    cursor: default;
    position: relative;
    transition: all 0.3s ease;
    line-height: 1.4; /* Уменьшено с 1.5 */
    color: #ffedc2 !important;
}

/* ОТКЛЮЧАЕМ ВСПЛЫВАНИЕ ПРИ НАВЕДЕНИИ */
.preview-cell:hover {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    background: rgba(35, 25, 13, 0.8);
    position: relative;
    z-index: 1;
    padding: 18px 15px;
    border: 2px solid rgba(135, 102, 37, 0.4);
    border-radius: 0;
    box-shadow: none;
    min-width: 90px;
    max-width: 90px;
    transform: none;
    text-shadow: none;
    font-size: 0.9rem;
}

/* ОТКЛЮЧАЕМ ВСПЛЫВАЮЩУЮ ПОДСКАЗКУ */
.preview-cell:hover::after {
    display: none;
}

/* Если нужен просто тултип при наведении (стандартный браузерный) */
.preview-cell {
    position: relative;
}

.preview-cell:hover::before {
    display: none;
}
/* ====== КОНЕЦ: ЯЧЕЙКИ С ПРЕДПРОСМОТРОМ - ОТКЛЮЧАЕМ ВСПЫВАНИЕ ====== */

/* ====== НАЧАЛО: ИЗОБРАЖЕНИЯ В ТАБЛИЦЕ ====== */
.table td img {
    max-width: 60px; /* Уменьшено с 70px */
    max-height: 60px; /* Уменьшено с 70px */
    border: 3px solid #876625;
    border-radius: 8px;
    padding: 3px;
    background: rgba(0, 0, 0, 0.6);
    transition: all 0.3s ease;
    object-fit: contain;
}

.table td:hover img {
    border-color: #FFD700;
    transform: scale(1.1); /* Уменьшено с 1.15 */
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5); /* Уменьшено с 20px */
}
/* ====== КОНЕЦ: ИЗОБРАЖЕНИЯ В ТАБЛИЦЕ ====== */

/* Сообщение об отсутствии данных */
.text-center.text-muted {
    color: #876625 !important;
    font-style: italic;
    padding: 30px; /* Уменьшено с 40px */
    background: rgba(35, 25, 13, 0.8);
    border-radius: 15px;
    border: 2px dashed #876625;
    font-size: 1.1rem; /* Уменьшено с 1.3rem */
}

/* ====== НАЧАЛО: ПАГИНАЦИЯ ====== */
.pagination-container {
    margin-top: 20px; /* Уменьшено с 25px */
    padding: 8px; /* Уменьшено с 10px */
    background: rgba(35, 25, 13, 0.8);
    border-radius: 15px;
    border: 2px solid #876625;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 4px; /* Уменьшено с 5px */
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.page-item {
    list-style: none;
}

.page-link {
    display: block;
    padding: 8px 12px; /* Уменьшено с 10px 15px */
    background: rgba(35, 25, 13, 0.9);
    color: #cb9b3d;
    border: 3px solid #876625;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.9rem; /* Уменьшено с 1.0rem */
    transition: all 0.3s ease;
    min-width: 20px; /* Уменьшено с 25px */
    text-align: center;
}

.page-link:hover {
    background: linear-gradient(to bottom, #cb9b3d, #8b6a28);
    color: #23190D;
    border-color: #FFD700;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.page-item.active .page-link {
    background: linear-gradient(to bottom, #FFD700, #cb9b3d);
    color: #23190D;
    border-color: #FFD700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6); /* Уменьшено с 20px */
    transform: scale(1.05);
}

.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(35, 25, 13, 0.5);
    color: #876625;
    border-color: #876625;
}

.page-item.disabled .page-link:hover {
    transform: none;
    background: rgba(35, 25, 13, 0.5);
}
/* ====== КОНЕЦ: ПАГИНАЦИЯ ====== */

/* Футер с информацией */
.mt-4.text-center.text-muted {
    margin-top: 40px; /* Уменьшено с 50px */
    padding: 20px; /* Уменьшено с 25px */
    background: rgba(35, 25, 13, 0.8);
    border-radius: 15px;
    border: 2px solid #876625;
    color: #cb9b3d;
    font-size: 0.95rem; /* Уменьшено с 1.1rem */
}

.mt-4.text-center.text-muted small {
    display: block;
    line-height: 1.8; /* Уменьшено с 2 */
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    animation: fadeIn 0.6s ease-out;
}

.table tbody tr {
    animation: fadeIn 0.4s ease-out;
    animation-fill-mode: both;
}

/* Декоративные элементы */
.header:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%,
        #FFD700 25%,
        #cb9b3d 50%,
        #FFD700 75%,
        transparent 100%);
}

/* Стили для скроллбара */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(35, 25, 13, 0.9);
    border-radius: 8px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #cb9b3d, #8b6a28);
    border-radius: 8px;
    border: 3px solid rgba(35, 25, 13, 0.9);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #FFD700, #cb9b3d);
}

/* Адаптивность */
@media (max-width: 1200px) {
    .container {
        padding: 15px; /* Уменьшено с 20px */
    }
    
    .header h1 {
        font-size: 2.2rem; /* Уменьшено с 2.8rem */
    }
    
    .row.mb-4 {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Уменьшено с 300px */
        gap: 25px; /* Уменьшено с 30px */
    }
    
    .stats {
        padding: 25px 20px; /* Уменьшено с 35px 30px */
        min-height: 180px; /* Уменьшено с 220px */
    }
    
    .stats h3 {
        font-size: 2.5rem; /* Уменьшено с 3rem */
    }
    
    .table th,
    .table td {
        padding: 15px 12px; /* Уменьшено с 20px 15px */
        font-size: 0.9rem; /* Уменьшено с 1rem */
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px; /* Уменьшено с 15px */
        font-size: 13px; /* Уменьшено */
    }
    
    .header {
        padding: 20px; /* Уменьшено с 30px */
        margin-bottom: 25px; /* Уменьшено с 30px */
    }
    
    .header h1 {
        font-size: 1.8rem; /* Уменьшено с 2.2rem */
    }
    
    .header .lead {
        font-size: 1rem; /* Уменьшено с 1.3rem */
    }
    
    .row.mb-4 {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); /* Уменьшено с 280px */
        gap: 20px; /* Уменьшено с 25px */
        margin-bottom: 30px; /* Уменьшено с 40px */
    }
    
    .stats {
        padding: 20px 15px; /* Уменьшено с 30px 25px */
        min-height: 160px; /* Уменьшено с 200px */
    }
    
    .stats h5 {
        font-size: 0.95rem; /* Уменьшено с 1.2rem */
    }
    
    .stats h3 {
        font-size: 2rem; /* Уменьшено с 2.5rem */
    }
    
    .table-container {
        padding: 20px; /* Уменьшено с 25px */
    }
    
    .table th,
    .table td {
        padding: 15px 10px; /* Уменьшено с 18px 12px */
        font-size: 0.85rem; /* Уменьшено с 0.95rem */
    }
}

@media (max-width: 480px) {
    .row.mb-4 {
        grid-template-columns: 1fr;
        gap: 15px; /* Уменьшено с 20px */
    }
    
    .header {
        padding: 15px; /* Уменьшено с 20px */
    }
    
    .header h1 {
        font-size: 1.5rem; /* Уменьшено с 1.8rem */
    }
    
    .header .badge {
        padding: 8px 15px; /* Уменьшено с 10px 20px */
        font-size: 1rem; /* Уменьшено с 1.2rem */
    }
    
    .stats {
        padding: 15px 12px; /* Уменьшено с 25px 20px */
        min-height: 140px; /* Уменьшено с 180px */
    }
    
    .stats h5 {
        font-size: 0.85rem; /* Уменьшено с 1.1rem */
    }
    
    .stats h3 {
        font-size: 1.8rem; /* Уменьшено с 2.2rem */
    }
    
    .table th,
    .table td {
        padding: 12px 6px; /* Уменьшено с 15px 8px */
        font-size: 0.8rem; /* Уменьшено с 0.85rem */
    }
    
    .table td img {
        max-width: 40px; /* Уменьшено с 50px */
        max-height: 40px; /* Уменьшено с 50px */
    }
}

/* Градиентный фон для всей страницы */
body:before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(203, 155, 61, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* Дополнительные стили для единообразия текста */
.text-muted {
    color: #876625 !important;
}

.text-center {
    color: #ffedc2 !important;
}

/* Убираем все синие и зеленые цвета */
a, .text-primary, .text-info, .text-success, .text-warning {
    color: #ffedc2 !important;
}

/* Специальный класс для текста данных */
.data-text {
    color: #ffedc2 !important;
    font-weight: 400;
}

/* Убираем hover-эффекты для текста */
a:hover, a:focus {
    color: #cb9b3d !important;
}