body { font-family: Arial, sans-serif; margin: 0; background-color: #f4f4f4; color: #333; }
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* H1 - Sticky */
h1 {
    text-align: center;
    color: #333;
    margin: 0;
    padding-top: 10px;
    padding-bottom: 10px;
    background-color: #fff;
    position: sticky;
    top: 0px;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Last chest info */
.last-chest-info {
    text-align: center;
    margin: 10px 0;
    padding: 10px;
    background-color: #e8f5e8;
    border: 1px solid #4CAF50;
    border-radius: 5px;
    color: #2e7d32;
    font-size: 0.9em;
}

.last-chest-info p {
    margin: 0;
}

.last-chest-info strong {
    color: #1b5e20;
}
/* Navigation - Sticky */
.navigation {
    text-align: center;
    margin: 0;
    padding-top: 10px;
    padding-bottom: 10px;
    background-color: #fff;
    position: sticky;
    top: 60px; /* Прилипает под H1 (примерно 50px высота h1 + 10px padding) */
    z-index: 99;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.navigation a {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 10px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}
.navigation a:hover {
    background-color: #0056b3;
}
.navigation span {
    font-weight: bold;
    font-size: 1.1em;
    vertical-align: middle;
}
.navigation .current-period-button {
    background-color: #6c757d;
    margin: 0 5px;
}
.navigation .current-period-button:hover {
    background-color: #5a6268;
}

.navigation .logout-button {
    background-color: #dc3545;
}

.navigation .logout-button:hover {
    background-color: #c82333;
}

/* Новый стиль для контейнера фильтрации */
.filter-container {
    margin: 20px 0;
    text-align: center;
    background-color: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.filter-container input[type="text"] {
    padding: 8px;
    width: 300px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
}


/* Общие стили для таблицы (вся прокручивается, не sticky) */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    overflow-x: auto;
    display: block;
}

/* Стили для заголовков таблицы */
thead th {
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    padding: 8px;
    border: 1px solid #ddd;
    text-align: center;
    white-space: nowrap;
    position: relative; /* Для индикатора сортировки */
}
thead th.sortable:hover { background-color: #45a049; }
/* Добавим стили для классов сортировки */
thead th.sorted-asc .sort-indicator { content: " ▲"; }
thead th.sorted-desc .sort-indicator { content: " ▼"; }


/* Стиль для индикатора сортировки */
thead th .sort-indicator {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8em;
}


/* Общие стили для ячеек */
th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

tr:nth-child(even) { background-color: #f2f2f2; }
tr:hover { background-color: #ddd; }
.player-column { text-align: left; font-weight: bold; }
.norm-met { background-color: #d4edda; color: #155724; }
.norm-not-met { background-color: #f8d7da; color: #721c24; }
.progress-bar-container {
    width: 80px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    margin: 0 auto;
}
.progress-bar {
    height: 15px;
    background-color: #4CAF50;
    text-align: center;
    color: white;
    font-size: 0.8em;
    line-height: 15px;
    border-radius: 5px;
}
.progress-bar.red { background-color: #f44336; }
.progress-bar.orange { background-color: #ff9800; }
.progress-bar.green { background-color: #4CAF50; }

/* Scroll to Top button */
#scrollToTopBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    display: none;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
#scrollToTopBtn:hover {
    background-color: #0056b3;
}

/* Export buttons styles */
.export-container {
    margin: 20px 0;
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 20px;
}

.export-container h3 {
    margin: 0;
    color: #333;
    font-size: 1.2em;
    white-space: nowrap;
}

.export-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.export-button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.export-button.csv {
    background-color: #28a745;
    color: white;
}

.export-button.csv:hover {
    background-color: #218838;
    transform: translateY(-1px);
}

.export-button.excel {
    background-color: #007bff;
    color: white;
}

.export-button.excel:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.no-access {
    color: #6c757d;
    font-style: italic;
    margin: 0;
}

/* Player link styles */
.player-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.player-link:hover {
    color: #0056b3;
    text-decoration: underline;
    transform: translateY(-1px);
}

.player-link:active {
    color: #004085;
}