/* ===== СТИЛИ СТРАНИЦЫ ЖУРНАЛА ===== */

/* Общие улучшения читаемости */
.logs-container {
    display: flex;
    gap: 20px;
    height: calc(100vh - 120px);
    overflow: visible; /* Разрешаем выход за границы */
}

.logs-sidebar {
    flex: 0 0 280px;
    border-right: 1px solid #00ff88;
    padding-right: 16px;
    padding-left: 4px;
    overflow-y: auto;
    overflow-x: visible;
}

.logs-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: visible;
    padding: 0 4px;
}

/* ===== ФАЙЛЫ В БОКОВОЙ ПАНЕЛИ ===== */
.log-file-item {
    padding: 10px 14px;
    margin: 4px 0;
    cursor: pointer;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    font-family: var(--font-mono);
    background: rgba(0, 255, 136, 0.03);
    transform: scale(1);
    box-sizing: border-box;
}

.log-file-item:hover {
    background: rgba(0, 255, 136, 0.15);
    border-color: #00ff88;
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.03);
    margin-left: 4px;
}

.log-file-item.active {
    background: rgba(0, 255, 136, 0.2);
    border-color: #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.05);
    transform: scale(1);
    margin-left: 0;
}

.log-file-item .file-name {
    font-size: var(--font-size-base);
    font-family: var(--font-mono);
    font-weight: var(--font-weight-semibold);
    color: #00ff88;
}

.log-file-item .file-info {
    font-size: var(--font-size-sm);
    opacity: 0.7;
    color: #88ffbb;
    margin-top: 2px;
}

/* ===== СТАТИСТИКА ===== */
.log-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
    padding: 0 4px;
}

.log-stat-card {
    padding: 14px 12px;
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 6px;
    text-align: center;
    background: rgba(0, 255, 136, 0.05);
    transition: all 0.3s ease;
    transform: scale(1);
}

.log-stat-card:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: #00ff88;
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.05);
    transform: scale(1.02);
}

.log-stat-card .value {
    font-family: var(--font-tech);
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: #00ff88;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
    display: block;
    margin-bottom: 4px;
}

.log-stat-card .label {
    font-family: var(--font-mono);
    font-size: var(--font-size-xs);
    opacity: 0.7;
    color: #88ffbb;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ===== ТАБЛИЦА ДАННЫХ ===== */
.data-table {
    width: 100%;
    font-size: var(--font-size-base);
    border-collapse: collapse;
    font-family: var(--font-mono);
}

.data-table th {
    text-align: left;
    padding: 8px 12px;
    border-bottom: 2px solid #00ff88;
    position: sticky;
    top: 0;
    background: #050805;
    font-family: var(--font-display);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.08em;
    font-size: var(--font-size-sm);
    color: #00ff88;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.1);
}

.data-table td {
    padding: 6px 12px;
    border-bottom: 1px solid rgba(0, 255, 136, 0.08);
    font-family: var(--font-mono);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
}

.data-table tr:hover {
    background: rgba(0, 255, 136, 0.06);
}

/* ===== УЛУЧШЕННЫЕ ЦВЕТА ДЛЯ АМПЛИТУДЫ ===== */
.strength-0 {
    color: #666666;
    opacity: 0.5;
}

.strength-1 {
    color: #66ff88;
    font-weight: var(--font-weight-semibold);
    text-shadow: 0 0 15px rgba(102, 255, 136, 0.2);
}

.strength-2 {
    color: #ffbb44;
    font-weight: var(--font-weight-bold);
    text-shadow: 0 0 20px rgba(255, 187, 68, 0.25);
}

.strength-3 {
    color: #ff3355;
    font-weight: var(--font-weight-bold);
    text-shadow: 0 0 20px rgba(255, 51, 85, 0.4), 0 0 40px rgba(255, 51, 85, 0.2);
    background: rgba(255, 51, 85, 0.08);
    border-radius: 3px;
    padding: 0 4px;
}

/* ===== СПИСОК СОБЫТИЙ ===== */
.events-list {
    font-family: var(--font-mono);
    font-size: var(--font-size-base);
    line-height: 1.8;
}

.events-list > div {
    padding: 4px 8px;
    border-bottom: 1px solid rgba(0, 255, 136, 0.04);
    transition: background 0.2s ease;
}

.events-list > div:hover {
    background: rgba(0, 255, 136, 0.04);
}

.events-list .event-time {
    opacity: 0.6;
    font-family: var(--font-tech);
    color: #88ffbb;
    font-size: var(--font-size-sm);
    margin-right: 8px;
}

.events-list .event-message {
    color: #00ff88;
    font-weight: var(--font-weight-normal);
}

/* ===== ТАБЫ ===== */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding: 4px 8px;
    overflow: visible;
}

