* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background: #ffffff;
    color: #333;
}

/*@media (max-width: 600px) {
    .market {
        display: none;
    }
}*/

.market {
    border-top: 2px solid #f0f0f0;
    margin-top: 5px;
    padding-top: 5px;
    justify-content: center; /* Центрирует по горизонтали */
    text-align: center;
}
/* Кнопка в правом верхнем углу (фиксированная) */
.download-android {
    top: 20px;
    right: 20px;
    background: #3DDC84;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 20px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    z-index: 1000;
    font-family: inherit;
    margin: 0 auto;
}

.download-android i {
    font-size: 1.3rem;
}

.download-android:hover {
    background: #2cb070;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.download-android:active {
    transform: translateY(1px);
}

/* Остальные стили */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    background: rgb(245 245 245);
    padding: 30px 20px 50px 20px;
    border-radius: 0;
    box-shadow: none;
}


.search-box {
    width: 100%;
    max-width: 500px;
    background-color: #ffffff; 
    border-radius: 12px;       /* Закругление */
    border: 1px solid #ccc; /* Тонкая светло-серая рамка */
    padding: 20px;             /* Внутренние отступы */
    margin: 0 auto;
    margin-bottom: 20px;
}


@media (max-width: 600px) {
    .container {
        padding: 20px 15px 40px 15px;
    }
    .download-android {
        padding: 8px 16px;
        font-size: 0.85rem;
        top: 10px;
        right: 40px;
    }
}

/* По умолчанию блок виден (для десктопов) */
    .desktop-only {
    display: inline-block; /* или inline-flex, зависит от стилей */
}

/* На мобильных устройствах (ширина ≤ 768px) – скрываем */
/*@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }
}*/
a {
    color: #e60023;
    text-decoration: none;
}

h1 {
    color: #000000;
    margin-bottom: 5px;
    font-size: 28px;
    text-align: center;
    margin-top: 10px;
    /* Новые свойства для ограничения ширины и центрирования */
    max-width: 500px; 
    margin-left: auto;
    margin-right: auto;
}

p.subtitle {
    color: #767676;
    margin-bottom: 25px;
    text-align: center;
}

#search-form {
    transition: all 0.3s ease;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    margin: 10px 0;
    border: 2px solid #cdcdcd;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
}

input[type="text"]:focus {
    border-color: #e60023;
}

input[type="submit"] {
    width: 100%;
    padding: 12px;
    background: #e60023;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.2s;
}

input[type="submit"]:hover {
    background: #b6001a;
}

.result {
    margin-top: 30px;
    padding: 20px;
    border-top: 2px solid #f0f0f0;
    text-align: center;
}

.preview-video {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 15px auto;
    display: block;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    background: #000;
    max-height: 600px;
    object-fit: contain;
}

.download-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 35px;
    background: #008767;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: bold;
    font-size: 18px;
    transition: background 0.2s;
}

.download-btn:hover {
    background: #005f48;
}

.error {
    color: #e60023;
    font-weight: bold;
    margin-top: 20px;
}

#loader {
    display: none;
    margin: 30px auto;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #e60023;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

.loader-text {
    color: #767676;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.instructions {
    margin-top: 5px;
    padding-top: 0px;
    text-align: center;
}

.instructions h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
}

