body {
    max-width: 768px !important;
    margin: 0 auto !important;
    min-height: 100vh;
    background-color: #0d2957;
}
html {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: #dddcdc !important;
    z-index: -1 !important;
}

/* Стили для полноэкранной рекламы */
#ad-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: white !important;
    z-index: 10000 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

/* Анимация появления */
#ad-overlay {
    animation: adFadeIn 0.5s ease forwards;
}

@keyframes adFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Защитный слой */
#ad-protection-layer {
    background: rgba(255, 255, 255, 0.01) !important;
    pointer-events: all !important;
    cursor: not-allowed !important;
}

/* Заголовок */
.ad-header {
    flex-shrink: 0 !important;
    z-index: 10002 !important;
}

/* Контент */
.ad-content {
    flex: 1 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 20px !important;
}

/* АДАПТИВНЫЙ ТЕКСТ */
.ad-title {
    font-size: clamp(18px, 5vw, 28px) !important;
    line-height: 1.3 !important;
    margin: 0 0 20px 0 !important;
    text-align: center !important;
    padding: 0 10px !important;
    font-weight: 700 !important;
    color: #2c3e50 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
}

.ad-text {
    font-size: clamp(14px, 3.5vw, 18px) !important;
    line-height: 1.6 !important;
    text-align: left !important;
    padding: 0 10px !important;
    color: #5a6268 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
}

/* Картинка */
.ad-image {
    max-width: 100% !important;
    max-height: min(40vh, 400px) !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
    margin: 0 auto 20px auto !important;
    display: block !important;
}

/* Кнопка закрытия */
#ad-close-btn[style*="color: #ccc"] {
    pointer-events: none !important;
    user-select: none !important;
}

#ad-close-btn[style*="color: #000"] {
    background: #f8f9fa !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
}

#ad-close-btn[style*="color: #000"]:hover {
    background: #e9ecef !important;
    transform: scale(1.1) !important;
}

/* Кнопка действия */
#ad-action-button {
    flex-shrink: 0 !important;
    z-index: 10002 !important;
    transition: background 0.3s ease !important;
    font-size: clamp(16px, 4vw, 18px) !important;
    padding: clamp(15px, 4vw, 20px) !important;
}

#ad-action-button:hover {
    background: #0056b3 !important;
}

/* Блокировка выделения текста */
#ad-overlay * {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

/* АДАПТИВНОСТЬ ДЛЯ ВСЕХ РАЗМЕРОВ ЭКРАНОВ */
@media (max-width: 320px) {
    /* Для очень маленьких экранов */
    .ad-content {
        padding: 15px 10px !important;
    }
    
    .ad-title {
        font-size: 16px !important;
        margin-bottom: 15px !important;
    }
    
    .ad-text {
        font-size: 13px !important;
        line-height: 1.5 !important;
    }
    
    .ad-header {
        padding: 15px 10px !important;
    }
    
    #ad-close-btn {
        font-size: 18px !important;
        width: 25px !important;
        height: 25px !important;
    }
}

