body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
    color: #343a40;
}

.modal-hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
}

.modal-visible {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

#confirmation-modal, #lightbox {
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.thumbnail-item {
    width: 64px;
    height: 64px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 2px;
    flex-shrink: 0;
    position: relative;
}

/* Стили для миниатюр внутри камеры */
#camera-thumbnail-bar .thumbnail-item {
    border-color: #9ca3af; /* border-gray-400 */
    opacity: 0.7;
}

#camera-thumbnail-bar .thumbnail-item.active {
    border-color: #3b82f6; /* border-blue-500 */
    opacity: 1;
}

#lightbox {
    cursor: pointer;
}

#lightbox img {
    cursor: default;
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.nav-link {
    position: relative;
    transition: color 0.3s;
}

.nav-link.active {
    color: #007bff;
}

.nav-link.active::after, .nav-link:hover::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #007bff;
}

.clickable-section, .feature-card, .role-card, .integration-card, .future-card {
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.clickable-section:hover, .feature-card:hover, .role-card:hover, .integration-card:hover, .future-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.pricing-card {
    transition: transform 0.3s, box-shadow 0.3s;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.section-title {
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: #007bff;
}

.section-title.inline-block::after {
    left: 0;
    transform: translateX(0);
}

.chart-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    height: 500px;
    max-height: 60vh;
}

.detail-page ul, .pricing-card ul {
    list-style-position: inside;
    padding-left: 0.5rem;
}

.detail-page ul li, .pricing-card ul li {
    margin-bottom: 0.75rem;
    padding-left: 1rem;
    position: relative;
}

.detail-page ul li::before, .pricing-card ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

.detail-page .highlight {
    background-color: #e7f1ff;
    color: #0056b3;
    font-weight: 600;
    border-radius: 4px;
    padding: 2px 6px;
}

.detail-page .value-prop {
    background-color: #fffbe6;
    border-left: 4px solid #ffc107;
    padding: 1rem;
    margin-top: 1.5rem;
    border-radius: 4px;
}

.comparison-item {
    border-left: 4px solid #007bff;
}

.comparison-item .problem {
    border-left: 3px solid #dc3545;
}

.comparison-item .solution {
    border-left: 3px solid #28a745;
}

.hotspot {
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
    pointer-events: auto; /* Убедимся, что клики проходят */
}

.hotspot[occluded] {
    opacity: 0.25;
    background-color: #6b7280; /* gray-500 */
    border-color: rgba(209, 213, 219, 0.5); /* gray-300 */
    transition: opacity 0.3s;
}

@media (max-width: 768px) {
    .chart-container {
        height: 400px;
        max-height: 70vh;
    }
}

/* --- Стили для слайдера-карусели --- */
#feature-slider {
    display: flex;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#feature-slider::-webkit-scrollbar {
    display: none;
}

.feature-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    padding: 0 1rem;
    box-sizing: border-box;
}

/* --- СТИЛИ ДЛЯ ГАЛЕРЕИ --- */
.hotspot.saved {
    background-color: #dc2626; /* red-600 */
    border: 2px solid rgba(255, 255, 255, 0.8);
}

/* Это правило будет применяться только к сохраненным (красным) меткам,
   когда они перекрыты моделью */
.hotspot.saved[occluded] {
    background-color: #6b7280; /* Становится серым, как и временные */
    opacity: 0.30;             /* И более прозрачным */
}

.gallery-container {
    width: 100%;
    padding: 8px;
    background-color: #f3f4f6; /* gray-100 */
    border-radius: 12px;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.gallery-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937; /* gray-800 */
}

.gallery-close-btn {
    font-size: 24px;
    line-height: 1;
    color: #6b7280; /* gray-500 */
    background: none;
    border: none;
    cursor: pointer;
}

.gallery-thumbnails {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 12px;
}

.gallery-thumbnail-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background-color: #e5e7eb; /* gray-200 */
    border: 2px dashed #d1d5db; /* gray-300 */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-thumbnail-wrapper:not(.empty) {
     border-style: solid;
     border-color: #9ca3af; /* gray-400 */
}

.gallery-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.gallery-add-btn {
    width: 100%;
    background-color: #4b5563; /* gray-600 */
    color: white;
    font-weight: 600;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.gallery-add-btn:hover {
    background-color: #374151; /* gray-700 */
}

/* НОВЫЕ СТИЛИ ДЛЯ КНОПКИ УДАЛЕНИЯ */
.gallery-actions {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gallery-delete-hotspot-btn {
    width: 100%;
    background-color: transparent;
    color: #ef4444; /* red-500 */
    font-weight: 600;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ef4444;
    transition: all 0.2s;
}

.gallery-delete-hotspot-btn:hover {
    background-color: #fef2f2; /* red-50 */
}

/* --- СТИЛИ ДЛЯ LIGHTBOX --- */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 20px;
}

#lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-controls {
    flex-shrink: 0;
    padding: 20px;
    display: flex;
    gap: 16px;
}

