/* Общий стиль страницы */
body {
    font-family: 'Rubik', sans-serif;
    background: #1c1c1e;
    color: #fff;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

body, html {
    overflow-x: hidden;
}
/* Контейнер */
.container {
    padding: 1.5rem;
    max-width: 1200px; /* больше, если нужно */
    margin: auto;
    overflow-x: hidden; /* ⛔ предотвращает горизонтальный скролл */
    padding-top: 3rem;
}

/* Шапка */
.modern-header {
    position: relative;
    background: linear-gradient(135deg, #0f0f10, #1c1c1e);
    padding: 1rem 1.5rem 3.5rem; /* extra bottom for overlap */
    border-bottom: 1px solid #222;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    height: 36px;
    width: 36px;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(to bottom, white 43%, #0066cc 13%, #0066cc 13%, #e60000 66%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    padding-left: 8px;
}

.logo-text .dot {
    font-weight: normal;
}

.nav-buttons {
    display: flex;
    gap: 0.75rem;
}

.nav-button {
    background: #222;
    color: #66aaff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-weight: 500;
    transition: background 0.2s;
}

.nav-button:hover {
    background: #333;
}

/* Обёртка кнопки с выпадающим меню */
.nav-button.dropdown {
    position: relative;
}

/* Кнопка-триггер */
.dropdown-toggle {
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
    padding: 0.6rem 1rem;
}

/* Меню — скрыто по умолчанию */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #1f1f21;
    border: 1px solid #333;
    border-radius: 0.5rem;
    padding: 0.5rem 0;
    display: none;
    flex-direction: column;
    min-width: 160px;
    z-index: 10;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
}

/* Пункты меню */
.dropdown-menu a {
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-menu a:hover {
    background: #2b2b2e;
}

/* Показываем меню при наведении */
.nav-button.dropdown:hover .dropdown-menu,
.nav-button.dropdown:focus-within .dropdown-menu {
    display: flex;
}

/* Унифицируем кнопки в хедере */
.nav-buttons a,
.nav-buttons button {
    background: none;
    border: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.nav-buttons a:hover,
.nav-buttons button:hover {
    background: #2b2b2e;
}

/* Широкий поиск, вылезает из шапки */
.search-bar-wide {
    position: absolute;
    bottom: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;

    display: flex;
    background: white;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.search-bar-wide input[type="text"] {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    font-size: 1rem;
    outline: none;
}

.search-bar-wide button {
    background: #6e36ff;
    color: white;
    border: none;
    padding: 0 1.2rem;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-bar-wide button:hover {
    background: #5930d4;
}

/* Адаптив */
@media (max-width: 600px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .search-bar-wide {
        width: 95%;
    }

    .nav-buttons {
        width: 100%;
        justify-content: space-between;
    }
}

/* Категории */
.app-promo {
    position: relative;
    padding: 4rem 1rem;
    background: linear-gradient(to top, #0f0f10, transparent);
    text-align: center;
    overflow: hidden;
}

.app-promo h2 {
    font-size: 2rem;
    color: white;
    margin-bottom: 2rem;
}

.chip-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.chip-interactive {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    background: #222;
    border-radius: 22px;
    color: white;
    font-weight: 500;
    min-width: 100px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.chip-interactive.active {
    background: #2a2a2d;
    transform: scale(1.05);
    z-index: 1;
}

.chip-interactive:hover {
    box-shadow: 0 2px 10px rgba(255,255,255,0.1);
    transform: scale(1.05);
}

.chip-interactive:not(.active) .cta-popup {
    display: none;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.9);
}
.chip-interactive.active .cta-popup {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}


.chip-interactive.active .cta-popup {
    opacity: 1;
    max-height: 200px;
}



.cta-text {
    font-size: 0.85rem;
    color: #ddd;
    line-height: 1.3;
    padding-bottom: 15px;
}

.cta-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.cta-buttons a {
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: bold;
}

.cta-buttons .google {
    background: #3bcc5f;
    color: #fff;
}

.cta-buttons .apple {
    background: #007aff;
    color: #fff;
}

.store-buttons-mobile {
    display: none;
    margin-top: 2rem;
}

.store-buttons-mobile a {
    background: #444;
    color: white;
    padding: 0.75rem 1.25rem;
    margin: 0 0.5rem;
    border-radius: 999px;
    text-decoration: none;
    display: inline-block;
    font-weight: bold;
}

.chip-emoji {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.3rem;
}

.chip-title {
    font-size: 0.9rem;
    white-space: nowrap;
}

.chip-cta {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
    text-align: center;
}

@media (hover: none) and (pointer: coarse) {
    .cta-popup {
        top: 10%;
        left: 5%;
        right: 5%;
        width: auto;
        max-width: none;
        display: none;
        font-size: 1rem;
    }

    .chip-interactive.active .cta-popup {
        display: block;
    }

    .store-buttons-mobile {
        display: flex;
        justify-content: center;
        gap: 1rem;
    }
}