@media (min-width: 321px) and (max-width: 480px) {
    /* Мобильные телефоны */
    .ad-content {
        padding: 18px 12px !important;
    }
    
    .ad-title {
        font-size: 18px !important;
        margin-bottom: 18px !important;
    }
    
    .ad-text {
        font-size: 14px !important;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    /* Планшеты и большие телефоны */
    .ad-content {
        padding: 22px 15px !important;
    }
    
    .ad-title {
        font-size: 22px !important;
        margin-bottom: 22px !important;
    }
    
    .ad-text {
        font-size: 16px !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    /* Небольшие ноутбуки */
    .ad-content {
        padding: 25px 20px !important;
        max-width: 600px !important;
        margin: 0 auto !important;
    }
    
    .ad-title {
        font-size: 24px !important;
        margin-bottom: 25px !important;
    }
    
    .ad-text {
        font-size: 17px !important;
    }
}

@media (min-width: 1025px) {
    /* Большие экраны */
    .ad-content {
        padding: 30px !important;
        max-width: 700px !important;
        margin: 0 auto !important;
    }
    
    .ad-title {
        font-size: 28px !important;
        margin-bottom: 30px !important;
    }
    
    .ad-text {
        font-size: 18px !important;
    }
}

/* Особые стили для вертикальной ориентации */
@media (max-height: 600px) {
    /* Низкие экраны */
    .ad-content {
        padding: 15px 10px !important;
    }
    
    .ad-title {
        margin-bottom: 15px !important;
        font-size: clamp(16px, 4vw, 20px) !important;
    }
    
    .ad-text {
        font-size: clamp(13px, 3vw, 15px) !important;
        line-height: 1.5 !important;
    }
    
    .ad-image {
        max-height: 30vh !important;
        margin-bottom: 15px !important;
    }
}

/* Предотвращение zoom на мобильных */
@media (max-width: 768px) {
    #ad-overlay {
        touch-action: none !important;
    }
    
    body.ad-visible {
        touch-action: none !important;
        -webkit-text-size-adjust: none !important;
        text-size-adjust: none !important;
    }
}

/* Поддержка различных соотношений сторон */
@media (max-aspect-ratio: 3/4) {
    /* Высокие узкие экраны */
    .ad-content {
        justify-content: flex-start !important;
    }
    
    .ad-image {
        max-height: 35vh !important;
    }
}

@media (min-aspect-ratio: 16/9) {
    /* Широкие экраны */
    .ad-content {
        justify-content: center !important;
    }
}

/* Автоперенос длинных слов */
.ad-title, .ad-text {
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    hyphens: auto !important;
}

/* Поддержка разных языков */
.ad-text {
    text-align: left !important;
    text-justify: inter-word !important;
}

/* Плавное масштабирование */
.ad-title {
    transition: font-size 0.3s ease !important;
}

.ad-text {
    transition: font-size 0.3s ease !important;
}

/* Простой дисклеймер внизу экрана с кнопкой ОК справа */
.prediction-disclaimer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    padding: 12px 20px;
    z-index: 1000;
    backdrop-filter: blur(4px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.disclaimer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.disclaimer-text {
    flex: 1;
    font-size: 12px;
    line-height: 1.4;
    opacity: 0.9;
    text-align: left; /* Текст по левому краю */
    padding-right: 20px;
}

.disclaimer-ok-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border: none;
    color: white;
    padding: 8px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    min-width: 60px;
}

.disclaimer-ok-btn:hover {
    background: linear-gradient(135deg, #45a049, #4CAF50);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.disclaimer-ok-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Адаптивность */
@media (max-width: 1024px) {
    .disclaimer-content {
        gap: 15px;
        padding: 0 15px;
    }
    
    .disclaimer-text {
        font-size: 11px;
        padding-right: 15px;
    }
    
    .disclaimer-ok-btn {
        padding: 7px 20px;
        font-size: 13px;
        min-width: 55px;
    }
}

@media (max-width: 768px) {
    .prediction-disclaimer {
        padding: 10px 15px;
    }
    
    .disclaimer-content {
        gap: 12px;
        padding: 0 10px;
    }
    
    .disclaimer-text {
        font-size: 10px;
        padding-right: 12px;
        line-height: 1.3;
    }
    
    .disclaimer-ok-btn {
        padding: 6px 18px;
        font-size: 12px;
        min-width: 50px;
        border-radius: 6px;
    }
}

@media (max-width: 480px) {
    .prediction-disclaimer {
        padding: 8px 12px;
    }
    
    .disclaimer-content {
        gap: 10px;
        padding: 0 8px;
    }
    
    .disclaimer-text {
        font-size: 9px;
        padding-right: 10px;
        line-height: 1.2;
    }
    
    .disclaimer-ok-btn {
        padding: 5px 16px;
        font-size: 11px;
        min-width: 45px;
        border-radius: 5px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 360px) {
    .disclaimer-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .disclaimer-text {
        text-align: center;
        padding-right: 0;
        padding-bottom: 5px;
    }
    
    .disclaimer-ok-btn {
        width: 100%;
        max-width: 120px;
    }
}

        .map-not-found {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 24px;
            background: #fff8f0;
            margin: 0 auto;
            text-align: center;
            animation: fadeIn 0.5s ease;
        }
        
        .map-not-found-icon {
            margin-bottom: 16px;
            animation: bounce 2s infinite;
        }
        
        .map-not-found-content h3 {
            color: #ff9800;
            margin: 0 0 8px 0;
            font-size: 1.2em;
        }
        
        .map-not-found-content p {
            color: #5f6368;
            margin: 0 0 16px 0;
            line-height: 1.5;
        }
        
        .report-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 8px 16px;
            background-color: #ff9800;
            color: white;
            border-radius: 24px;
            text-decoration: none;
            font-weight: 500;
            transition: all 0.3s ease;
            gap: 8px;
        }
        
        .report-button:hover {
            background-color: #f57c00;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(255, 152, 0, 0.3);
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        @keyframes bounce {
            0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
            40% { transform: translateY(-10px); }
            60% { transform: translateY(-5px); }
        }

// Добавим в стили для mode-btn.active
.mode-btn.active {
    background: #0d2957;
    color: white;
    border-color: #0d2957;
}

/* Стили для карты маршрута */
.route-map-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Стили для модального окна */
.map-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.map-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-map-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.modal-close-btn:hover {
    color: #ccc;
}

/* Стили для индикаторов загрузки */
.map-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #4a7dff;
    text-align: center;
}

.map-loading svg {
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

.map-not-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #ff9800;
    text-align: center;
}

.map-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #f44336;
    text-align: center;
}

.retry-btn {
    margin-top: 10px;
    padding: 8px 16px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.retry-btn:hover {
    background-color: #d32f2f;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.scrollup {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: url(../other/icon_top.png) no-repeat;
    color: white;
    width: 40px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.3s;
    display: none;
    z-index: 1000;
}

/* Добавляем стили для контейнеров с прокруткой */
#main-view,
#route-detail-view,
#direction-detail-view {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.route-map-container {
    overflow: hidden;
    background: #f5f5f5;
    text-align: center;
}

.route-map-title {
    padding: 10px;
    background: #4a7dff;
    color: white;
    font-weight: bold;
}

.route-map-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.map-loading,
.map-not-found,
.map-error {
    padding: 20px;
    color: #666;
    font-style: italic;
}

.map-error {
    color: #d32f2f;
}

.preview-and-actions-container {
  display: flex;
  flex-direction: column;
  //gap: 10px;
  background: white;
  border-top: 1px solid #eee;
  padding: 15px;
  margin-top: auto; /* Push to bottom */
}


.preview-container {

}

.preview-container h3 {
  color: #2c3e50;
  font-size: 16px;
  margin: 0 0 10px 0;
  text-align: center;
}

#previewContent {
  background: rgba(0,0,0,0.05);
  border-radius: 8px;
  color: #2c3e50;
  min-height: 60px;
  //display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  font-size: 16px;
}

.preview-container h3 {
  margin: 0;
  font-size: 16px;
  color: #2c3e50;
}
.font-settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease-out;
}
.font-settings-card {
  position: relative;
  background: #fff;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.font-settings-modal[style*="display: flex"] .font-settings-card {
  transform: translateY(0);
}
.font-settings-card h2 {
  margin: 0;
  padding: 15px 20px;
  color: #2c3e50;
  font-size: 1.3rem;
  font-weight: 600;
  background: #f8f9fa;
  border-bottom: 1px solid #eee;
}
.settings-menu {
  display: flex;
  width: 100%;
  background: #2c3e50;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 0; /* Убираем промежутки между кнопками */
  border-radius: 0; /* Убираем скругление углов */
}
.settings-menu::-webkit-scrollbar {
  display: none;
}
.settings-menu button {
  flex: 1;
  min-width: 0; /* Позволяет кнопкам сжиматься равномерно */
  padding: 16px 5px; /* Уменьшаем боковые отступы */
  border: none;
  background: none;
  color: rgba(255,255,255,0.7);
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  white-space: nowrap; /* Текст не переносится */
  overflow: hidden;
  text-overflow: ellipsis; /* Добавляем многоточие если текст не помещается */
}
.settings-menu button:hover {
  color: white;
  background: rgba(255,255,255,0.1);
}
.settings-menu button.active {
  color: white;
  background: #3498db;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.2); /* Добавляем тень для активной кнопки */
}
.settings-menu button.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0; /* Растягиваем на всю ширину */
  width: 100%; /* Растягиваем на всю ширину */
  transform: none; /* Убираем transform */
  height: 3px;
  background: white;
}
@media (max-width: 600px) {
  .settings-menu button {
    font-size: 12px; /* Уменьшаем размер шрифта на маленьких экранах */
    padding: 12px 3px; /* Уменьшаем отступы */
  }
}
.settings-content-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f9f9f9;
}
.setting-item {
  background: white;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.setting-item label {
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
  color: #2c3e50;
}
.settings-content-container {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #3498db #f1f1f1;
}
.settings-content-container::-webkit-scrollbar {
  width: 6px;
}
.settings-content-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}
.settings-content-container::-webkit-scrollbar-thumb {
  background: #3498db;
  border-radius: 3px;
}
.settings-category {
  display: none;
  animation: fadeIn 0.3s ease;
}
.settings-category.active {
  display: block;
}
.settings-group {
  margin-bottom: 25px;
}
.settings-group h4 {
  margin: 0 0 15px 0;
  color: #7f8c8d;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.setting-item {
  margin-bottom: 20px;
  padding: 18px;
  background: white;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}