.steps-gallery {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

.step-img {
    width: calc(25% - 15px);
    min-width: 110px;
    max-width: 280px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    background: #eaeaea;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step-img:hover {
    transform: scale(1.3) translateY(-3px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    z-index: 10;
    position: relative;
}

@media (max-width: 600px) {
    .steps-gallery {
        gap: 12px;
    }
    .step-img {
        width: calc(50% - 12px);
    }
    .preview-video {
        max-height: 300px;
    }
}

@media (max-width: 380px) {
    .step-img {
        width: 100%;
        max-width: 240px;
    }
}

@media (min-width: 1600px) {
    .container {
        max-width: 1600px;
    }
}

.instructions p, .container > p {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
/* По умолчанию на ПК показываем весь текст, скрываем кнопку */
.spoiler-trigger, .spoiler-button {
    display: none;
}

/* Стили для мобильных устройств (экраны до 768px) */
@media (max-width: 768px) {
    .spoiler-trigger {
        display: none; /* Прячем сам чекбокс */
    }
    
    .spoiler-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out; /* Плавное открытие */
    }

    /* Кнопка "Подробнее" */
    .spoiler-button {
        display: block;
        width: fit-content;
        margin: 15px auto 0;
        color: #ef1d25; /* Фирменный красный цвет Pinterest/Pinsave, можете изменить */
        font-weight: bold;
        cursor: pointer;
        text-align: center;
        text-decoration: none;
    }

    /* Текст кнопки до нажатия */
    .spoiler-button::before {
        content: "О приложении";
    }

    /* Магия CSS: когда чекбокс нажат, раскрываем блок и меняем текст кнопки */
    .spoiler-trigger:checked ~ .spoiler-content {
        max-height: 1000px; /* Достаточная высота для всего текста */
    }

    .spoiler-trigger:checked ~ .spoiler-button::before {
        content: "Свернуть";
    }
}

@media (min-width: 1600px) {
    .head-bar {
        display: none;
    }
}

.head-bar {
    position: fixed; 
    top: 0px;        
    left: 0px;       
    width: 100%;
    height: 40px;
    z-index: 9999;   
    background-color: #33333344; /* Задает белый цвет фона */
}

@media (min-width: 1600px) {
    .bottom-bar {
        display: none;
    }
}

.bottom-bar {
    position: fixed; 
    bottom: 0px;     /* Прижимает блок к самому низу экрана */
    left: 0px;       
    width: 100%;
    height: 40px;
    z-index: 9998;   
    background-color: #33333344; /* Задает цвет фона */
}

.footer {
    position: relative; 
    justify-content: center; /* Центрирует по горизонтали */
    text-align: center;
    padding: 5px;
    margin-top: 10px;
    left: 0px;       
    width: 100%;
    height: 160px;
    color: #333;
    z-index: 9997;   
    background-color: #e0e0e0; /* Задает цвет фона */
}

.footer a {
    color: #af0808;
    text-decoration: none;
}


/* Принудительно поднимаем блок uSocial и все вложенные элементы */
div[class*="uSocial"], 
div[class*="uSocial"] * {
    bottom: 50px !important; 
    top: auto !important;
}

/* Убираем стандартную стрелочку браузера */
summary {
    list-style: none;
    cursor: pointer; /* Делает курсор ладошкой при наведении */
}
summary::-webkit-details-marker {
    display: none; /* Для старых браузеров Safari/Chrome */
}

/* Делаем заголовок инлайновым, чтобы он не переносился */
summary h2 {
    display: inline-block;
    margin: 0;
}

.section {
            margin-bottom: 1.5rem;
        }

.date {
            font-style: italic;
            color: #555;
            margin-bottom: 1.5rem;
        }
        .contacts {
            margin-top: 2rem;
            padding-top: 1rem;
            border-top: 1px solid #ccc;
        }        

        h2 {
            font-size: 1.4rem;
            margin-top: 1rem;
            color: #2c3e50;
        }
        h3 {
            font-size: 1.1rem;
            margin-top: 1.2rem;
            font-weight: 600;
        }
        p, li {
            margin: 0.5rem 0;
        }
        ul, ol {
            padding-left: 1.5rem;
        }

#loader { display: none; text-align: center; margin: 30px 0; }
       .spinner {
            width: 50px;
            height: 50px;
            border: 5px solid #f3f3f3;
            border-top: 5px solid #3498db;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin: 0 auto 15px;
        }
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        .loader-text { font-size: 16px; color: #555; }
        .search-box.loading { opacity: 0.5; pointer-events: none; }

        /* Дополнительные стили для крестика и рекламного баннера */
        
            .search-box { position: relative; }
            .search-box .input-wrap { position: relative; flex: 1; display: flex; align-items: center; }
            .search-box input[type="text"] { flex: 1; padding-right: 40px; }
            .clear-btn {
                position: absolute;
                right: 10px;
                top: 50%;
                transform: translateY(-50%);
                font-size: 22px;
                color: #aaa;
                cursor: pointer;
                user-select: none;
                line-height: 1;
                z-index: 2;
                display: none;
            }
            .clear-btn:hover { color: #e94560; }
            /* Рекламный баннер сверху */
            #ad-banner {
                position: fixed;
                top: 0;
                left: 0;
                right: 0;
                background: #fff;
                box-shadow: 0 2px 10px rgba(0,0,0,0.3);
                z-index: 9998;
                transform: translateY(-100%);
                transition: transform 0.5s ease;
                display: flex;
                justify-content: center;
                align-items: center;
                padding: 10px;
                padding-top: 40px;
                border-bottom: 1px solid #ddd;
            }
            #ad-banner.show {
                transform: translateY(0);
            }
            #ad-banner .ad-close {
                position: absolute;
                right: 20px;
                top: 50%;
                transform: translateY(-50%);
                font-size: 28px;
                cursor: pointer;
                color: #888;
                line-height: 1;
            }
            #ad-banner .ad-close:hover {
                color: #e94560;
            }
            #ad-banner img {
                max-width: 100%;
                height: auto;
                max-height: 90px;
            }
    /* Если сайт открыт внутри фрейма VK Mini Apps, скрываем блоки */
@media screen {
  :root:has(iframe) #ad-banner,
  :root:has(iframe) .market {
    display: none !important;
  }
}
