/* Основные стили */
body {
    font-family: 'Inter', sans-serif;
}

/* Стили для карточек */
.stat-card {
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease-out;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Контейнеры для графиков */
.chart-container {
    position: relative;
    height: 250px;
    width: 100%;
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading-chart {
    animation: pulse 1.5s ease-in-out infinite;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.dark .loading-chart {
    background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
    background-size: 200% 100%;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Стили для таблицы */
table {
    border-collapse: separate;
    border-spacing: 0 8px;
}

tbody tr {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: background-color 0.2s;
}

tbody tr:hover {
    background-color: rgba(0, 162, 255, 0.1);
}

.dark tbody tr {
    background-color: rgba(255, 255, 255, 0.03);
}

td, th {
    padding: 12px 16px;
}

td:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Рекорды с иконками */
.record-online::before {
    content: '👥';
    margin-right: 8px;
}

.record-visits::before {
    content: '📊';
    margin-right: 8px;
}

.record-favorites::before {
    content: '❤️';
    margin-right: 8px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .stat-card {
        padding: 1rem;
    }
    
    .chart-container {
        height: 200px;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    td, th {
        padding: 8px 12px;
    }
}

/* Кастомный скроллбар */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-track {
    background: #2a2a2a;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.dark ::-webkit-scrollbar-thumb {
    background: #666;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #888;
}

/* Стили для кнопок переключения графиков */
.chart-type-btn {
    transition: all 0.2s;
}

.chart-type-btn.active {
    background: #00A2FF;
    color: white;
}

/* Анимация для обновления данных */
@keyframes highlight {
    0% {
        background-color: rgba(0, 162, 255, 0.3);
    }
    100% {
        background-color: transparent;
    }
}

.data-updated {
    animation: highlight 1s ease-out;
}

/* Toast animation */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up {
  animation: fade-in-up 0.35s ease-out;
}