/* Общие стили для лендинга QuickPanel */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #141414; /* Темно-серый фон, как в окне настроек */
    color: #ffffff;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Заголовок страницы */
header {
    background: radial-gradient(circle at center, #1a1a2e 0%, #16213e 30%, #0f3460 70%, #1a1a2e 100%);
    background-size: 200% 200%;
    padding: 50px 20px;
    text-align: center;
    border-radius: 0 0 30px 30px; /* Увеличенные скругленные углы снизу */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); /* Более выраженные тени */
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background-position 0.3s ease-out;
    /* Переменные для интерактивного фона */
    --mouse-x: 50%;
    --mouse-y: 50%;
    /* Улучшенный градиентный фон */
    background: radial-gradient(
        circle at var(--mouse-x) var(--mouse-y),
        #0f3460 0%,
        #16213e 25%,
        #1a1a2e 50%,
        #16213e 75%,
        #0f3460 100%
    );
    background-size: 300% 300%;
    will-change: background;
    transition: background 0.5s ease-out;
}

/* Интерактивный градиент в области курсора */
header::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at var(--mouse-x) var(--mouse-y),
        rgba(232, 112, 31, 0.2) 0%,
        rgba(232, 112, 31, 0.1) 15%,
        rgba(232, 112, 31, 0) 30%
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

header.interactive-bg::after {
    opacity: 1;
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

/* Анимация градиента */
@-webkit-keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@-moz-keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@-o-keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.hero-logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.hero-logo:hover {
    transform: scale(1.05);
}

header h1 {
    font-size: 3.2rem;
    margin-bottom: 15px;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    font-weight: 700;
    transition: all 0.3s ease;
}

header h1:hover {
    color: #e8701f;
    text-shadow: 0 2px 12px rgba(232, 112, 31, 0.6);
}

header p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto 25px;
    color: #c8c8c8;
}

/* Описание программы */
.hero-description {
    font-size: 1rem;
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    color: #d0d0d0;
    background: #2a2a2a;
    border-radius: 15px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid #3c3c3c;
    position: relative;
    overflow: hidden;
}

.hero-description::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e8701f, #f08235);
}

/* Список преимуществ */
.hero-features {
    max-width: 800px;
    margin: 20px auto;
    padding: 0 20px;
    text-align: left;
    columns: 2;
    column-gap: 40px;
}

.hero-features li {
    margin-bottom: 15px;
    padding-left: 25px;
    position: relative;
    break-inside: avoid;
}

.hero-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #e8701f; /* Оранжевый цвет, как у кнопок в окне настроек */
    font-weight: bold;
}

/* Блок уведомления о миграции */
.migration-notice {
    background: linear-gradient(145deg, #2a2a2a, #1e1e1e);
    border-radius: 15px;
    padding: 35px 30px;
    margin: 25px auto;
    max-width: 700px;
    text-align: center;
    border: 2px solid #e8701f;
    box-shadow: 0 8px 25px rgba(232, 112, 31, 0.3);
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(232, 112, 31, 0.3);
    }
    50% {
        box-shadow: 0 8px 35px rgba(232, 112, 31, 0.5);
    }
}

.migration-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.migration-title {
    color: #e8701f;
    font-size: 2rem;
    margin: 0 0 20px 0;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.migration-message {
    color: #d0d0d0;
    font-size: 1.15rem;
    line-height: 1.6;
    margin: 0 0 30px 0;
}

.migration-message strong {
    color: #e8701f;
    font-weight: 700;
}

.migration-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(to bottom, #e8701f, #c25d1a);
    color: white;
    padding: 18px 35px;
    font-size: 1.2rem;
    text-decoration: none;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, 0.2);
    min-width: 380px;
    max-width: 100%;
    box-sizing: border-box;
}