.setting-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.setting-item label {
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.95rem;
}
.setting-item input[type="range"] {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #e0e0e0;
  outline: none;
  -webkit-appearance: none;
  margin: 10px 0;
}
.setting-item input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #3498db;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.setting-item select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: white;
  font-size: 0.95rem;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237f8c8d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}
.setting-item input[type="color"] {
  width: 50px;
  height: 40px;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 2px;
  background: white;
  cursor: pointer;
}
.value-display {
  display: inline-block;
  min-width: 30px;
  text-align: center;
  font-weight: bold;
  color: #3498db;
  font-size: 0.95rem;
  margin-left: 8px;
}
.reset-category-btn {
  width: 100%;
  padding: 12px;
  margin: 25px 0;
  background: #f8f9fa;
  color: #e74c3c;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid #e74c3c;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.reset-category-btn:hover {
  background: #e74c3c;
  color: white;
}
.font-actions {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  background: transparent;
  border-top: none;
}
.reset-category-buttons {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 5px;
}
.reset-category-buttons::-webkit-scrollbar {
  display: none;
}
.font-actions button {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
}
.reset-all-btn {
  flex: 1;
  padding: 14px;
  background: #f8f9fa;
  color: #e74c3c;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid #e74c3c;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.reset-all-btn:hover {
  background: #e74c3c;
  color: white;
}
#closeFontSettingsBtn {
  flex: 1;
  padding: 14px;
  background: #3498db;
  color: white;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid #3498db;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}
