* {
    box-sizing: border-box;
    user-select: none; /* Запрет выделения/копирования текста */
    -webkit-user-select: none;
}

* {
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent; 
    -webkit-touch-callout: none; 
}

html, body {
    width: 100%;
    position: relative;
    /* Видалено overflow-x: hidden, щоб не ламати вертикальний скрол у Telegram */
}

body {
    background-color: #080808; 
    margin: 0;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    padding-top: 30px; 
    -webkit-overflow-scrolling: touch; /* Гарантує плавний і чіткий скрол на мобільних пристроях */
}

.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60vh;
}

.pulsing-logo {
    width: 120px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; filter: drop-shadow(0 0 10px rgba(255,255,255,0.2)); }
    50% { transform: scale(1.1); opacity: 1; filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.4)); }
    100% { transform: scale(1); opacity: 0.8; filter: drop-shadow(0 0 10px rgba(255,255,255,0.2)); }
}

.profile-header {
    text-align: center;
    margin-bottom: 25px;
}

.profile-header h2 {
    margin: 12px 0 0 0;
    font-size: 20px;
    font-weight: 700;
}

.avatar-red {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid #ff3333;
    box-shadow: 0 0 15px rgba(255, 51, 51, 0.4);
}

.glass-panel {
    background: rgba(15, 15, 15, 0.5); /* Темный тон из десктопной версии */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 20px;
    margin: 0 15px 15px 15px;
}

.mt-15 { margin-top: 15px; }

/* Стилі прогрес-барів */
.progress-section { margin-bottom: 15px; }
.progress-section:last-child { margin-bottom: 0; }

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 8px;
    color: #ccc;
    font-weight: bold;
}

