* {
    box-sizing: border-box;
}

body {
    font-family: 'YS Text', 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    color: #212121;
    background: #f9f9f9;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

h1 {
    text-align: center;
    color: #1d1d1f;
    margin-bottom: 32px;
    font-size: 28px;
    font-weight: 600;
}

h2 {
    color: #1d1d1f;
    margin-top: 32px;
    margin-bottom: 16px;
    font-size: 22px;
    font-weight: 500;
}

h3 {
    color: #4285f4;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 500;
}

.csv-section, .phone-section {
    margin-bottom: 32px;
}

/* Зона загрузки CSV — сдержанный стиль */
.drop-zone {
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background: #fafafa;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: #4285f4;
    background: #f5f8ff;
}

/* Список файлов — минималистичный */
.file-list {
    list-style: none;
    padding: 0;
}

.file-list li {
    background: white;
    margin: 8px 0;
    padding: 12px 16px;
    border-left: 3px solid #e0e0e0;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-list li:hover {
    border-left-color: #4285f4;
}

/* Статус — деликатные цвета */
.status {
    padding: 12px 16px;
    margin: 12px 0;
    border-radius: 6px;
    display: none;
    font-size: 14px;
}

.status.success {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.status.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.status.warning {
    background: #fff8e1;
    color: #f57f17;
    border: 1px solid #ffecb3;
}



/* Стили для текстового поля */
.phone-input {
    width: 100%;
    font-family: inherit;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
    background: white;
}

.phone-input:focus {
    border-color: #4285f4;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

/* Контейнер загрузки файла */
.file-upload-container {
    margin: 16px 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
}

.hidden-file-input {
    display: none;
}

.file-hint {
    font-size: 13px;
    color: #757575;
}

/* Группа кнопок */
.action-buttons {
    display: flex;
    gap: 12px;
    margin: 16px 0;
    flex-wrap: wrap;
}

/* Таблица результатов — минимализм */
.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.results-table th,
.results-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s;
}

.results-table th {
    background-color: transparent;
    font-weight: 600;
    color: #5f5f5f;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.results-table tr:hover {
    background-color: #f8f9fa;
}

/* Секция статистики */
.stats-section {
    background: #f8f9fa;
    padding: 24px;
    border-radius: 8px;
    border-left: 3px solid #4285f4;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.stat-card {
    background: white;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #f0f0f0;
}

.stat-value {
    font-size: 22px;
    font-weight: 600;
    color: #1d1d1f;
    display: block;
}

.stat-label {
    font-size: 13px;
    color: #757575;
    margin-top: 4px;
}

/* Секции статистики и результатов */
.stats-section,
.results-section {
    margin-bottom: 32px;
}

#statsContainer {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Анимация для зоны drag-and-drop — деликатная */
.dragover {
    border-color: #4285f4 !important;
    background-color: #f5f8ff !important;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(66, 133, 244, 0.1);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(66, 133, 244, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(66, 133, 244, 0.1);
    }
}

/* Класс для скрытия элементов */
.hidden {
    display: none !important;
}

/* Состояния загрузки — минималистичные */
.loading::after {
    content: ' Загрузка...';
    margin-left: 8px;
    font-style: italic;
    color: #757575;
}

/* Фокусировка для доступности — ненавязчивая */
.btn:focus {
    outline: 2px solid #4285f4;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.phone-input:focus {
    border-color: #4285f4;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

/* Стили для экспорта результатов */
#resultsContainer {
    overflow-x: auto;
}

.results-table {
    min-width: 600px;
}

/* Сообщения об ошибках валидации — сдержанные */
/* Сообщения об ошибках валидации */
.validation-error {
    color: #c62828;
    font-size: 13px;
    margin: 6px 0;
    display: block;
    padding: 8px 12px;
    background: #ffebee;
    border-radius: 4px;
    border-left: 3px solid #c62828;
}

/* Скрытый класс для ошибок */
.hidden {
    display: none !important;
}

/* Стили для счётчика строк */
.row-count {
    font-size: 12px;
    color: #757575;
    margin-top: 4px;
    text-align: center;
}

/* Индикатор прогресса — в стиле Яндекса */
.progress-container {
    width: 100%;
    background: #f0f0f0;
    border-radius: 8px;
    height: 8px;
    margin: 12px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #4285f4;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 11px;
    white-space: nowrap;
}

/* Адаптивность — для мобильных устройств */
@media (max-width: 768px) {
    .container {
        padding: 16px;
        margin: 8px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 18px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 14px 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .drop-zone {
        padding: 24px 16px;
    }
}

/* Дополнительные микроанимации для плавности интерфейса */
.transition-smooth {
    transition: all 0.2s ease;
}

/* Стили для иконок — монохромные, SVG-формат */
.icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Тонкие разделители */
.divider {
    height: 1px;
    background: #f0f0f0;
    margin: 24px 0;
}
/* Стили для плиток операторов */
.operator-tile {
    background: white;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0;
}

.operator-tile:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
    border-color: #4285f4;
}

.operator-tile.active {
    border-color: #4285f4;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.15);
}

/* Стиль для блока с регионами внутри плитки */
.region-breakdown {
    margin-top: 8px;
    font-size: 12px;
    color: #757575;
    text-align: left;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 10px;
}

.region-breakdown.expanded {
    max-height: 200px;
    padding: 8px 10px;
}

/* Стили для встроенной подсказки */
/* Компактная подсказка со сдержанным дизайном */
.csv-hint-minimal {
    background: rgba(248, 249, 250, 0.8);
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 8px 12px;
    margin-top: 12px;
    font-size: 11px;
    color: #6c757d;
}

.hint-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.hint-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.csv-hint-minimal .hint-title {
    font-weight: 500;
    color: #495057;
    font-size: 12px;
}

.hint-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
}