#closeFontSettingsBtn:hover {
  background: #2980b9;
  border-color: #2980b9;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.font-settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
  box-sizing: border-box;
}
.font-settings-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.settings-content-container {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 20px;
}
.preview-container + h2 {
  margin-top: 10px !important; 
}
  .font-settings-card h2 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 22px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
  }
.settings-menu {
  display: flex;
  margin-bottom: 0;
  border-bottom: 1px solid #eee;
  gap: 5px;
  background: #f5f5f5;
}
  .settings-menu button {
    padding: 10px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: #7f8c8d;
    //border-radius: 6px;
    transition: all 0.2s ease;
  }
  .settings-menu button:hover {
    background: #f5f5f5;
    color: #34495e;
  }
  .settings-menu button.active {
    background: #3498db;
    color: white;
  }
  .settings-category {
    display: none;
    animation: fadeIn 0.3s ease;
  }
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .settings-category.active {
    display: block;
  }
  .settings-category h3 {
    margin: 15px 0;
    color: #34495e;
    font-size: 16px;
  }
  .setting-item {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
  }
  .setting-item label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
  }
  .setting-item input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
  }
  .setting-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  }
  .setting-item select {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: white;
    font-size: 14px;
  }
  .setting-item input[type="color"] {
    width: 50px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 2px;
    background: white;
  }
  .value-display {
    display: inline-block;
    min-width: 30px;
    text-align: center;
    font-weight: bold;
    color: #3498db;
  }
.font-actions {
  bottom: 0;
  display: flex;
  gap: 10px;
  margin: 25px -25px -25px -25px;
  padding: 15px 25px;
  background: #f5f5f5;
  border-radius: 0 0 12px 12px;
  border-top: 1px solid #ddd;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
  z-index: 100;
}
  .font-actions button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
  }
  .reset-all-btn {
    background: #e74c3c;
    color: white;
  }
  .reset-all-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
  }
  #closeFontSettingsBtn {
    background: #3498db;
    color: white;
  }
  #closeFontSettingsBtn:hover {
    background: #2980b9;
    transform: translateY(-1px);
  }