.migration-button:hover {
    background: linear-gradient(to bottom, #f08235, #d46a22);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 30px rgba(232, 112, 31, 0.5);
}

.migration-button:active {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.migration-button-icon {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Адаптивность для блока миграции */
@media (max-width: 768px) {
    .migration-notice {
        padding: 25px 15px;
        margin: 20px 10px;
        max-width: calc(100% - 20px);
    }
    
    .migration-icon {
        font-size: 3rem;
    }
    
    .migration-title {
        font-size: 1.6rem;
    }
    
    .migration-message {
        font-size: 1rem;
    }
    
    .migration-button {
        padding: 15px 20px;
        font-size: 1rem;
        min-width: auto;
        width: 100%;
        max-width: 100%;
        gap: 10px;
        box-sizing: border-box;
    }
    
    .migration-button-icon {
        font-size: 1.3rem;
    }
}

/* Кнопка Яндекс диска */
.yandex-disk-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(to bottom, #FFCC00, #FFB300);
    color: #333;
    padding: 16px 30px;
    font-size: 1.1rem;
    text-decoration: none;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, 0.3);
    min-width: 350px;
    max-width: 100%;
    margin: 15px auto;
    box-sizing: border-box;
}

.yandex-disk-button:hover {
    background: linear-gradient(to bottom, #FFD633, #FFCC00);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(255, 204, 0, 0.4);
}

.yandex-disk-button:active {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.yandex-disk-icon {
    font-size: 1.4rem;
}

/* Адаптивность для кнопки Яндекс диска */
@media (max-width: 768px) {
    .yandex-disk-button {
        padding: 12px 20px;
        font-size: 0.95rem;
        min-width: auto;
        width: 100%;
        max-width: 100%;
        gap: 8px;
        box-sizing: border-box;
        margin: 15px 10px;
    }
    
    .yandex-disk-icon {
        font-size: 1.2rem;
    }
}

/* Кнопка скачивания */
.download-button {
    display: inline-block;
    background: linear-gradient(to bottom, #e8701f, #c25d1a); /* Оранжевый градиент */
    color: white;
    padding: 14px 30px;
    font-size: 1.1rem;
    text-decoration: none;
    border-radius: 10px;
    margin: 25px 10px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: auto; /* Автоматическая ширина */
    box-sizing: border-box; /* Учет padding и border в общей ширине */
    min-width: 220px; /* Минимальная ширина кнопки */
    max-width: 90%; /* Максимальная шираина кнопки */
    text-align: center;
}

.download-button:hover {
    background: linear-gradient(to bottom, #f08235, #d46a22);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.download-button:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

/* Информация о версии */
.version-info {
    font-size: 1.2rem;
    color: #c8c8c8;
    margin-top: 20px;
    background: rgba(42, 42, 42, 0.7);
    padding: 12px 25px;
    border-radius: 30px;
    display: inline-block;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: 1px solid #3c3c3c;
}

/* Основной контент */
main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Секции */
section {
    background: #282828; /* Серый цвет, как в окне настроек */
    margin-bottom: 30px;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 1px solid #3c3c3c;
}

section h2 {
    color: #ffffff;
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8701f; /* Оранжевая линия */
}
/* Стили для нового блока "Основные функции и преимущества" */
.features-section {
    background: #282828;
    margin-bottom: 30px;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 1px solid #3c3c3c;
}

.features-section h2 {
    color: #ffffff;
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8701f;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.feature-card {
    background: linear-gradient(145deg, #2a2a2a, #1e1e1e);
    border-radius: 10px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #3c3c3c;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
    border-color: #e8701f;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #e8701f;
}

.feature-title {
    color: #ffffff;
    font-size: 1.3rem;
    margin: 15px 0 10px;
}

.feature-description {
    color: #d0d0d0;
    font-size: 1rem;
    line-height: 1.5;
}

/* Списки */
ul {
    padding-left: 20px;
}

ul li {
    margin-bottom: 12px;
    color: #d0d0d0;
}

ul li strong {
    color: #ffffff;
}

/* Слайдер скриншотов */
.screenshots-container {
    position: relative;
    max-width: 800px;
    margin: 20px auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid #3c3c3c;
}

.screenshot-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.screenshot-slide {
    min-width: 100%;
    box-sizing: border-box;
}

.screenshot-slide img {
    width: 100%;
    display: block;
    cursor: pointer;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 16px;
    cursor: pointer;
    font-size: 18px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.slider-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.slider-nav.prev {
    left: 15px;
}

#support-project {
    background: #282828;
    margin-bottom: 30px;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 1px solid #3c3c3c;
    display: flex;
    flex-direction: column;
    min-height: 500px; /* Минимальная высота для корректного позиционирования кнопок */
}

.support-content {
    flex: 1; /* Занимает всё доступное пространство кроме кнопок */
}

.support-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}

.support-option {
    flex: 1;
    min-width: 250px;
    background: #1e1e1e;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #3c3c3c;
    display: flex;
    flex-direction: column;
}

.support-option h3 {
    color: #ffffff;
    margin-top: 0;
}

.support-option p {
    color: #d0d0d0;
    flex: 1; /* Текст занимает всё доступное пространство */
}

.support-button-container {
    margin-top: auto; /* Прижимает кнопку к нижнему краю */
}

.support-button {
    display: inline-block;
    width: 100%;
    padding: 14px;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    text-align: center;
    box-sizing: border-box;
}

/* Стили для кнопки Т-Банка (оранжевая) */
.tbank-button {
    background: linear-gradient(to bottom, #e8701f, #c25d1a);
}

.tbank-button:hover {
    background: linear-gradient(to bottom, #f08235, #d46a22);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.tbank-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Стили для кнопки СБП (синяя) */
#support-project .card-transfer-button {
    background: linear-gradient(to bottom, #4169e1, #3456c0); /* Синий градиент */
}

#support-project .card-transfer-button:hover {
    background: linear-gradient(to bottom, #5a85ff, #4169e1); /* Синий градиент при наведении */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

#support-project .card-transfer-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(to bottom, #3456c0, #2a4a9e); /* Более темный синий при нажатии */
}

/* Стили для кнопки Ю-money (фиолетовая) */
.ymoney-button {
    background: linear-gradient(to bottom, #800080, #6a006a);
}

.ymoney-button:hover {
    background: linear-gradient(to bottom, #993399, #800080);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.ymoney-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Стили для кнопки Яндекс браузера (розовая) */
.partner-tbank-button {
    background: linear-gradient(to bottom, #ff69b4, #ff1493);
}

.partner-tbank-button:hover {
    background: linear-gradient(to bottom, #ff8dc6, #ff4aa5);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.partner-tbank-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
/* Стили для кнопки "Корпоративный браузер" (светло-серая) */
#partners-program .support-option .card-transfer-button {
    background: linear-gradient(to bottom, #a0a0a0, #8a8a8a); /* Светло-серый градиент */
}

#partners-program .support-option .card-transfer-button:hover {
    background: linear-gradient(to bottom, #b0b0b0, #9a9a9a); /* Светло-серый градиент при наведении */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

#partners-program .support-option .card-transfer-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(to bottom, #909090, #7a7a7a); /* Более темный серый при нажатии */
}

/* Стили для кнопки Яндекс Плюс (сиреневая) */
.partner-ymoney-button {
    background: linear-gradient(to bottom, #9370db, #7b68ee);
}

.partner-ymoney-button:hover {
    background: linear-gradient(to bottom, #a68fdf, #8a7fff);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.partner-ymoney-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.support-note {
    color: #d0d0d0;
    font-style: italic;
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: rgba(50, 50, 50, 0.5);
    border-radius: 8px;
    border-left: 4px solid #e8701f;
}

.qrcode-placeholder {
    margin-top: 15px;
    text-align: center;
    display: none;
}

.qrcode-placeholder img {
    max-width: 100%;
    height: auto;
    border: 1px solid #3c3c3c;
    border-radius: 4px;
}

.slider-nav.next {
    right: 15px;
}

.slider-dots {
    text-align: center;
    padding: 15px 0;
}

.dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 5px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s;
}

.dot.active,
.dot:hover {
    background-color: #e8701f;
}

/* Системные требования */
#system-requirements {
    background: #282828;
    margin-bottom: 30px;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 1px solid #3c3c3c;
}

#system-requirements h2 {
    color: #ffffff;
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8701f;
}

#system-requirements ul {
    padding-left: 20px;
}

#system-requirements li {
    margin-bottom: 12px;
    color: #d0d0d0;
}

#system-requirements li strong {
    color: #ffffff;
}

/* История версий */
#version-history-content {
    background-color: #1e1e1e;
    border: 1px solid #3c3c3c;
    border-radius: 8px;
    padding: 15px;
    max-height: 400px; /* Ограничение высоты */
    overflow-y: auto; /* Добавление прокрутки */
    color: #d0d0d0;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

#version-history-content pre {
    margin: 0;
    white-space: pre-wrap;
}

/* Центрирование кнопки перед формой обратной связи */
.download-button.centered {
    display: block;
    margin: 20px auto;
}

/* Форма обратной связи */
#contact-form {
    background: #282828;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 1px solid #3c3c3c;
}

#contact-form h2 {
    text-align: center;
    color: #ffffff;
    margin-top: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #d0d0d0;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #3c3c3c;
    border-radius: 6px;
    background-color: #1e1e1e;
    color: #ffffff;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e8701f; /* Оранжевая рамка при фокусе */
    box-shadow: 0 0 0 2px rgba(232, 112, 31, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

#contact-form button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(to bottom, #4169e1, #3456c0); /* Синий градиент, как у кнопки "Поблагодарить автора" */
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#contact-form button:hover {
    background: linear-gradient(to bottom, #5a85ff, #4169e1);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

#contact-form button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Информация о разработчике */
#developer-info {
    background: #282828;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 1px solid #3c3c3c;
    text-align: center;
    margin-bottom: 30px;
}

#developer-info h2 {
    color: #ffffff;
    margin-top: 0;
}

#developer-info p {
    color: #d0d0d0;
    font-size: 1.1rem;
    margin: 10px 0;
}

/* Футер */
footer {
    background: #1a1a1a;
    color: #a0a0a0;
    text-align: center;
    padding: 25px;
    font-size: 1rem;
    border-top: 1px solid #333;
}

/* Адаптивность */
@media (max-width: 768px) {
    header {
        padding: 30px 15px;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
    
    .hero-features {
        columns: 1;
    }
    
    .screenshots-gallery {
        grid-template-columns: 1fr;
    }
    
    section {
        padding: 20px;
    }
    
    .download-button {
        min-width: 200px;
        padding: 15px 30px;
        font-size: 1.1rem;
        margin: 15px 5px;
    }
}

/* Стили для рекламного блока Mail.Ru */
#mailru-ad-container {
    display: none;
    text-align: center;
    margin: 20px 0;
}

/* Стили для праздничного режима (снежинки) */
.festive-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    border-radius: inherit; /* Наследуем скругление родителя */
}

/* Стили для праздничного режима (снежинки) */
.snowflake {
    position: fixed; /* Глобально поверх всего */
    color: #fff;
    font-size: 1.5em; /* Увеличили размер */
    font-family: Arial, sans-serif;
    text-shadow: 0 0 2px #000;
    user-select: none;
    pointer-events: none;
    will-change: transform, opacity;
    top: -50px;
    z-index: 20000; /* Очень высокий z-index */
    animation-name: fall;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

/* Защита блоков с QR-кодами от перекрытия снежинками */
#support-project, #partners-program {
    position: relative;
    z-index: 20001; /* Еще выше, чтобы перекрывать снежинки */
    background: #282828; /* Фон обязателен */
}

@keyframes fall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(110vh) rotate(180deg); /* Падаем через весь экран */
    }
}

/* Стили для салютов (возвращаем fixed для глобального отображения) */
.firework-particle {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999; /* Поверх всего */
    animation: explode 1s ease-out forwards;
}

@keyframes explode {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* Стили для контейнера */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Стили для контейнера фильтра по времени */
.filter-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: linear-gradient(145deg, #2a2a2a, #1e1e1e);
    border-radius: 10px;
    border: 1px solid #3c3c3c;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.filter-label {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
}

.time-filter-select {
    flex: 1;
    max-width: 300px;
    padding: 10px 15px;
    background-color: #1e1e1e;
    color: #ffffff;
    border: 1px solid #3c3c3c;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23e8701f' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

.time-filter-select:hover {
    border-color: #e8701f;
    box-shadow: 0 0 0 2px rgba(232, 112, 31, 0.2);
}

.time-filter-select:focus {
    outline: none;
    border-color: #e8701f;
    box-shadow: 0 0 0 2px rgba(232, 112, 31, 0.3);
}

.time-filter-select option {
    background-color: #1e1e1e;
    color: #ffffff;
    padding: 10px;
}

/* Стили для карточек статистики в analytics.html */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(145deg, #2a2a2a, #1e1e1e);
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #3c3c3c;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100px;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    border-color: #e8701f;
}

.stat-card .icon {
    font-size: 1.4rem;
    margin-bottom: 6px;
    color: #e8701f;
}

.stat-card h3 {
    color: #ffffff;
    font-size: 0.8rem;
    margin: 6px 0 4px;
    line-height: 1.1;
}

.stat-card .value {
    color: #e8701f;
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: auto;
}

/* Стили для контейнера графика активности */
.activity-chart-container {
    background: #282828;
    border-radius: 10px;
    padding: 25px;
    border: 1px solid #3c3c3c;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.activity-header h3 {
    color: #ffffff;
    font-size: 1.3rem;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8701f;
    flex: 1;
    min-width: 200px;
}

.time-scale-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.time-scale-label {
    color: #d0d0d0;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
}

.time-scale-select {
    padding: 8px 12px;
    background-color: #1e1e1e;
    color: #ffffff;
    border: 1px solid #3c3c3c;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23e8701f' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
    min-width: 140px;
}

.time-scale-select:hover {
    border-color: #e8701f;
    box-shadow: 0 0 0 2px rgba(232, 112, 31, 0.2);
}

.time-scale-select:focus {
    outline: none;
    border-color: #e8701f;
    box-shadow: 0 0 0 2px rgba(232, 112, 31, 0.3);
}

.time-scale-select option {
    background-color: #1e1e1e;
    color: #ffffff;
    padding: 10px;
}

.chart-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
}

.chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Стили для фильтров графика активности */
.activity-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #1e1e1e;
    border-radius: 8px;
    border: 1px solid #3c3c3c;
}

.activity-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: #2a2a2a;
}

.activity-filter-item:hover {
    background: #3a3a3a;
    transform: translateY(-1px);
}

.activity-filter-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #3c3c3c;
    border-radius: 4px;
    background: #1e1e1e;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.activity-filter-item input[type="checkbox"]:checked {
    background: #e8701f;
    border-color: #e8701f;
}

.activity-filter-item input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.filter-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

.filter-label {
    color: #d0d0d0;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Стили для контейнеров графиков */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.chart-card {
    background: #282828;
    border-radius: 10px;
    padding: 25px;
    border: 1px solid #3c3c3c;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Стили для заголовка графика с сортировкой */
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.chart-header h3 {
    color: #ffffff;
    font-size: 1.3rem;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8701f;
    flex: 1;
    min-width: 200px;
}

/* Стили для селектора сортировки */
.sort-select {
    padding: 8px 12px;
    background-color: #1e1e1e;
    color: #ffffff;
    border: 1px solid #3c3c3c;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23e8701f' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
    min-width: 150px;
}

.sort-select:hover {
    border-color: #e8701f;
    box-shadow: 0 0 0 2px rgba(232, 112, 31, 0.2);
}

.sort-select:focus {
    outline: none;
    border-color: #e8701f;
    box-shadow: 0 0 0 2px rgba(232, 112, 31, 0.3);
}

.sort-select option {
    background-color: #1e1e1e;
    color: #ffffff;
    padding: 10px;
}

/* Стили для контейнеров графиков с прокруткой */
.bar-chart-container,
.pie-chart-container {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Кастомный скроллбар */
.bar-chart-container::-webkit-scrollbar,
.pie-chart-container::-webkit-scrollbar {
    width: 8px;
}

.bar-chart-container::-webkit-scrollbar-track,
.pie-chart-container::-webkit-scrollbar-track {
    background: #1e1e1e;
    border-radius: 4px;
}

.bar-chart-container::-webkit-scrollbar-thumb,
.pie-chart-container::-webkit-scrollbar-thumb {
    background: #3c3c3c;
    border-radius: 4px;
}

.bar-chart-container::-webkit-scrollbar-thumb:hover,
.pie-chart-container::-webkit-scrollbar-thumb:hover {
    background: #e8701f;
}

/* Стили для графиков */
.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bar {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 8px 0;
}

.bar-label {
    min-width: 100px;
    color: #d0d0d0;
    font-size: 0.9rem;
}

.bar-fill {
    background: linear-gradient(to right, #e8701f, #f08235);
    height: 20px;
    border-radius: 4px;
    min-width: 20px;
    transition: width 0.5s ease;
}

.bar-value {
    color: #ffffff;
    font-weight: 600;
    min-width: 30px;
    text-align: right;
}

.no-data {
    color: #888;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.pie-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pie-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 3px;
}

.legend-label {
    color: #d0d0d0;
    font-size: 0.9rem;
}

/* Стили для таблицы данных */
.data-table {
    background: #282828;
    border-radius: 10px;
    padding: 25px;
    border: 1px solid #3c3c3c;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.data-table h3 {
    color: #ffffff;
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #e8701f;
    padding-bottom: 10px;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #1e1e1e;
    color: #e8701f;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #3c3c3c;
    font-weight: 600;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #3c3c3c;
    color: #d0d0d0;
}

.data-table tr:hover {
    background: rgba(232, 112, 31, 0.1);
}

/* Прокрутка для таблицы последних событий */
.data-table-container {
    max-height: 400px; /* Высота примерно на 10 строк */
    overflow-y: auto;
    border-radius: 4px;
    border: 1px solid #3c3c3c;
}

.data-table-container table {
    margin-bottom: 0;
}

.data-table-container thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table-container th {
    position: sticky;
    top: 0;
    background: #1e1e1e;
    z-index: 20;
}

/* Стили для состояния загрузки и ошибок */
.loading {
    text-align: center;
    color: #e8701f;
    font-size: 1.2rem;
    padding: 40px;
}

.error {
    background: #d32f2f;
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
}

/* Стили для кликабельных карточек */
.stat-card.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.stat-card.clickable:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border-color: #e8701f;
}

.stat-card.clickable:active {
    transform: translateY(-2px);
}

/* Стиль для активной карточки */
.stat-card.clickable.active {
    border: 3px solid #e8701f !important;
    box-shadow: 0 0 20px rgba(232, 112, 31, 0.5);
    transform: translateY(-3px);
}

/* Стили для карточки онлайн-устройств */
.stat-card.online-indicator {
    position: relative;
    border-color: #4CAF50 !important;
}

.stat-card.online-indicator::before {
    content: "";
    position: absolute;
    top: 15px;
    right: 15px;
    width: 12px;
    height: 12px;
    background: #4CAF50;
    border-radius: 50%;
    animation: pulse 2s infinite;
    z-index: 10;
}

.stat-card.online-indicator .value {
    color: #4CAF50 !important;
}

/* Стили для контейнера фильтров устройств */
.devices-filter-container {
    background: #282828;
    border-radius: 10px;
    padding: 25px;
    margin: 25px 0;
    border: 2px solid #e8701f;
    box-shadow: 0 4px 15px rgba(232, 112, 31, 0.2);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.devices-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #3c3c3c;
}

.devices-filter-header h3 {
    color: #ffffff;
    font-size: 1.3rem;
    margin: 0;
}

.close-button {
    background: #3c3c3c;
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-button:hover {
    background: #ef4444;
    transform: rotate(90deg);
}

.devices-filter-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-action-btn {
    padding: 8px 16px;
    background: #1e1e1e;
    color: #ffffff;
    border: 1px solid #3c3c3c;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-action-btn:hover {
    background: #e8701f;
    border-color: #e8701f;
    transform: translateY(-2px);
}

.devices-filters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.devices-filters::-webkit-scrollbar {
    width: 8px;
}

.devices-filters::-webkit-scrollbar-track {
    background: #1e1e1e;
    border-radius: 4px;
}

.devices-filters::-webkit-scrollbar-thumb {
    background: #3c3c3c;
    border-radius: 4px;
}

.devices-filters::-webkit-scrollbar-thumb:hover {
    background: #e8701f;
}

.device-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #2a2a2a;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #3c3c3c;
}

.device-filter-item:hover {
    background: #3a3a3a;
    border-color: #e8701f;
    transform: translateY(-2px);
}

.device-filter-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #3c3c3c;
    border-radius: 4px;
    background: #1e1e1e;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.device-filter-checkbox:checked {
    background: #e8701f;
    border-color: #e8701f;
}

.device-filter-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.device-filter-id {
    color: #d0d0d0;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.device-filter-alias {
    color: #e8701f;
    font-size: 0.9rem;
    font-weight: 600;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

/* Адаптивность для analytics */
@media (max-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .filter-container {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px 15px;
    }
    
    .filter-label {
        font-size: 0.9rem;
    }
    
    .time-filter-select {
        max-width: 100%;
        font-size: 0.9rem;
        padding: 10px 15px;
    }
    
    /* Адаптивность для заголовка графика активности */
    .activity-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .activity-header h3 {
        width: 100%;
        min-width: auto;
        font-size: 1.1rem;
    }
    
    .time-scale-selector {
        width: 100%;
        justify-content: space-between;
    }
    
    .time-scale-label {
        font-size: 0.85rem;
    }
    
    .time-scale-select {
        width: auto;
        min-width: 120px;
        font-size: 0.85rem;
        padding: 6px 10px;
    }
    
    /* Адаптивность для заголовков графиков с сортировкой */
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .chart-header h3 {
        width: 100%;
        min-width: auto;
    }
    
    .sort-select {
        width: 100%;
        min-width: auto;
    }
    
    /* Адаптивность для фильтров активности */
    .activity-filters {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
    }
    
    .activity-filter-item {
        width: 100%;
        justify-content: flex-start;
        padding: 8px 10px;
        flex: 1 1 100%;
        min-width: auto;
    }
    
    .activity-filter-item input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }
    
    .filter-color {
        width: 10px;
        height: 10px;
    }
    
    .filter-label {
        font-size: 0.85rem;
    }
    
    /* Адаптивность для фильтров устройств */
    .devices-filter-container {
        padding: 15px;
        margin: 15px 0;
    }
    
    .devices-filter-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .devices-filter-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .filter-action-btn {
        width: 100%;
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .devices-filters {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        max-height: 200px;
        gap: 8px;
    }
    
    .device-filter-item {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    
    .device-filter-checkbox {
        width: 16px;
        height: 16px;
    }
    
    /* Адаптивность для карточек статистики */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px 12px;
        min-height: 100px;
    }
    
    .stat-card .icon {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }
    
    .stat-card h3 {
        font-size: 0.95rem;
        margin: 8px 0 5px;
        line-height: 1.2;
    }
    
    .stat-card .value {
        font-size: 1.5rem;
        margin-top: 5px;
    }
    
    /* Адаптивность для контейнера графика активности */
    .activity-chart-container {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .chart-wrapper {
        height: 250px; /* Уменьшенная высота для мобильных */
    }
    
    .chart-wrapper canvas {
        max-height: 250px;
    }
    
    /* Адаптивность для графиков */
    .charts-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .chart-card {
        padding: 15px;
    }
    
    .chart-header h3 {
        font-size: 1.1rem;
    }
    
    /* Адаптивность для таблицы */
    .data-table {
        padding: 15px;
    }
    
    .data-table h3 {
        font-size: 1.1rem;
    }
    
    .data-table-container {
        max-height: 300px;
        overflow-x: auto; /* Горизонтальная прокрутка для таблицы */
    }
    
    .data-table table {
        min-width: 600px;
        font-size: 0.85rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 6px;
        font-size: 0.8rem;
    }
    
    /* Адаптивность для блока псевдонимов */
    .aliases-container {
        padding: 15px;
        margin-top: 20px;
    }
    
    .aliases-header {
        font-size: 1.1rem;
    }
    
    .aliases-form {
        flex-direction: column;
        gap: 8px;
    }
    
    .aliases-input {
        width: 100%;
        min-width: auto;
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .aliases-button {
        width: 100%;
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .aliases-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .aliases-actions .aliases-button {
        width: 100%;
    }
    
    .aliases-list {
        grid-template-columns: 1fr;
        max-height: 300px;
        gap: 10px;
    }
    
    .alias-item {
        padding: 12px;
    }
    
    .alias-device-id {
        font-size: 0.75rem;
    }
    
    .alias-name {
        font-size: 1rem;
    }
    
    .alias-action-btn {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
}

/* Дополнительная оптимизация для очень маленьких экранов */
@media (max-width: 480px) {
    .activity-header h3 {
        font-size: 1rem;
    }
    
    .time-scale-label {
        font-size: 0.8rem;
    }
    
    .time-scale-select {
        min-width: 100px;
        font-size: 0.8rem;
        padding: 5px 8px;
    }
    
    .activity-filters {
        padding: 10px;
        gap: 6px;
    }
    
    .activity-filter-item {
        padding: 6px 8px;
    }
    
    .filter-label {
        font-size: 0.8rem;
    }
    
    .chart-wrapper {
        height: 200px;
    }
    
    .chart-wrapper canvas {
        max-height: 200px;
    }
    
    .stat-card {
        padding: 12px 10px;
        min-height: 90px;
    }
    
    .stat-card .icon {
        font-size: 1.5rem;
    }
    
    .stat-card h3 {
        font-size: 0.9rem;
    }
    
    .stat-card .value {
        font-size: 1.3rem;
    }
}

/* Стили для контейнера кнопок скачивания */
.download-buttons-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 12px;
    margin: 20px 0;
    max-width: 900px;
}

.download-buttons-container .download-button {
    margin: 0;
    flex: 1;
    min-width: 200px;
    max-width: 340px;
    padding: 14px 25px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 65px;
    border-radius: 10px;
}

/* Стили для карточки статистики скачиваний */
.downloads-stat-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    background: linear-gradient(145deg, #2a2a2a, #1e1e1e);
    border-radius: 10px;
    padding: 20px 34px;
    border: 1px solid #3c3c3c;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    margin: 10px auto;
    max-width: 400px;
    min-height: 80px;
}

.downloads-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    border-color: #e8701f;
}

.downloads-stat-card .stat-icon {
    font-size: 2.2rem;
    color: #e8701f;
    flex-shrink: 0;
}

.downloads-stat-card .stat-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.downloads-stat-card .stat-label {
    color: #d0d0d0;
    font-size: 1rem;
    margin-bottom: 6px;
}

.downloads-stat-card .stat-value {
    color: #e8701f;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
}

/* Адаптивность для карточки статистики */
@media (max-width: 768px) {
    .download-buttons-container {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .download-buttons-container .download-button {
        min-width: 100%;
        max-width: 100%;
        padding: 10px 18px;
        font-size: 0.95rem;
    }
    
    .downloads-stat-card {
        min-width: 100%;
        max-width: 100%;
        padding: 10px 15px;
    }
    
    .downloads-stat-card .stat-icon {
        font-size: 1.3rem;
    }
    
    .downloads-stat-card .stat-label {
        font-size: 0.75rem;
    }
    
    .downloads-stat-card .stat-value {
        font-size: 1.1rem;
    }
}

@media (max-width: 1024px) {
    .download-buttons-container .download-button {
        min-width: 180px;
        max-width: 300px;
        font-size: 1rem;
        padding: 12px 20px;
    }
    
    .downloads-stat-card {
        min-width: 240px;
        max-width: 360px;
        padding: 18px 30px;
    }
    
    .downloads-stat-card .stat-icon {
        font-size: 2rem;
    }
    
    .downloads-stat-card .stat-label {
        font-size: 0.95rem;
    }
    
    .downloads-stat-card .stat-value {
        font-size: 1.5rem;
    }
}

/* Стили для блока псевдонимов устройств */
.aliases-container {
    background: #282828;
    border-radius: 10px;
    padding: 25px;
    border: 1px solid #3c3c3c;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin-top: 30px;
    margin-bottom: 30px;
}

.aliases-header {
    color: #ffffff;
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #e8701f;
    padding-bottom: 10px;
}

.aliases-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.aliases-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 15px;
    background-color: #1e1e1e;
    color: #ffffff;
    border: 1px solid #3c3c3c;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.aliases-input:focus {
    outline: none;
    border-color: #e8701f;
    box-shadow: 0 0 0 2px rgba(232, 112, 31, 0.2);
}

.aliases-input::placeholder {
    color: #888;
}

.aliases-button {
    padding: 12px 20px;
    background: linear-gradient(to bottom, #e8701f, #c25d1a);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.aliases-button:hover {
    background: linear-gradient(to bottom, #f08235, #d46a22);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.aliases-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.aliases-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.aliases-button.export-btn {
    background: linear-gradient(to bottom, #4CAF50, #388E3C);
}

.aliases-button.export-btn:hover {
    background: linear-gradient(to bottom, #66BB6A, #43A047);
}

.aliases-button.import-btn {
    background: linear-gradient(to bottom, #2196F3, #1976D2);
}

.aliases-button.import-btn:hover {
    background: linear-gradient(to bottom, #42A5F5, #1E88E5);
}

.aliases-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.aliases-list::-webkit-scrollbar {
    width: 8px;
}

.aliases-list::-webkit-scrollbar-track {
    background: #1e1e1e;
    border-radius: 4px;
}

.aliases-list::-webkit-scrollbar-thumb {
    background: #3c3c3c;
    border-radius: 4px;
}

.aliases-list::-webkit-scrollbar-thumb:hover {
    background: #e8701f;
}

.alias-item {
    background: #2a2a2a;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #3c3c3c;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s ease;
}

.alias-item:hover {
    border-color: #e8701f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.alias-device-id {
    color: #d0d0d0;
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
    word-break: break-all;
    padding: 8px;
    background: #1e1e1e;
    border-radius: 4px;
    border-left: 3px solid #e8701f;
}

.alias-name {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 8px;
    background: rgba(232, 112, 31, 0.1);
    border-radius: 4px;
}

.alias-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.alias-action-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.alias-action-btn.edit-btn {
    background: #2196F3;
    color: white;
}

.alias-action-btn.edit-btn:hover {
    background: #42A5F5;
    transform: translateY(-1px);
}

.alias-action-btn.delete-btn {
    background: #f44336;
    color: white;
}

.alias-action-btn.delete-btn:hover {
    background: #ef5350;
    transform: translateY(-1px);
}

.aliases-file-path {
    display: none;
}

/* Адаптивность для блока псевдонимов */
@media (max-width: 768px) {
    .aliases-form {
        flex-direction: column;
    }
    
    .aliases-input {
        width: 100%;
        min-width: auto;
    }
    
    .aliases-button {
        width: 100%;
    }
    
    .aliases-actions {
        flex-direction: column;
    }
    
    .aliases-actions .aliases-button {
        width: 100%;
    }
    
    .aliases-list {
        grid-template-columns: 1fr;
        max-height: 300px;
    }
}