.progress-container {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.progress-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-bar.orange { background: linear-gradient(90deg, #ff8c00, #ff5e00); box-shadow: 0 0 10px rgba(255, 140, 0, 0.5); }
.progress-bar.green { background: linear-gradient(90deg, #32cd32, #00ff00); box-shadow: 0 0 10px rgba(50, 205, 50, 0.5); }

/* Стилі балансу (ОБНОВЛЕНО) */
.balance-container { 
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.balance-text-group {
    display: flex;
    flex-direction: column;
    text-align: left; /* Сдвиг текста влево */
}

.balance-label {
    display: block;
    font-size: 11px; /* Уменьшенный размер надписи */
    color: #aaaaaa;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.balance-value {
    font-size: 26px;
    font-weight: 900;
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

/* --- КНОПКА РОБОТИ --- */
.work-btn-container {
    width: 65px;
    height: 65px;
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.work-btn-container.active {
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
    cursor: pointer;
}

.work-btn-container.active:hover {
    transform: scale(1.08);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.5);
}

.work-btn-container.disabled {
    background: rgba(100, 100, 100, 0.1);
    border: 2px solid #555;
    filter: grayscale(100%);
    cursor: not-allowed;
}

/* --- КНОПКА ТОП ВОДІЇВ --- */
.top-btn-container {
    width: 65px;
    height: 65px;
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: rgba(100, 100, 100, 0.1);
    border: 2px solid #555;
    cursor: pointer;
}

.top-btn-container:hover {
    transform: scale(1.08);
    border-color: #777; 
    box-shadow: 0 0 15px rgba(100, 100, 100, 0.3); 
}

.top-btn-container svg {
    transition: color 0.3s;
}

.top-btn-container:hover svg {
    color: #fff !important;
}

/* --- ПРОБІГ --- */
.mileage-month {
    font-size: 11px;
    color: #888;
    margin-top: 4px;
    font-weight: 600;
}

/* --- МОДАЛЬНЕ ВІКНО ЛІДЕРБОРДУ --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Виїжджає знизу як у Telegram */
    backdrop-filter: blur(5px);
}

.modal-content {
    width: 100%;
    height: 85vh;
    margin: 0;
    border-radius: 20px 20px 0 0; /* Округлення тільки зверху */
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
    padding: 20px 15px;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #fff;
    font-weight: 900;
}

.close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 32px; height: 32px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
}
.close-btn:active { background: rgba(255, 255, 255, 0.3); }

/* --- ПЕРЕМИКАЧ --- */
.toggle-container {
    display: flex;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 15px;
}

.toggle-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: #888;
    padding: 8px 0;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    transition: all 0.3s;
}

.toggle-btn.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* --- СПИСОК ЛІДЕРІВ --- */
.leaderboard-list {
    flex: 1;
    padding-right: 5px;
}

.leader-card {
    display: flex;
    align-items: center;
    background: rgba(20, 20, 20, 0.6);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Топ 3 світіння */
.leader-card.rank-1 { border: 1px solid #FFD700; box-shadow: 0 0 15px rgba(255, 215, 0, 0.15); }
.leader-card.rank-2 { border: 1px solid #C0C0C0; box-shadow: 0 0 15px rgba(192, 192, 192, 0.15); }
.leader-card.rank-3 { border: 1px solid #CD7F32; box-shadow: 0 0 15px rgba(205, 127, 50, 0.15); }

.leader-rank {
    width: 30px;
    font-weight: 900;
    font-size: 15px;
    color: #666;
    text-align: center;
}

.leader-card.rank-1 .leader-rank { color: #FFD700; font-size: 20px; }
.leader-card.rank-2 .leader-rank { color: #C0C0C0; font-size: 20px; }
.leader-card.rank-3 .leader-rank { color: #CD7F32; font-size: 20px; }

.leader-avatar {
    width: 42px; height: 42px;
    border-radius: 10px;
    margin: 0 12px;
    object-fit: cover;
}

.leader-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.leader-name {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.leader-role { font-size: 11px; color: #888; }

.leader-km {
    font-weight: 900;
    font-size: 16px;
    color: #fff;
    text-align: right;
}
.leader-km span { font-size: 10px; color: #666; margin-left: 2px; }

/* =========================================================================
   ОПТИМІЗОВАНИЙ КОНТЕЙНЕР ЛІДЕРБОРДУ
   ========================================================================= */

/* Полностью отключаем клики, ховеры и подсветку при нажатии */
.leaderboard-cascade-card {
    opacity: 0;
    transform: translateY(-25px);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
    pointer-events: none !important; /* Блокирует любые нажатия и мобильный эффект :active */
}

.leaderboard-cascade-card.show {
    opacity: 1;
    transform: translateY(0);
}

/* Фиксируем статичные цвета премиум-панелей ТОП-3 без ховеров */
.card.glass-panel.island-rank-1 {
    border: 1px solid rgba(255, 215, 0, 0.2) !important;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.03), rgba(255, 215, 0, 0.01)) !important;
    box-shadow: 0 8px 32px 0 rgba(255, 215, 0, 0.05) !important;
}
.card.glass-panel.island-rank-2 {
    border: 1px solid rgba(192, 192, 192, 0.2) !important;
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.03), rgba(192, 192, 192, 0.01)) !important;
    box-shadow: 0 8px 32px 0 rgba(192, 192, 192, 0.05) !important;
}
.card.glass-panel.island-rank-3 {
    border: 1px solid rgba(205, 127, 50, 0.2) !important;
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.03), rgba(205, 127, 50, 0.01)) !important;
    box-shadow: 0 8px 32px 0 rgba(205, 127, 50, 0.05) !important;
}

.island-rank-1 .leader-rank-num { color: #FFD700; font-size: 18px !important; }
.island-rank-2 .leader-rank-num { color: #C0C0C0; font-size: 18px !important; }

/* Контейнер верхней навигации топа и новостей */
.top-nav-island {
    display: flex;
    align-items: center;
    justify-content: center; /* Центрируем Dynamic Island */
    position: relative;
    margin: 15px 15px 20px 15px;
    height: 48px;
}

/* Оригинальный Dynamic Island в стиле исходника с ПК */
.dynamic-island {
    display: flex;
    align-items: center;
    background: rgba(15, 15, 15, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 40px;
    padding: 4px;
    height: 44px;
}

/* Кнопки переключения внутри Айленда с фиксированной шириной (фикс прыжков) */
.dynamic-island .nav-btn,
.dynamic-island-tabs .island-btn {
    width: 105px; /* Фиксированная ширина предотвращает изменение размера капсулы */
    text-align: center;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 30px;
    color: #888888;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    white-space: nowrap;
    border: none;
    background: transparent;
}

.dynamic-island .nav-btn:hover { 
    color: #fff; 
}

/* Яркий фирменный красный фон активного выбора как в исходнике */
.dynamic-island .nav-btn.active,
.dynamic-island-tabs .island-btn.active {
    background: rgba(255, 51, 51, 0.1) !important;
    color: #ff3333 !important;
    text-shadow: 0 0 10px rgba(255, 51, 51, 0.4);
}

/* Стильный круглый крестик закрытия — позиционируется строго по центру справа */
.island-close-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #aaaaaa;
    width: 34px;
    height: 34px;
    border-radius: 50% !important; /* Строго круглый */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    z-index: 10;
}

.island-close-btn:active {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transform: translateY(-50%) scale(0.9);
}

/* СТИЛІ КАСКАДНОЇ АНІМАЦІЇ КАРТОК (ЗВЕРХУ ВНИЗ) */
.leaderboard-cascade-card {
    opacity: 0;
    transform: translateY(-25px);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

/* Клас, який додається через JS для плавного проявлення */
.leaderboard-cascade-card.show {
    opacity: 1;
    transform: translateY(0);
}

/* Ефект підсвічування при кліку/наведенні на мобільці */
.leaderboard-cascade-card:active {
    background: rgba(255, 255, 255, 0.08) !important;
}

/* --- СТИЛИ ДЛЯ БЕЛОГО ЦВЕТА ПРОБЕГА --- */
#total-mileage {
    color: #ffffff !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

#leaderboard-slider {
    display: flex;
    width: 200%; /* Две страницы рядом */
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); /* Плавный премиальный инерционный сдвиг */
    will-change: transform;
}

.slider-page {
    width: 50%; /* Каждая страница занимает ровно 100% экрана смартфона */
    flex-shrink: 0;
    padding: 0 15px; /* Возвращаем паддинги внутрь страниц для красоты */
    box-sizing: border-box;
}

/* =========================================================================
   ФІКСОВАНЕ НИЖНЄ МЕНЮ В СТИЛІ PREMIUM DYNAMIC ISLAND
   ========================================================================= */

.main-content-wrapper {
    width: 100%;
    position: relative;
    overflow-x: clip; /* clip працює краще за hidden: ховає анімацію, але не створює багів зі скролом */
    overflow-y: visible; /* Пропускає вертикальний жест скролу до body */
}

/* 3. Гарантируем, что сама вкладка новостей не ломает ширину */
#tab-content-news {
    width: 100%;
}

/* Приховування / Відображення сторінок вкладок */
.app-tab-page {
    display: none;
    width: 100%;
    animation: fadeInTab 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.app-tab-page.active {
    display: block;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Фіксована панель навігації знизу екрана */
.bottom-nav-container {
    position: fixed;
    bottom: 20px; /* Відступ від самого низу екрана смартфона */
    left: 0;
    width: 100%;
    padding: 0 15px;
    z-index: 9999;
    pointer-events: none; /* Щоб кліки крізь порожнечу проходили на контент */
    display: none;
}

/* Сама капсула Dynamic Island */
.bottom-dynamic-island {
    pointer-events: auto; /* Повертаємо кліки на кнопки */
    max-width: 500px;
    margin: 0 auto;
    height: 64px;
    background: rgba(15, 15, 15, 0.65); /* Темне скло */
    backdrop-filter: blur(25px) saturate(160%);
    -webkit-backdrop-filter: blur(25px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 35px; /* Заокруглена капсула */
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

/* Кнопки меню */
.bottom-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    cursor: pointer;
    color: #777777; /* Неактивний колір */
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 4px;
    position: relative;
    border-radius: 25px;
}

/* Іконки всередині кнопок */
.nav-svg {
    width: 22px;
    height: 22px;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.25s ease;
}

/* Текст під іконками */
.bottom-nav-btn span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* Стан наведення / Активний стан */
.bottom-nav-btn:active .nav-svg {
    transform: scale(0.85);
}

.bottom-nav-btn.active {
    color: #ff3333; /* Фірмовий червоний NeoCrime */
    text-shadow: 0 0 10px rgba(255, 51, 51, 0.3);
}

.bottom-nav-btn.active .nav-svg {
    transform: translateY(-2px) scale(1.05); /* Легкий підйом активної іконки */
    filter: drop-shadow(0 0 6px rgba(255, 51, 51, 0.5));
}

/* =========================================================================
   СТИЛІ ДЛЯ СТОРІНОК «У РОЗРОБЦІ» (UNDER CONSTRUCTION)
   ========================================================================= */
.under-construction-plate {
    background: rgba(15, 15, 15, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 40px 25px;
    margin: 40vh 15px 0 15px; /* Розміщуємо по центру екрана мобілки */
    transform: translateY(-50%);
    text-align: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.construction-icon {
    font-size: 48px;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.1));
}

.under-construction-plate h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.under-construction-plate p {
    margin: 0;
    font-size: 13px;
    color: #aaaaaa;
    line-height: 1.5;
    font-weight: 500;
}

/* Мобільна оптимізація кнопок новин */
.shop-btn.news-open-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #eee;
    padding: 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.shop-btn.news-open-btn:active {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2);
}

/* =========================================================================
   ЭСТЕТИЧНЫЕ БЕЛО-СЕРЫЕ СТИЛИ ДЛЯ ЛЕНТЫ И СТРАНИЦЫ НОВОСТЕЙ
   ========================================================================= */

.news-feed-title-meta {
    margin: 0; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    color: #888888; /* Убрали красный, сделали благородный серый */
    font-size: 11px;
    font-weight: 700;
}

.news-card-title {
    margin: 0 0 8px 0; 
    font-size: 17px; 
    font-weight: 900; 
    color: #ffffff; 
    line-height: 1.3;
}

.news-card-summary {
    margin: 0 0 15px 0; 
    font-size: 13px; 
    color: #aaaaaa; 
    line-height: 1.5;
}

.news-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    width: 100%;
    margin-bottom: 12px;
}

.news-footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #666666;
    font-weight: 600;
    margin-bottom: 12px;
}

.news-footer-author {
    color: #999999 !important; /* Убрали красный цвет автора */
    font-weight: 700;
}

/* Естетична кнопка детальніше зі шрифтом як у заголовка новини */
.shop-btn.news-open-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #ffffff;
    padding: 12px;
    border-radius: 12px;
    font-size: 12px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900 !important; /* ЖИРНИЙ ШРИФТ ЯК У ЗАГОЛОВКА */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    width: 100%;
    cursor: pointer;
}

.shop-btn.news-open-btn:active {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.15);
    transform: scale(0.98);
}

.news-thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Разблокировка кликов специально для ленты новостей и конвоев */
#news-feed-container .leaderboard-cascade-card,
#convoys-list-container .leaderboard-cascade-card,
#shop-list-container .leaderboard-cascade-card {
    pointer-events: auto !important;
}

/* Добавляем эффект нажатия именно на картинку маршрута, чтобы юзер понимал, что она кликабельна */
#convoys-list-container img[onclick] {
    transition: transform 0.2s ease, opacity 0.2s ease;
}

#convoys-list-container img[onclick]:active {
    transform: scale(0.9);
    opacity: 0.8;
}

/* =========================================================================
   АНИМАЦИИ ДЛЯ КАРТЫ КОНВОЕВ
   ========================================================================= */

@keyframes mapModalFadeIn {
    from { opacity: 0; backdrop-filter: blur(0px); }
    to { opacity: 1; backdrop-filter: blur(10px); }
}

@keyframes mapModalZoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes mapModalFadeOut {
    from { opacity: 1; backdrop-filter: blur(10px); }
    to { opacity: 0; backdrop-filter: blur(0px); }
}

@keyframes mapModalZoomOut {
    from { transform: scale(1); opacity: 1; }
    to { transform: scale(0.8); opacity: 0; }
}

.map-modal-active {
    display: flex !important;
    animation: mapModalFadeIn 0.3s ease-out forwards;
}

.map-modal-active #mobile-map-img {
    animation: mapModalZoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.map-modal-closing {
    animation: mapModalFadeOut 0.25s ease-out forwards !important;
}

.map-modal-closing #mobile-map-img {
    animation: mapModalZoomOut 0.25s ease-out forwards !important;
}

/* =========================================================================
   СТИЛІ ДЛЯ МАГАЗИНУ (МОБІЛЬНА ВЕРСІЯ)
   ========================================================================= */
.mobile-shop-btn {
    padding: 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    width: 100%;
    margin-top: 8px;
    cursor: pointer;
    background: rgba(0,0,0,0.3);
    border: 1px solid;
    transition: all 0.2s ease;
}

.mobile-shop-btn.temp { color: #ff9900; border-color: rgba(255, 153, 0, 0.5); }
.mobile-shop-btn.temp:active { background: rgba(255, 153, 0, 0.15); }

.mobile-shop-btn.perm { color: #4CAF50; border-color: rgba(76, 175, 80, 0.5); }
.mobile-shop-btn.perm:active { background: rgba(76, 175, 80, 0.15); }

.mobile-shop-btn.disabled { color: #666; border-color: #444; background: rgba(255,255,255,0.03); cursor: not-allowed; }

/* Анімація для модалки магазину */
.shop-modal-active { display: flex !important; animation: mapModalFadeIn 0.2s ease-out forwards; }
.shop-modal-active #mobile-shop-modal-content { transform: scale(1) !important; opacity: 1 !important; }
.shop-modal-closing { animation: mapModalFadeOut 0.2s ease-out forwards !important; }
.shop-modal-closing #mobile-shop-modal-content { transform: scale(0.9) !important; opacity: 0 !important; }

/* =========================================================================
   МОБІЛЬНА ПЛАШКА-СПОВІЩЕННЯ (TOAST)
   ========================================================================= */
.mobile-toast-island {
    position: fixed;
    top: -100px; /* Ховаємо зверху */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 10, 10, 0.85) !important;
    backdrop-filter: blur(20px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 12px 24px;
    border-radius: 30px;
    z-index: 99999;
    transition: top 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
}

.mobile-toast-island.active {
    top: 20px; /* Виїжджає зверху екрана */
}

.mobile-toast-content {
    display: flex;
    align-items: center;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* =========================================================================
   СТИЛІ ДЛЯ ВІКТОРИНИ (QUIZ)
   ========================================================================= */
/* Кнопка вікторини біля аватара */
.quiz-top-btn {
    position: absolute;
    top: 50%;
    right: -70px; /* Відступ праворуч від аватара */
    transform: translateY(-50%);
    width: 55px;
    height: 55px;
    border-radius: 16px;
    background: rgba(15, 15, 15, 0.6);
    border: 2px solid #555;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.quiz-top-btn.active {
    border-color: #ff66b2; /* Рожева обводка як у десктопі */
    background: rgba(255, 102, 178, 0.1);
    box-shadow: 0 0 15px rgba(255, 102, 178, 0.3);
}

.quiz-top-btn.active:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 25px rgba(255, 102, 178, 0.5);
}

.quiz-top-btn.disabled {
    filter: grayscale(100%);
    opacity: 0.5;
    cursor: not-allowed;
}

/* Кнопки варіантів відповіді */
.mobile-quiz-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 15px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    line-height: 1.4;
}

.mobile-quiz-btn:active:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.96);
}

.mobile-quiz-btn.correct {
    border-color: #4CAF50 !important;
    background: rgba(76, 175, 80, 0.15) !important;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.2) !important;
}

.mobile-quiz-btn.wrong {
    border-color: #ff3333 !important;
    background: rgba(255, 51, 51, 0.15) !important;
    box-shadow: 0 0 15px rgba(255, 51, 51, 0.2) !important;
}

.mobile-quiz-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

/* =========================================================================
   СТИЛІ ДЛЯ ВІКТОРИНИ (QUIZ) - ДЕСКТОПНИЙ ДИЗАЙН
   ========================================================================= */
.quiz-island {
    position: absolute;
    top: 20px; /* Висота по центру аватарки */
    right: 15px; /* Притискаємо до правого краю екрана */
    width: 48px;
    height: 48px;
    background: rgba(15, 15, 15, 0.6) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 2px solid #4CAF50 !important; /* Зелена обводка */
    border-radius: 50% !important; 
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.2) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.quiz-island svg {
    stroke: #ff66b2; /* Рожевий мозок */
    transition: stroke 0.3s ease;
}

/* Ефект натискання для мобілки */
.quiz-island:active:not(.cooldown) {
    background: rgba(255, 255, 255, 0.1) !important;
    transform: scale(0.95) !important; 
    box-shadow: 0 0 25px rgba(76, 175, 80, 0.4) !important;
}

.quiz-island.cooldown {
    border-color: #555555 !important; /* Сіра обводка при кулдауні */
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

.quiz-island.cooldown svg {
    stroke: #888888 !important; /* Сірий мозок */
}

/* =========================================================================
   СТАТУС БАНІВ TRUCKERSMP (МОБІЛЬНА ВЕРСІЯ)
   ========================================================================= */
.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #555;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}

.status-dot.green {
    background: #4CAF50;
    box-shadow: 0 0 10px #4CAF50, inset 0 0 4px #fff;
}

.status-dot.red {
    background: #ff3333;
    box-shadow: 0 0 10px #ff3333, inset 0 0 4px #fff;
    animation: pulse-red-mobile 1.5s infinite;
}

@keyframes pulse-red-mobile {
    0% { box-shadow: 0 0 10px #ff3333; }
    50% { box-shadow: 0 0 20px #ff3333, 0 0 8px #ff3333 inset; }
    100% { box-shadow: 0 0 10px #ff3333; }
}

.news-opening {
    animation: newsFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.news-closing {
    animation: newsFadeOut 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes newsFadeIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes newsFadeOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(20px); }
}

#top-drivers-container {
    padding: 0 0 140px 0; /* Оставляем только нижний отступ, чтобы контент не перекрывался меню */
    width: 100%;
}

/* =========================================================================
   КРАСИВА ОШИБКА 403 (ДОСТУП ЗАБОРОНЕНО)
   ========================================================================= */
#error-info {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: radial-gradient(circle at center, rgba(40, 10, 10, 1) 0%, rgba(8, 8, 8, 1) 100%) !important;
    z-index: 99999 !important;
    box-sizing: border-box;
    animation: fadeInTab 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes glitch {
    0% { transform: translate(0) }
    20% { transform: translate(-2px, 2px) }
    40% { transform: translate(-2px, -2px) }
    60% { transform: translate(2px, 2px) }
    80% { transform: translate(2px, -2px) }
    100% { transform: translate(0) }
}

/* =========================================================================
   ФІКСИ ДЛЯ ВІДКРИТОЇ НОВИНИ
   ========================================================================= */
#mobile-news-desc {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

#news-opened-view .dynamic-island span {
    white-space: nowrap; /* Запобігає переносу тексту в самому Айленді, щоб він не розтягувався вниз */
}