.reset-category-btn {
  flex: 1;
  min-width: 160px;
  padding: 12px;
  background: #f8f9fa;
  color: #e74c3c;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid #e74c3c;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}
.reset-category-btn:hover {
  background: #e74c3c;
  color: white;
}
.main-action-buttons {
  display: flex;
  gap: 10px;
}
  .settings-group {
    margin-bottom: 25px;
  }
  .settings-group h4 {
    margin: 0 0 10px 0;
    color: #7f8c8d;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
  }
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.modal-overlay[style*="display:flex"] {
  opacity: 1;
  animation: fadeIn 0.3s ease;
}
.modal-content {
  background: white;
  border-radius: 16px;
  width: 80%;
  max-width: 420px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal-overlay[style*="display:flex"] .modal-content {
  transform: translateY(0);
}
.modal-header {
  padding: 24px 24px 16px;
  text-align: center;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.warning-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  animation: pulse 1.5s infinite;
}
.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #D84315;
}
.modal-body {
  padding: 20px 24px;
}
.modal-description {
  color: #616161;
  margin-bottom: 16px;
  text-align: center;
  font-size: 0.95rem;
}
.data-loss-list {
  background: #FFF8E1;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 20px;
}
.data-loss-item {
  display: flex;
  align-items: center;
  padding: 8px 0;
  color: #5D4037;
}
.data-icon {
  width: 18px;
  height: 18px;
  margin-right: 12px;
  fill: #5D4037;
}
.modal-warning {
  display: flex;
  align-items: center;
  background: #FFF3E0;
  border-radius: 8px;
  padding: 12px;
  font-size: 0.9rem;
  color: #E65100;
}
.alert-icon {
  width: 20px;
  height: 20px;
  margin-right: 10px;
  fill: #E65100;
}
.modal-footer {
  display: flex;
  padding: 16px 24px;
  background: #FAFAFA;
  border-top: 1px solid rgba(0,0,0,0.08);
}
.modal-btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.ghost-btn {
  background: transparent;
  color: #757575;
  margin-right: 12px;
}
.ghost-btn:hover {
  background: rgba(0,0,0,0.05);
}
.danger-btn {
  background: #D32F2F;
  color: white;
}
.danger-btn:hover {
  background: #B71C1C;
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}
.btn-icon {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  fill: currentColor;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Убираем синий фон при тапе на мобильных */
button, a {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
div, span, svg {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
button:focus,
a:focus {
  outline: none;
}
[tabindex]:focus {
  outline: none;
}


/* ПАНЕЛЬ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


.NONTBQwM3TTzg1BwETrqFRwrZllRZKnU {
    background-color: #0d2957;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%; /* можно задать фиксированную ширину, например, 1200px */
    height: 60px; /* можно выбрать высоту, которая будет подходить */
}

.NONTBQwM3TTzg1BwETrqFRwrZllRZKnU a {
    display: flex;
    align-items: center;
    color: #0d2957;
    text-align: left;
    text-decoration: none;
}
.NONTBQwM3TTzg1BwETrqFRwrZllRZKnU a:hover {
    background-color: #FFA500;
    color: black;
}
.NONTBQwM3TTzg1BwETrqFRwrZllRZKnU a.active {
    background-color: #0d2957;
    color: white;
}
.NONTBQwM3TTzg1BwETrqFRwrZllRZKnU a {
    margin-left: 0;
}
.ezfYS97CIoeKhfP6fS9WGoJtu3tyvPZx {
    margin: 0;
    display: flex;
    align-items: center;
}
.ezfYS97CIoeKhfP6fS9WGoJtu3tyvPZx a {
    padding-left: 5px; 
    display: flex;
    align-items: center;
}
.xpAW8lLAxAYb97tI1MFRUqfoeYwCZreV {
    width: 2.5em;
    height: 2.5em;
}
.ynBSYph0FEuiY9rrTlFeHjeFRScZpjcx {
    display: flex;
    flex-direction: column;
    color: white;
    font-size: 1.2em;
    font-weight: bold;
    line-height: 1.2em;
    padding-left: 10px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7), -1px -1px 2px rgba(0, 0, 0, 0.7);
    word-wrap: break-word; 
    word-break: break-word; 
    overflow-wrap: break-word; 
}
.saLJgNE0nnkzef97l1Uv3aINyAv7COPO {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7), -2px -2px 4px rgba(0, 0, 0, 0.7);
}
.mvaVZhkq3qTqJ3FihrABaJGnem11lSEo {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7), -2px -2px 4px rgba(0, 0, 0, 0.7);
}
.mvaVZhkq3qTqJ3FihrABaJGnem11lSEo {
    font-size: 1em;
}
.a82L0jYgy8ad06H3gWXAYLUWQff3fATe {
    display: flex;
    align-items: center;
    padding: 0;
}
.a82L0jYgy8ad06H3gWXAYLUWQff3fATe a {
    margin-left: 0;
}
.VrcTsJpZAsYJUduQr8YL0YRlZ0PT5tpW {
    width: 3em;
    height: 3em;
}

/* другое */




    body {
      margin: 0;
      font-family: 'Roboto', sans-serif;
      background-color: #f9f9fb;
    }

    .u4v6z9mc {
      display: flex;
      align-items: center;
      background: #fff;
      border-radius: 16px;
      box-shadow: 0 1px 4px rgba(0,0,0,0.1);
      overflow: hidden;
      margin: 5px;
    }

    .m0c7r1bw {
      background: #4a7dff;
      color: #fff;
      padding: 5px;
      min-width: 75px;
      display: flex;
      flex-direction: column;
      align-items: center;
      border-top-left-radius: 16px;
      border-bottom-left-radius: 16px;
    }

    .g3x2p8fn {
      font-size: 12px;
      margin-bottom: 6px;
    }

    .x1e4v7zk {
      font-size: 24px;
      line-height: 1;
    }

    .c8n3q0ys {
      font-size: 14px;
      margin-top: 6px;
    }

    .v9k2a5md {
      flex: 1;
      padding: 1px 5px;
    }

    .j7t0b6qe {
      font-size: 16px;
      color: #444;
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 3px;
    }

    .e6s3l1pa svg {
      display: block;
    }

    .z2y8w3hx {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
      margin-left: -4px;
      margin-top: -4px;
    }

    .z2y8w3hx .q0m9k5tu {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 24px;
      height: 24px;
      margin-left: 2px;
      flex-shrink: 0;
    }

    .z2y8w3hx .q0m9k5tu svg {
      width: 28px;
      height: 28px;
      display: block;
      vertical-align: middle;
    }

    .b4f6n2dr {
      background: #d2d3d6;
      border-radius: 12px;
      padding: 2px 6px;
      font-size: 12px;
      display: flex;
      align-items: center;
      gap: 4px;
      color: #444;
      flex-shrink: 0;
    }

    .b4f6n2dr svg {
      width: 12px;
      height: 12px;
      display: block;
      vertical-align: middle;
    }

    .f5h8c2oy {
      position: relative;
      display: block;
      width: 18px;
      height: 18px;
    }

    .f5h8c2oy input {
      opacity: 0;
      width: 0;
      height: 0;
    }

    .d7r2x0ev {
      position: absolute;
      top: 0;
      left: 0;
      height: 18px;
      width: 18px;
      background-color: transparent;
      border: 2px solid #888;
      border-radius: 3px;
    }

    .f5h8c2oy input:checked ~ .d7r2x0ev {
      background-color: #4a7dff;
      border-color: #4a7dff;
    }

    .d7r2x0ev:after {
      content: "";
      position: absolute;
      display: none;
    }

    .f5h8c2oy input:checked ~ .d7r2x0ev:after {
      display: block;
    }

    .f5h8c2oy .d7r2x0ev:after {
      left: 5px;
      top: 1px;
      width: 4px;
      height: 8px;
      border: solid white;
      border-width: 0 2px 2px 0;
      transform: rotate(45deg);
    }