.hint-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    line-height: 1.3;
}

.hint-label {
    color: #495057;
    font-weight: 500;
    min-width: 90px;
    text-align: right;
    margin-right: 8px;
}

.csv-hint-minimal code {
    background: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 10px;
    border: 1px solid #dee2e6;
}

.hint-footer {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #f1f3f5;
}

.hint-footer p {
    font-style: italic;
    color: #868e96;
    font-size: 10px;
    margin: 0;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .csv-hint-minimal {
        padding: 6px 10px;
        font-size: 10px;
    }
    
    .hint-content {
        gap: 3px;
    }
    
    .hint-label {
        min-width: auto;
        text-align: left;
        margin-right: 4px;
    }
    
    .hint-row {
        flex-direction: column;
    }
    
    .csv-hint-minimal code {
        font-size: 9px;
        padding: 1px 4px;
    }
    
    .hint-footer p {
        font-size: 9px;
    }
}

/* стили для пингации */
.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button:hover:not(:disabled) {
    background: #545b62;
    transform: translateY(-1px);
}

/* Стиль для блока «Описание сервиса» */
/* Компактный режим блока описания */
/* Стиль для блока «Описание сервиса» (обновлённый) */
.features-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    margin: 24px 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.04);
    font-family: 'YS Text', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border: 1px solid #f0f0f0;
}

.features-section h2 {
    color: #212121;
    font-size: 1.4rem;
    margin-top: 0;
    margin-bottom: 24px;
    text-align: center;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

/* Сетка с плитками — уменьшена минимальная ширина и отступы */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); /* Уменьшено с 250px до 140px */
    gap: 10px; /* Уменьшено с 16px до 10px */
    margin-bottom: 18px; /* Немного уменьшено */
}

/* Плитка возможности — уменьшены внутренние отступы и общие размеры */
.feature-tile {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px; /* Уменьшено с 16px до 10px */
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
}

.feature-tile:hover {
    background: #e9ecef;
    transform: translateY(-1px); /* Уменьшено с -2px до -1px */
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08); /* Уменьшены параметры тени */
}

/* Иконка в плитке — значительно уменьшены размеры */
.tile-icon {
    width: 32px; /* Уменьшено с 48px до 32px */
    height: 32px; /* Уменьшено с 48px до 32px */
    margin: 0 auto 8px; /* Уменьшено с 12px до 8px */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Заголовок плитки — размер текста сохранён, уменьшен отступ снизу */
.feature-tile h3 {
    color: #1a1a1a;
    font-size: 1.1rem; /* Оставляем без изменений */
    margin-bottom: 6px; /* Уменьшено с 8px до 6px */
    font-weight: 600;
}

/* Текст описания в плитке — размер текста и межстрочный интервал сохранены */
.feature-tile p {
    color: #4a4a4a;
    font-size: 0.9rem; /* Оставляем без изменений */
    line-height: 1.4; /* Оставляем без изменений */
    margin: 0;
}

/* Кнопка раскрытия — стили сохранены и адаптированы */
.toggle-details-btn {
    background: transparent;
    color: #007cff;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
    margin: 12px auto 0;
    font-weight: 500;
    border-radius: 4px;
}

.toggle-details-btn:hover {
    color: #0056b3;
}

/* Полное описание (скрыто по умолчанию) */
.full-description {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
    animation: fadeIn 0.2s ease;
    font-size: 0.9rem;
}


@keyframes fadeIn {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 400px; }
}

/* Стили для подробного описания */
.details-content h3 {
    color: #212529;
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 1.2rem;
}

.feature-category h4 {
    color: #343a40;
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.1rem;
    font-weight: 600;
}

.feature-category ul {
    padding-left: 16px;
    margin: 4px 0;
}

.examples {
    list-style: none;
    padding-left: 12px;
}

.examples li {
    margin-bottom: 3px;
    font-size: 0.85rem;
}

.summary h4 {
    color: #212529;
    margin-bottom: 6px;
    font-size: 1rem;
}