.tab-btn {
    padding: 8px 20px;
    background: transparent;
    color: #88ffbb;
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    transition: all 0.2s ease;
    letter-spacing: 0.03em;
    transform: scale(1);
    flex-shrink: 0;
}

.tab-btn:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: #00ff88;
    transform: scale(1.04);
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.05);
}

.tab-btn.active {
    background: rgba(0, 255, 136, 0.15);
    border-color: #00ff88;
    color: #00ff88;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.05);
    transform: scale(1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ===== ПАГИНАЦИЯ ===== */
.pagination-container {
    margin: 16px 0;
    padding: 14px 8px;
    border-top: 1px solid rgba(0, 255, 136, 0.15);
    border-bottom: 1px solid rgba(0, 255, 136, 0.15);
    background: rgba(0, 255, 136, 0.02);
    border-radius: 4px;
    overflow: visible;
}

.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 4px 4px;
    overflow: visible;
}

.pagination-btn {
    padding: 8px 16px;
    background: rgba(0, 255, 136, 0.08);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    transition: all 0.2s ease;
    min-width: 44px;
    transform: scale(1);
    flex-shrink: 0;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(0, 255, 136, 0.2);
    border-color: #00ff88;
    transform: scale(1.04);
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.05);
}

.pagination-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.pagination-info {
    padding: 0 16px;
    color: #88ffbb;
    font-size: var(--font-size-base);
    font-family: var(--font-mono);
    min-width: 220px;
    text-align: center;
    font-weight: var(--font-weight-semibold);
}

.pagination-goto {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
}

.pagination-input {
    width: 60px;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    text-align: center;
}

.pagination-input:focus {
    outline: none;
    border-color: #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.15);
}

.pagination-goto-btn {
    padding: 6px 14px;
    font-size: var(--font-size-sm);
    background: rgba(0, 255, 136, 0.12);
}

.loading-indicator {
    text-align: center;
    padding: 30px;
    color: #88ffbb;
    opacity: 0.8;
    font-family: var(--font-mono);
    font-size: var(--font-size-lg);
}