/* === images.css === */
.transport-type.bus {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASAgMAAAAroGbEAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAMUExURQAAAACAAP///8DAwFdGW0MAAAABdFJOUwBA5thmAAAANklEQVQI12NgQAaioQ5AMmpVAAMDY2hoCJB8tWoLkFy1aglWEqIGQi4NXQInwSIMAUAII0EAAGCcFKbJihAOAAAAAElFTkSuQmCC");
}

.transport-type.trolleybus {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASAgMAAAAroGbEAAAADFBMVEUAAADAwMD///8Ac6wQQkMlAAAAAXRSTlMAQObYZgAAAEFJREFUeF5lytEJACEMA9BAB3DPm+kmKAVXEFyoAwgxWPDHBN5HCIBMYXPI1gRILUYu+fkv3eO1PtfOON4dqZaVDa25JKCSbwixAAAAAElFTkSuQmCC");
}

.transport-type.tram {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASAgMAAAAroGbEAAAABGdBTUEAALGPC/xhBQAAAAxQTFRFAAAAwMDA////3DEx2CBNDwAAAAF0Uk5TAEDm2GYAAAA9SURBVHjaY2Bg/sMABMw8INL+/wEg+f//ByB5a1UBkHy1agNWEqIGQv7+h2BDTODnB5lmwwxif2AAiYMAAF9bIa2CCufGAAAAAElFTkSuQmCC");
}

.transport-type.train {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASAgMAAAAroGbEAAAABGdBTUEAALGPC/xhBQAAAAxQTFRFAAAAwMDA////MDAwFsRlHAAAAAF0Uk5TAEDm2GYAAAA3SURBVHjaY2BABvb/DwDJX6s+MDAw////B0hmrZoDJFetWoOVhKiBkOv/r4GTYBGGD0AII0EAAOLaIsCN4ck7AAAAAElFTkSuQmCC");
}

.transport-type.minibus {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAABGdBTUEAALGPC/xhBQAAAwBQTFRFAAAA/2YAwMDA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAqe8k/AAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAExJREFUKFOVkEkOADAIAl3+/+ZWpT0YTJNynIBBZJHkB2kJCQRVPXRYIXiuD8jS5G4VBQKJ6BMNtwaUBbJIu0WIg9EVjdtDhNpCw14bWjLT41gGSD0AAAAASUVORK5CYII=");
}

/* === notifications.css === */
:root {
    --good-color: #4CAF50;
    --neutral-color: #9E9E9E;
    --bad-color: #F44336;
    --ad-color: #FFC107;
    --other-color: #2196F3;
    --modal-bg: rgba(0, 0, 0, 0.6);
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --border-radius: 12px;
}

.notification-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--modal-bg);
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
    animation: fadeIn 0.3s ease forwards;
    overflow-y: auto;
}

.notification-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    max-width: 480px;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    animation: slideUp 0.3s ease forwards;
    margin: 0 auto;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.notification-category {
    padding: 12px 20px;
    font-size: 1.0rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
    user-select: none;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.15);
}

.notification-category .left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-category .icon {
    font-size: 1.3rem;
}

.category-good {
    background-color: var(--good-color);
}

.category-neutral {
    background-color: var(--neutral-color);
}

.category-bad {
    background-color: var(--bad-color);
}

.category-ad {
    background-color: var(--ad-color);
    color: #333;
}

.category-other {
    background-color: var(--other-color);
}