.lightbox-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.lightbox-btn:active {
    transform: scale(0.95);
}

.lightbox-btn.delete {
    background-color: #ef4444; /* red-500 */
    color: white;
}

.lightbox-btn.close {
    background-color: #6b7280; /* gray-500 */
    color: white;
}

/* --- СТИЛИ ДЛЯ МОДАЛЬНОГО ОКНА ПОДТВЕРЖДЕНИЯ --- */
.confirm-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex; align-items: center; justify-content: center;
    z-index: 2000; opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}

.confirm-overlay.visible { opacity: 1; pointer-events: auto; }

.confirm-dialog {
    background: white; border-radius: 12px; padding: 24px;
    max-width: 320px; text-align: center; box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transform: scale(0.95); transition: transform 0.2s ease;
}

.confirm-overlay.visible .confirm-dialog { transform: scale(1); }

.confirm-text { font-size: 16px; color: #374151; margin-bottom: 20px; }

.confirm-buttons { display: flex; gap: 12px; }

.confirm-btn {
    flex-grow: 1; padding: 10px; border-radius: 8px; font-weight: 600;
    border: none; cursor: pointer; transition: all 0.2s;
}

.confirm-btn.yes { background-color: #dc2626; color: white; }

.confirm-btn.no { background-color: #e5e7eb; color: #374151; }

/* Стили для миниатюр внутри камеры */
#camera-thumbnail-bar .thumbnail-item {
    width: 56px;
    height: 56px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    padding: 2px;
    flex-shrink: 0;
    position: relative;
    background-color: rgba(0,0,0,0.2);
}

#camera-thumbnail-bar .thumbnail-item.active {
    border-color: #3b82f6; /* Синий цвет для активной/текущей миниатюры */
}

#camera-thumbnail-bar .thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}
/* Стили для миниатюр внутри камеры */
#camera-thumbnail-bar .thumbnail-item {
    width: 56px;
    height: 56px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    padding: 2px;
    flex-shrink: 0;
    position: relative;
    background-color: rgba(0,0,0,0.2);
}

#camera-thumbnail-bar .thumbnail-item.active {
    border-color: #3b82f6; /* Синий цвет для активной/текущей миниатюры */
}

#camera-thumbnail-bar .thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* =========================================================
    НОВЫЙ, УПРОЩЕННЫЙ БЛОК СТИЛЕЙ ДЛЯ ЛАЙТБОКСА
   ========================================================= */

/* 1. Основной контейнер-оверлей */
.lightbox-overlay {
    display: none; /* Скрыт по умолчанию */
    position: fixed; /* На весь экран */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    padding: 10px;
    box-sizing: border-box;

    /* Используем Flexbox для центрирования */
    display: flex;
    flex-direction: column; /* Располагаем элементы (картинка, кнопки) в столбец */
    align-items: center;
    justify-content: center;
}

/* Класс .visible, который добавляет JS для показа лайтбокса */
.lightbox-overlay.visible {
    display: flex;
}

/* 2. Контейнер для самого изображения */
.lightbox-content {
    max-width: 90%;
    max-height: 80%; /* Ограничиваем, чтобы осталось место для кнопок */
}

.lightbox-content img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Вписывает фото, сохраняя пропорции */
    border-radius: 4px;
}

/* 3. Нижняя панель с кнопками "Удалить" и "Закрыть" */
.lightbox-controls {
    display: flex; /* Располагаем кнопки в ряд */
    gap: 15px; /* Расстояние между кнопками */
    margin-top: 15px; /* Отступ от картинки */
}

.lightbox-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.lightbox-btn.delete {
    background-color: #ef4444; /* Красный */
    color: white;
}
.lightbox-btn.delete:hover {
    background-color: #dc2626;
}

.lightbox-btn.close {
    background-color: #6b7280; /* Серый */
    color: white;
}
.lightbox-btn.close:hover {
    background-color: #4b5563;
}

/* 4. Кнопки навигации "Влево" и "Вправо" */
.lightbox-nav {
    position: absolute; /* Позиционируем относительно всего экрана */
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001; /* Поверх всего */
    
    background-color: rgba(30, 30, 30, 0.5);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 24px;
    cursor: pointer;
    
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.lightbox-nav:hover {
    background-color: rgba(0, 0, 0, 0.75);
}

.lightbox-nav.prev {
    left: 15px;
}

.lightbox-nav.next {
    right: 15px;
}
/* ========================================
    Анимация для свайпа
   ======================================== */

/* Плавный возврат фото на место после свайпа */
.lightbox-content img {
    transition: transform 0.2s ease-out;
}

@keyframes bounce-right {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-20px); }
}

@keyframes bounce-left {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(20px); }
}

.lightbox-content.bounce-right {
  animation: bounce-right 0.3s ease-in-out;
}

.lightbox-content.bounce-left {
  animation: bounce-left 0.3s ease-in-out;
}