/* ===== СКРОЛЛБАРЫ ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 255, 136, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 136, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 136, 0.5);
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .logs-container {
        flex-direction: column;
        height: auto;
        gap: 12px;
    }

    .logs-sidebar {
        flex: 0 0 auto;
        border-right: none;
        border-bottom: 1px solid rgba(0, 255, 136, 0.2);
        padding-right: 0;
        padding-bottom: 12px;
        max-height: 180px;
        overflow-y: auto;
    }

    .logs-sidebar h3 {
        font-size: var(--font-size-sm);
        margin-bottom: 8px;
    }

    .logs-content {
        overflow-y: visible;
    }

    .log-file-item {
        padding: 8px 12px;
        margin: 3px 0;
        min-height: 44px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }

    .log-file-item .file-name {
        font-size: var(--font-size-sm);
    }

    .log-file-item .file-info {
        font-size: var(--font-size-xs);
    }

    .log-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .log-stat-card {
        padding: 10px 8px;
    }

    .log-stat-card .value {
        font-size: var(--font-size-xl);
    }

    .log-stat-card .label {
        font-size: var(--font-size-xs);
    }

    .data-table {
        font-size: var(--font-size-sm);
    }

    .data-table th,
    .data-table td {
        padding: 4px 6px;
        font-size: var(--font-size-sm);
    }

    .tabs {
        gap: 6px;
        flex-wrap: wrap;
    }

    .tab-btn {
        padding: 6px 14px;
        font-size: var(--font-size-sm);
        min-height: 40px;
        flex: 1;
        min-width: 60px;
        text-align: center;
    }

    .events-list {
        font-size: var(--font-size-sm);
        line-height: 1.6;
    }

    .pagination-container {
        padding: 10px 8px;
        margin: 12px 0;
    }

    .pagination-controls {
        gap: 4px;
    }

    .pagination-btn {
        padding: 6px 10px;
        font-size: var(--font-size-sm);
        min-height: 40px;
        min-width: 36px;
    }

    .pagination-info {
        font-size: var(--font-size-xs);
        min-width: 80px;
        padding: 0 6px;
    }

    .pagination-goto {
        margin-left: 4px;
    }

    .pagination-input {
        width: 44px;
        min-height: 36px;
        font-size: var(--font-size-sm);
        padding: 4px 6px;
    }

    .pagination-goto-btn {
        padding: 4px 10px;
        font-size: var(--font-size-xs);
        min-height: 36px;
    }
}

@media (max-width: 480px) {
    .log-stats {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .log-stat-card {
        padding: 8px 6px;
    }

    .log-stat-card .value {
        font-size: var(--font-size-lg);
    }

    .data-table th,
    .data-table td {
        padding: 3px 4px;
        font-size: var(--font-size-xs);
    }

    .tab-btn {
        font-size: var(--font-size-xs);
        padding: 4px 10px;
        min-height: 34px;
    }

    .pagination-btn {
        padding: 4px 8px;
        font-size: var(--font-size-xs);
        min-height: 34px;
        min-width: 30px;
    }

    .pagination-input {
        width: 38px;
        min-height: 32px;
        font-size: var(--font-size-xs);
        padding: 3px 4px;
    }
}

/* ===== НОМЕРА ЗАПИСЕЙ ===== */
.event-num {
    opacity: 0.3;
    font-size: var(--font-size-xs);
    margin-right: 8px;
    color: #666;
    min-width: 30px;
    display: inline-block;
}

.data-table td:first-child {
    opacity: 0.3;
    font-size: var(--font-size-xs);
    color: #666;
    min-width: 30px;
}

/* ===== ПУСТОЕ СОСТОЯНИЕ ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #88ffbb;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-message {
    font-size: var(--font-size-xl);
    font-family: var(--font-display);
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    color: #00ff88;
}

.empty-hint {
    font-size: var(--font-size-base);
    font-family: var(--font-mono);
    opacity: 0.5;
    color: #88ffbb;
}

/* ===== ЗАГРУЗКА ===== */
.loading-indicator {
    text-align: center;
    padding: 60px 20px;
    color: #88ffbb;
    font-family: var(--font-mono);
    font-size: var(--font-size-lg);
    opacity: 0.7;
}

.loading-indicator::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 12px;
    border: 2px solid #00ff88;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== БОКОВАЯ ПАНЕЛЬ ===== */
.logs-sidebar {
    flex: 0 0 280px;
    border-right: 1px solid #00ff88;
    padding-right: 16px;
    padding-left: 4px;
    overflow-y: auto;
    overflow-x: visible;
    transition: all 0.3s ease;
}

.logs-sidebar.hidden {
    flex: 0 0 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden !important;
    opacity: 0;
}

.logs-container {
    display: flex;
    gap: 20px;
    height: calc(100vh - 120px);
    overflow: visible;
    transition: gap 0.3s ease;
}