.close-btn {
    font-size: 1.8rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: color 0.3s ease;
    user-select: none;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

.close-btn:hover,
.close-btn:focus {
    color: white;
    outline: none;
}

.notification-header {
    padding: 8px 20px 10px 20px;
    margin-top: 0;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #e0f7fa, #e0f2f1);
}

.notification-body {
    padding: 0 20px 20px 20px;
    overflow-y: auto;
    flex-grow: 1;
    min-height: 100px;
    max-height: calc(90vh - 300px);
}

.notification-image {
    width: 100%;
    max-height: 250px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 15px;
    opacity: 0;
    transition: opacity 0.4s ease;
    display: none;
}

.notification-image.visible {
    opacity: 1;
    display: block;
}

.notification-text {
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-y: auto;
}

.action-link-wrapper {
    padding: 10px 20px;
    background: #fff;
}

.action-link {
    background-color: var(--good-color);
    color: white;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 12px 0;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    user-select: none;
    transition: background-color 0.3s ease;
}

.action-link:hover,
.action-link:focus {
    background-color: #3e8e41;
    outline: none;
}

.notification-date {
    background: #f0f0f0;
    padding: 10px 20px;
    font-size: 0.9rem;
    color: #666;
    user-select: none;
    text-align: right;
    border-top: 1px solid #ddd;
    flex-shrink: 0;
}

.notification-footer {
    background: #f9f9f9;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #ddd;
    flex-shrink: 0;
    gap: 10px;
}

.notification-counter {
    font-size: 0.9rem;
    color: #666;
    user-select: none;
    min-width: 40px;
    text-align: left;
}

.notification-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    user-select: none;
    background-color: #e0e0e0;
    color: #333;
    min-width: 80px;
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.action-btn:hover:not(:disabled),
.action-btn:focus:not(:disabled) {
    background-color: #d0d0d0;
    outline: none;
}

/* === progress.css === */
.progress-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 350px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    display: none;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background-color: #4285f4;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
}

.progress-size-info {
    text-align: center;
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.progress-log {
    font-size: 12px;
    color: #555;
    border-top: 1px solid #eee;
    padding-top: 10px;
    margin-top: 10px;
    min-height: 20px;
    max-height: 300px;
    overflow-y: visible; 
}

.progress-log-entry {
    margin-bottom: 5px;
    line-height: 1.4;
    word-break: break-word;
}

.progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}

.progress-log-entry.error {
    color: #d32f2f;
    font-weight: bold;
}

.success-checkmark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.checkmark {
    width: 150px; /* Увеличено с 80px */
    height: 150px; /* Увеличено с 80px */
    border-radius: 50%;
    display: block;
    stroke-width: 4; /* Увеличено с 4 */
    stroke: #21A038;
    stroke-miterlimit: 10;
    margin: 0 auto 15px; /* Увеличено с 15px */
    box-shadow: 0 0 0 rgba(33, 160, 56, 0.1);
    animation: 
        checkmark-fill 0.4s ease-in-out 0.4s forwards, 
        checkmark-scale 0.3s ease-in-out 0.9s both;
}

.checkmark__circle {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    stroke-width: 4; /* Увеличено с 4 */
    stroke-miterlimit: 10;
    stroke: #21A038;
    fill: none;
    animation: checkmark-stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: checkmark-stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

.success-message {
    font-size: 2rem; /* Увеличено с 1.5rem */
    color: #21A038;
    font-weight: bold;
    animation: fadeIn 0.5s ease-in-out;
}

/* Анимации остаются без изменений */
@keyframes checkmark-stroke {
    100% { stroke-dashoffset: 0; }
}

@keyframes checkmark-scale {
    0%, 100% { transform: none; }
    50% { transform: scale3d(1.1, 1.1, 1); }
}

@keyframes checkmark-fill {
    100% { box-shadow: inset 0 0 0 100px rgba(33, 160, 56, 0.1); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}


/* === styles.css === */
.AC_2 {
    position: fixed;
    bottom: 230px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #4285f4;
    color: white;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
}

.bilels {
    position: fixed;
    bottom: 300px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #4285f4;
    color: white;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
}

.refresh-clear-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #4285f4;
    color: white;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
}

.clear-btn {
    position: fixed;
    bottom: 160px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #4285f4;
    color: white;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
}

.settings-btn {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #4285f4;
    color: white;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
}


.refresh-clear-btn svg {
    width: 24px;
    height: 24px;
}

.refresh-clear-btn.loading {
    background-color: #757575;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.stop-row {
    border-bottom: 1px solid var(--divider);
    transition: background-color 0.2s;
}

.stop-row:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.time-row {
    background-color: #f9f9f9;
}

.card-main {
    background-color: #f0f9ff;
    border: 1px solid #0077cc;
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 8px;
    font-weight: bold;
}

.card-sub {
    background-color: #fafafa;
    border-left: 3px solid #cccccc;
    padding: 8px 10px;
    margin-bottom: 8px;
    font-weight: normal;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
}

.schedule-table th {
    text-align: left;
    padding: 8px 12px;
    background-color: var(--primary);
    color: white;
}

.schedule-table td {
    padding: 12px;
    border-bottom: 1px solid var(--divider);
}

:root {
    --primary: #1976D2;
    --primary-dark: #1565C0;
    --text: #212121;
    --text-secondary: #757575;
    --background: #f5f5f5;
    --card: #ffffff;
    --divider: #e0e0e0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--background);
    color: var(--text);
    font-size: 14px;
    line-height: 1.4;
}

#app {
    max-width: 100%;
    min-height: 100vh;
}