code {
    background: #e9ecef;
    padding: 1px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

/* Адаптивность — адаптирована под новую структуру */
@media (max-width: 768px) {
    .features-section {
        padding: 16px;
        margin: 16px 0;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 8px; /* Уменьшаем отступы на планшетах */
    }
    
    .feature-tile {
        padding: 8px; /* Уменьшаем отступы внутри плиток */
    }
    
    .tile-icon {
        width: 28px; /* Уменьшаем иконки на планшетах */
        height: 28px;
    }
}

@media (max-width: 480px) {
    .features-section {
        padding: 12px;
        margin: 12px 0;
    }
    
    .full-description {
        padding: 12px;
        font-size: 0.85rem;
    }
    
    .toggle-details-btn {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
}


/* Стиль для неактивной кнопки копировать результаты*/
/* Базовый стиль кнопки (общий для всех кнопок) */
/* Базовый стиль кнопки (общий для всех кнопок) */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    background: #f0f0f0;
    color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Стиль при наведении */
.btn:hover:not(:disabled) {
    background: #e0e0e0;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

/* Стиль активной кнопки (при нажатии) */
.btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Убираем стандартное выделение браузера */
.btn:focus {
    outline: none;
}

/* Альтернативный стиль для важных кнопок (например, копирования) */
.btn.primary {
    background: #4285f4;
    color: white;
}

.btn.primary:hover:not(:disabled) {
    background: #3367d6;
}

.btn.primary:active:not(:disabled) {
    background: #285abc;
}

/* Стиль для неактивной кнопки */
.btn.disabled,
.btn[disabled] {
    background: #f2f4f5;
    color: #adb5bd;
    cursor: not-allowed;
    transform: none !important;
    opacity: 0.7;
    pointer-events: none;
    box-shadow: none;
}

.btn.disabled .icon,
.btn[disabled] .icon {
    filter: brightness(0.5);
}

/* Сообщение обратной связи (появляется при успешном копировании) */
.feedback-message {
    position: absolute;
    bottom: -28px; /* Располагаем под кнопкой */
    left: 50%;
    transform: translateX(-50%);
    background: #333; /* Тёмный фон */
    color: white; /* Белый текст */
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 10;
    animation: fadeOut 2s forwards 0.5s; /* Плавное исчезновение */
}

/* Анимация для сообщения обратной связи */
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}


/* Стили для группы кнопок */
.action-buttons {
    display: flex;
    gap: 12px;
    margin: 16px 0;
    flex-wrap: wrap;
}

/* Адаптивность для кнопок */
@media (max-width: 768px) {
    .btn {
        font-size: 0.85rem;
        padding: 8px 14px;
        gap: 6px;
    }
    
    .icon {
        width: 16px;
        height: 16px;
    }
    
    .feedback-message {
        font-size: 0.75rem;
        padding: 5px 10px;
    }
}

@media (max-width: 480px) {
    .btn {
        font-size: 0.8rem;
        padding: 7px 12px;
        gap: 5px;
    }
    
    .icon {
        width: 14px;
        height: 14px;
    }
}


/* цвета операторов связи */
.operator-tile {
    background-color: var(--operator-color) !important;
}
.operator-билайн { background-color: #ff6b00; }
.operator-мегафон { background-color: #e20613; }
.operator-мтс { background-color: #009ee0; }
.operator-теле2 { background-color: #8f2098; }
/* Остальные операторы */



/* слайдер что умеет сервис */
.toggle-checkbox {
  /* Скрываем чекбокс */
}

.features-toggle {
  display: block;
  cursor: pointer;
  width: 100%;
  text-align: left;
  padding: 0;
  margin: 0;
}

.features-toggle h2 {
  margin: 0;
  font-size: 1.3rem;
  color: #737373;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s ease;
}

.features-toggle h2::after {
  content: "▸"; /* Стрелка вниз */
  font-size: 1.2em;
  transition: transform 0.3s ease;
}

/* Состояние при раскрытом блоке */
#features-toggle:checked ~ .features-toggle h2 {
  color: #007bff;
}

#features-toggle:checked ~ .features-toggle h2::after {
  transform: rotate(180deg); /* Стрелка вверх */
}

/* Показываем/скрываем контент */
.features-grid {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

#features-toggle:checked ~ .features-grid {
  display: grid;
}

.feature-tile {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.tile-icon {
  margin-bottom: 15px;
}

.feature-tile h3 {
  margin: 15px 0 10px;
  color: #333;
}

.feature-tile p {
  margin: 0;
  color: #666;
  line-height: 1.4;
}

code {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: monospace;
}

/* основной текст страницы */
.text-dark {
  color: #4a4a4a; /* Тёмно‑серый */
  font-size: 0.8rem;
  line-height: 1.7; /* Чуть больше для длинных текстов */
  font-family: 'YS Text', 'Segoe UI', Arial, sans-serif;
  word-spacing: 0.1em; /* Минимальный интервал между словами */
}
