body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
}

.container {
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    background: #fff;
}

.header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 20px;
    flex-wrap: wrap;
}

h1 {
    color: #2c3e50;
    margin: 0;
    font-size: 24px;
}

.lang-switcher {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.lang-switcher button {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f8f9fa;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.lang-switcher button:hover {
    background-color: #e2e6ea;
    border-color: #b1b9c1;
}

.lang-switcher button.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
    font-weight: bold;
}

.controls {
    display: flex;
    margin: 20px 0;
}

#searchInput {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

/* --- Стили по умолчанию (Mobile-First) --- */

.table-wrapper {
    overflow-x: auto;
}

#bvTable {
    /* Общая ширина увеличена для размещения более широких колонок */
    width: 1550px; 
    border-collapse: collapse;
    font-size: 14px;
    table-layout: fixed;
}

#bvTable th, #bvTable td {
    border: 1px solid #ddd;
    padding: 10px 8px;
    text-align: center;
    /* ИСПРАВЛЕНО: Увеличена ширина колонок с данными */
    width: 85px; 
}

/* Переопределяем стили для первых двух колонок */
#bvTable th:first-child,
#bvTable td:first-child {
    width: 220px;
    white-space: normal;
    text-align: left;
}

#bvTable th:nth-child(2),
#bvTable td:nth-child(2) {
    width: 120px;
    white-space: normal;
}

#bvTable thead {
    background-color: #2c3e50;
    color: white;
}

#bvTable thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #2c3e50;
}

#bvTable tbody tr:nth-child(even) {
    background-color: #f2f2f2;
}

#bvTable tbody tr:hover {
    background-color: #e8f4f8;
}

#loading {
    text-align: center;
    padding: 20px;
    font-size: 18px;
    color: #555;
}

.hidden {
    display: none;
}

/* --- Медиа-запрос для больших экранов (Desktop) --- */
/* Применяется, только если ширина экрана больше 1024px */

@media (min-width: 1025px) {
    .table-wrapper {
        overflow-x: hidden;
    }

    #bvTable {
        width: 100%; /* На десктопе таблица снова занимает 100% окна */
        table-layout: fixed;
        font-size: 13px;
    }

    #bvTable th, #bvTable td {
        padding: 8px 4px;
        overflow: hidden;
        text-overflow: ellipsis;
        /* Сбрасываем фиксированную ширину, чтобы работали проценты */
        width: auto; 
    }
    
    #bvTable th:first-child,
    #bvTable td:first-child {
        width: 25%;
    }

    #bvTable th:nth-child(2),
    #bvTable td:nth-child(2) {
        width: 8%;
    }

    #bvTable th:last-child,
    #bvTable td:last-child {
        width: 9%;
        overflow: visible;
    }
}