.header {
    background-color: var(--primary);
    color: white;
    //padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header h1 {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}

.loading {
    padding: 16px;
    text-align: center;
    color: var(--text-secondary);
}

.error {
    padding: 16px;
    text-align: center;
    color: #D32F2F;
}

.refresh-btn {
    position: fixed;
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border: none;
    z-index: 5;
    cursor: pointer;
}

.clear-cache-btn {
    position: fixed;
    bottom: 80px;
    right: 16px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #f44336;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border: none;
    z-index: 5;
    cursor: pointer;
}

.search-container {
    padding: 8px 12px;
    background-color: var(--card);
    position: sticky;
    top: 48px;
    z-index: 5;
}

.search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--divider);
    border-radius: 20px;
    font-size: 14px;
}

.list {
    padding: 8px 0;
}

.card {
    background-color: var(--card);
    margin: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.card-header {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-weight: bold;
    font-size: 15px;
}

.transport-type {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    text-align: center;
    line-height: 24px;
    margin-right: 8px;
    font-size: 12px;
    font-weight: bold;
}

.transport-type.bus {
    background-color: #4CAF50;
}

.transport-type.trolleybus {
    background-color: #FF9800;
}

.transport-type.tram {
    background-color: #2196F3;
}

.transport-type.train {
    background-color: #9C27B0;
}

.empty-message {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    padding: 12px 0;
}

.detail-view {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--background);
    z-index: 20;
    overflow-y: auto;
}

.detail-view.active {
    display: block;
}

.detail-header {
    position: sticky;
    top: 0;
    background-color: var(--primary);
    color: white;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    z-index: 10;
}

.back-btn {
    font-size: 20px;
    margin-right: 12px;
    cursor: pointer;
}

.detail-title {
    font-size: 18px;
    font-weight: bold;
    flex: 1;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

.schedule-table th {
    background-color: var(--primary);
    color: white;
    padding: 8px 12px;
    text-align: left;
}

.schedule-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--divider);
}

.schedule-table tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

.time-cell {
    display: inline-block;
    background-color: #E3F2FD;
    color: var(--primary);
    padding: 4px 8px;
    border-radius: 4px;
    //margin: 2px;
    font-family: monospace;
    font-size: 14px;
    transition: all 0.3s;
    
}

.day-tabs {
    display: flex;
    gap: 6px;
    margin: 8px 12px;
}

.day-tab {
    flex: 1;
    padding: 8px 0;
    background: #eee;
    color: #444;
    font-weight: 600;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    border: none;
    font-size: 14px;
}

.day-tab.active {
    background: var(--primary);
    color: #fff;
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.transport-type {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: 8px;
    vertical-align: middle;
}

.first-active-time {
    font-weight: 700;
    background-color: #6fb059;
    color: white;
    border-radius: 4px;
    padding: 2px 6px;
    transition: all 0.3s;
}


/* Новые стили для расписания */
.stop-item {
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stop-header {
    padding: 12px 16px;
    background-color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
}

.stop-header:hover {
    background-color: #f5f5f5;
}

.times-container {
    background-color: #f9f9f9;
    padding: 16px;
    width: 100%;
}

.times-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 8px;
    width: 100%;
    justify-items: center;
}

.time-cell {
    padding: 6px 4px;
    text-align: center;
    border-radius: 4px;
    background-color: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    font-size: 14px;
    min-width: 60px;
}

.time-past {
    color: #9e9e9e;
    opacity: 0.8;
}

.time-now {
    background-color: #2196F3;
    color: white;
    font-weight: bold;
}


.time-now {
    //font-weight: 700;
    background-color: #6fb059;
    color: white;
    border-radius: 4px;
    //padding: 3px 8px 3px 8px;
    transition: color 0.5s;
    line-height: 1.5;
    //font-family: 'Roboto', sans-serif;
}

.time-past {
    background-color: #D3D3D3;
    color: #000000;
}

.week-day {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    font-size: 11px;
    font-weight: bold;
    margin: 0 2px;
    transition: all 0.3s ease;
}

.day-work {
    background-color: #4CAF50;
    color: white;
}

.day-weekend {
    background-color: #F44336;
    color: white;
}

.day-current {
    box-shadow: 0 0 0 2px #FFC107;
}

.day-shifted {
    animation: pulse 1.5s infinite;
    position: relative;
}

.day-shifted::after {
    content: '!';
    position: absolute;
    top: -5px;
    right: -5px;
    background: #FF5722;
    color: white;
    width: 12px;
    height: 12px;
    font-size: 10px;
    border-radius: 50%;
    line-height: 12px;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.day-neutral {
    background-color: #e0e0e0;
    color: #616161;
}


.times-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 5px;
    width: 100%;
}

.time-cell {
    text-align: center;
    padding: 6px 2px;
    font-size: clamp(14px, 3vw, 18px); /* Адаптивный размер текста */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 4px;
}

/* Для мобильных устройств */
@media (max-width: 768px) {
    .times-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 4px;
    }
    
    .time-cell {
        padding: 4px 1px;
        font-size: clamp(14px, 3vw, 18px); /* Адаптивный размер текста */
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .times-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    }
    
    .time-cell {
        font-size: clamp(14px, 3vw, 18px); /* Адаптивный размер текста */
    }
}