/* --- Шрифты --- */
@font-face {
    font-family: 'Gilroy';
    src: url('fonts/Gilroy-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Gilroy';
    src: url('fonts/Gilroy-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Gilroy';
    src: url('fonts/Gilroy-MediumItalic.woff2') format('woff2');
    font-weight: 500;
    font-style: italic;
}

@font-face {
    font-family: 'Gilroy';
    src: url('fonts/Gilroy-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

:root {
    --bg-color: #1c1f2e;
    --card-bg: #25283a;
    --primary-color: #6c5ce7;
    --text-main: #ffffff;
    --text-secondary: #a2a5b9;
    --accent-gradient: linear-gradient(90deg, #7f6aff 0%, #a36aff 100%);

    /* Цвета для шкал */
    --green-solid: #00cec9;
    --blue-solid: #0984e3;
    /* Тепловая карта для набора участников */
    --heat-gradient: linear-gradient(90deg, #ff4757 0%, #ffa502 50%, #2ecc71 100%);

    --progress-bg: #35394f;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* --- ИСПРАВЛЕНИЕ ПРЫГАЮЩЕГО МЕНЮ --- */
html {
    scroll-behavior: smooth;
    overflow-y: scroll;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Gilroy', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    font-size: 16px;
    padding-bottom: 90px;
}

/* --- ПРИНУДИТЕЛЬНЫЙ GILROY ДЛЯ КНОПОК И ФОРМ --- */
button,
input,
textarea,
select {
    font-family: 'Gilroy', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
}

h1,
h2,
h3,
p {
    margin: 0;
}

/* --- Header --- */
.header {
    width: 100%;
    left: 0;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header.scrolled {
    background: rgba(28, 31, 46, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.user-name {
    font-weight: 700;
    font-size: 18px;
    transition: all 0.3s ease;
}

/* --- Search --- */
.search-bar {
    display: flex;
    gap: 10px;
    width: 100%;
}

.search-field {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 0 14px;
}

.search-icon {
    width: 22px;
    height: 22px;
    opacity: 0.5;
    margin-right: 10px;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 14px 0;
    color: white;
    font-family: 'Gilroy';
    font-size: 16px;
    outline: none;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.filter-btn {
    background: var(--card-bg);
    border: none;
    border-radius: 12px;
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* --- Sections --- */
.section {
    padding: 16px;
    margin-bottom: 8px;
}

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

.section-title {
    font-size: 20px;
    font-weight: 700;
}

.link-all {
    color: #5c87ff;
    font-size: 14px;
    font-weight: 500;
}

/* --- Categories --- */
.categories-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.category-card {
    background: var(--card-bg);
    padding: 14px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    color: #8e92a8;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.4);
    color: white;
}

/* --- Banner --- */
#banner-container {
    margin-top: 25px;
    /* Чтобы роботы не перекрывали контент сверху */
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.banner {
    margin: 0 16px;
    background: linear-gradient(135deg, #3b3e5b 0%, #1e1f2a 100%);
    border-radius: 16px;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: visible;
    height: 76px;
    /* Жестко фиксированная высота (вместо min-height) */
    box-sizing: border-box;
    /* Чтобы высота 76px включала padding */
    cursor: pointer;
}

.banner-content {
    z-index: 2;
    flex: 1;
    /* Занимает все свободное место */
    padding-right: 15px;
    /* Отступ от робота */
    max-width: calc(100% - 90px);
    /* Учитываем ширину робота, чтобы текст не залезал под него */
}

.banner-title {
    font-size: 18px;
    /* Чуть уменьшили, чтобы точно влезало в 1-2 строки */
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 0;
}

.banner-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 18px;
}

.btn-small {
    background: var(--accent-gradient);
    border: none;
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.banner-img {
    position: absolute;
    right: 0px;
    /* Сдвинули влево на 20px (с -20px) */
    top: -25px;
    /* Подняли на 15px (с -10px) */
    height: 105px;
    /* Увеличили на 10% (с 95px) */
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.4));
}

/* --- Tabs --- */
.tabs {
    display: flex;
    background: var(--card-bg);
    padding: 5px;
    border-radius: 12px;
    margin: 0 16px 16px;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 10px 4px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
}

.tab.active {
    background: #3d4258;
    color: white;
}

/* --- Big Card (Catalog) --- */
.big-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.big-card:hover {
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.4);
}

/* --- ИСПРАВЛЕНИЕ: КАРТИНКИ В КАТАЛОГЕ --- */
/* Делаем высоту автоматической, чтобы картинка не обрезалась */
.card-media {
    width: 100%;
    height: auto;
    min-height: 200px;
    /* Минимальная высота, чтобы карточка не схлопывалась пока грузится */
    position: relative;
}

/* --- ИСПРАВЛЕНИЕ: КНОПКА ПОДРОБНОЙ ИНФОРМАЦИИ --- */
/* Возвращаем стиль минималистичной кнопки */
.product-link-external {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 24px;
    transition: background 0.2s;
    width: fit-content;
    text-decoration: none;
}

.product-link-external:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.card-content {
    padding: 14px 16px;
}

.item-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 6px;
    line-height: 1.3;
}

.card-tags {
    color: #00cec9;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 12px;
}

/* --- ПРОГРЕСС БАРЫ --- */
.progress-section {
    margin-top: 12px;
}

.progress-text {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
}

.progress-bar {
    height: 8px;
    background: var(--progress-bg);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 4px;
    position: relative;
}

.progress-fill.gradient {
    background-image: var(--heat-gradient);
    background-size: 100vw;
    box-shadow: 0 0 15px rgba(255, 165, 2, 0.5), 0 0 5px rgba(46, 204, 113, 0.3);
}

.progress-fill.blue {
    background-color: var(--blue-solid);
    box-shadow: 0 0 15px rgba(9, 132, 227, 0.7);
}

.progress-fill.green {
    background: var(--green-solid);
    box-shadow: 0 0 15px rgba(0, 206, 201, 0.5);
}

.status-badge {
    margin-top: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.4;
}

/* --- Bottom Nav --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-color);
    border-top: 1px solid #2c3e50;
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #5c5e6e;
    cursor: pointer;
    width: 44px;
    height: 44px;
}

.nav-item span {
    display: none;
}

.nav-item.active {
    color: white;
}

.nav-icon {
    width: 28px;
    height: 28px;
}

/* --- Views --- */
.view {
    display: none;
    animation: fadeIn 0.3s ease;
}

.view.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(28, 31, 46, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    display: none;
}

.modal-overlay.open {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    width: 85%;
    max-width: 340px;
}

.modal-img {
    width: 220px !important;
    /* Принудительно 220 пикселей */
    height: 220px !important;
    object-fit: contain;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.3));
    /* Тень еще мощнее */
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

.modal-text {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* --- Buttons --- */
.btn-primary {
    background: var(--accent-gradient);
    color: white;
    border: none;
    width: 100%;
    padding: 16px;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
}

/* --- PRODUCT PAGE --- */
#view-product {
    padding-bottom: 90px;
    background: var(--bg-color);
    min-height: 100vh;
    position: relative;
    z-index: 200;
}

#view-product.active {
    display: flex;
    flex-direction: column;
}

.product-header {
    width: 100%;
    left: 0;
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: var(--bg-color);
    gap: 15px;
    position: sticky;
    top: 0;
    z-index: 250;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-header.scrolled {
    background: rgba(28, 31, 46, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.back-btn {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-btn img {
    width: 22px;
    /* Было 28px, уменьшили на ~20% */
    height: 22px;
    display: block;
}

.header-title {
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s ease;
}

/* --- МЕДИА БЛОК --- */
.media-container {
    background: #000;
    width: 100%;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    background: #000;
}

.video-wrapper.video-mode {
    padding-bottom: 56.25%;
    height: 0;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-wrapper img {
    width: 100%;
    display: block;
    object-fit: cover;
    max-height: 60vh;
}

.platform-switcher {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: var(--card-bg);
    border-bottom: none;
    margin-bottom: -10px;
    position: relative;
    z-index: 10;
}

.platform-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    min-width: 52px;
    height: 48px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
}

.platform-btn img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.5;
    transition: all 0.3s;
    flex-shrink: 0;
}

.platform-btn span {
    max-width: 0;
    opacity: 0;
    margin-left: 0;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
    color: white;
    transition: all 0.4s ease;
    transform: translateX(10px);
}

.platform-btn.active {
    background: linear-gradient(135deg, rgba(92, 135, 255, 0.15), rgba(156, 89, 255, 0.15));
    border-color: rgba(108, 92, 231, 0.5);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.25);
    padding: 0 20px;
}

.platform-btn.active img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

.platform-btn.active span {
    max-width: 150px;
    opacity: 1;
    margin-left: 10px;
    transform: translateX(0);
}

.platform-btn:active {
    transform: scale(0.96);
}

/* --- INFO BLOCK --- */
.product-info {
    padding: 24px 20px 10px 20px;
    background: var(--bg-color);
    flex: 1;
}

.product-desc {
    font-size: 16px;
    line-height: 1.6;
    color: #d1d3e0;
    margin-bottom: 15px;
}

.btn-subtle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 15px;
    transition: background 0.2s;
    text-decoration: none;
    width: fit-content;
}

.btn-subtle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-subtle img {
    width: 18px;
    height: 18px;
    opacity: 0.8;
}

.tags-block {
    margin-bottom: 12px;
}

.tag-category {
    color: #00cec9;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 6px;
}

.tag-list {
    color: #00cec9;
    font-size: 14px;
    opacity: 0.8;
}

.price-block {
    display: flex;
    gap: 24px;
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.price-block span {
    font-size: 18px;
    color: white;
    font-weight: 700;
}

.progress-section-large {
    margin-bottom: 12px;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.progress-bar.large {
    height: 12px;
    background: #35394f;
    border-radius: 6px;
}

.product-status-text {
    text-align: center;
    font-size: 15px;
    color: var(--text-secondary);
    margin-top: 14px;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.4;
}

.product-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--card-bg);
    padding: 16px 20px;
    padding-bottom: 18px;
    border-top: 1px solid #2c3e50;
    display: flex;
    gap: 12px;
    z-index: 300;
}

.btn-close-square {
    width: 54px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Profile Menu */
.profile-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 18px;
    background-color: var(--card-bg);
    border: none;
    border-radius: 14px;
    margin-bottom: 12px;
    cursor: pointer;
    color: var(--text-main);
    transition: all 0.3s ease;
}

.profile-btn:hover {
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.4);
}

.profile-btn-icon {
    width: 32px;
    height: 32px;
    margin-right: 18px;
}

.profile-btn div {
    color: var(--text-main);
}

/* --- MODAL PAYMENT --- */
#modal-payment .modal-content {
    padding: 24px;
    max-width: 360px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.payment-img {
    width: 160px;
    margin-bottom: 16px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.payment-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    color: white;
}

.payment-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Кнопки оплаты в стиле видео-свитчеров */
.pay-method-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.pay-method-btn img {
    height: 24px;
    width: auto;
    filter: brightness(1.2);
}

/* Эффект при нажатии/активности (как у видео) */
.pay-method-btn:active {
    transform: scale(0.96);
    background: linear-gradient(135deg, rgba(92, 135, 255, 0.1), rgba(156, 89, 255, 0.1));
    border-color: #6c5ce7;
}

/* Подсветка для ЮMoney */
.pay-method-btn.yoo:hover {
    box-shadow: 0 4px 15px rgba(130, 53, 253, 0.2);
    border-color: #8e44ad;
}

/* Подсветка для Crypto */
.pay-method-btn.crypto:hover {
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
    border-color: #3498db;
}

.payment-cancel-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 12px;
    padding: 12px 40px;
    /* Ширина задается отступами, а не % */
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 24px;
    margin-bottom: 0;
    transition: background 0.2s;

    /* Центрирование текста внутри кнопки */
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.payment-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* --- FILTER VIEW --- */
#view-filter {
    padding: 20px;
    padding-bottom: 100px;
    background: var(--bg-color);
    min-height: 100vh;
}

.filter-header {
    width: 100%;
    left: 0;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    /* Добавляем отступы для Моих складчин и Категорий */
    padding: 15px 20px;
    /* Добавляем фон и фиксацию, чтобы при скролле красиво смотрелось (как в товаре) */
    background: var(--bg-color);
    position: sticky;
    top: 0;
    z-index: 50;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-header.scrolled {
    background: rgba(28, 31, 46, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}


/* ИСКЛЮЧЕНИЕ: На странице фильтра убираем отступы у заголовка, 
   так как там уже есть отступы у самого контейнера страницы */
#view-filter .filter-header {
    padding: 0;
    margin-bottom: 24px;
    position: static;
    /* На фильтре можно не фиксировать, если не нужно */
}

.filter-title {
    font-size: 18px;
    /* Уменьшили (было 22px), чтобы влезали длинные названия */
    font-weight: 700;
    white-space: nowrap;
    /* Запрещаем перенос строк */
    overflow: hidden;
    /* Обрезаем лишнее */
    text-overflow: ellipsis;
    /* Ставим троеточие, если не влезает */
    line-height: 1.2;
}

.filter-section {
    margin-bottom: 24px;
}

.filter-section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: white;
}

/* Кнопки сортировки (Новые, Старые...) */
.sort-buttons {
    display: flex;
    gap: 10px;
}

.sort-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    /* Овальные */
    padding: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.sort-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Чипы для категорий и тегов */
.chips-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px 16px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.chip-btn.active {
    background: rgba(108, 92, 231, 0.2);
    /* Легкий фиолетовый фон */
    border-color: var(--primary-color);
    color: white;
}

/* Фиксированная панель кнопок внизу */
.filter-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-color);
    padding: 16px 20px 30px;
    border-top: 1px solid #2c3e50;
    display: flex;
    gap: 12px;
    z-index: 1000;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* --- VIEW: ALL CATEGORIES --- */
.full-categories-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 20px;
}

.category-row {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-row:hover {
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.3);
}

.category-row:active {
    transform: scale(0.98);
    background-color: #3d4258;
}

.cat-icon {
    width: 56px;
    height: 56px;
    background: white;
    /* Логотипы обычно лучше смотрятся на белом подложке */
    border-radius: 12px;
    object-fit: contain;
    padding: 6px;
    flex-shrink: 0;
}

.cat-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cat-name {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-main);
    line-height: 1.2;
}

.cat-stats {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cat-stats span {
    white-space: nowrap;
}

/* --- СТИЛИ ДЛЯ КНОПОК ШТРАФНИКА --- */
#modal-status-penalty-btns {
    width: 100%;
    display: flex;
    /* Включаем Flexbox */
    gap: 12px !important;
    margin-top: 24px !important;
}

/* Кнопка "Оплатить штраф" - широкая */
#modal-status-penalty-btns .btn-primary {
    flex: 2 !important;
    /* Занимает 2 части места */
    width: auto !important;
    /* Отключаем 100% ширину */
    white-space: nowrap;
    padding: 14px 10px;
}

/* Кнопка "Назад" - узкая */
#modal-status-penalty-btns .btn-secondary {
    flex: 1 !important;
    /* Занимает 1 часть места */
    width: auto !important;
    /* Отключаем 100% ширину */
}

/* --- PRELOADER --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 0.3s ease;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(108, 92, 231, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 15px;
}

.loader-text {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Скрываем контент пока он не готов (опционально, но полезно) */
.view {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.view.active.loaded {
    opacity: 1;
}

/* --- COMPACT LIST (ГЛАВНАЯ) --- */
.compact-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.compact-card {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    /* Темно-синий фон как на макете */
    padding: 10px;
    border-radius: 12px;
    gap: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.compact-card:hover {
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.4);
}

.compact-card:active {
    transform: scale(0.98);
    background: #3d4258;
}

/* Миниатюра слева (вместо цифры) */
.compact-thumb {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    background-color: #35394f;
    /* Цвет заглушки пока грузится */
    flex-shrink: 0;
}

.compact-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    overflow: hidden;
    /* Чтобы текст не вылезал */
}

.compact-title {
    font-size: 15px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Троеточие если длинное название */
}

.compact-meta {
    font-size: 12px;
    color: var(--text-secondary);
    /* Серый текст */
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Маленький статус (зеленый/синий) */
.compact-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* --- BANNERS --- */
#banner-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* Отступ между баннерами в режиме отладки */
    margin-bottom: 24px;
}

.banner.subscribe {
    background: linear-gradient(90deg, #1f2533 0%, #226b9c 50%, #2AABEE 100%);
}

.banner.penalty {
    background: linear-gradient(90deg, #25283a 0%, #522828 50%, #ff4757 100%);
}

.banner.unpaid {
    background: linear-gradient(90deg, #25283a 0%, #4a3b3b 50%, #e17055 100%);
}

.banner.info {
    background: linear-gradient(90deg, #1f2533 0%, #00b894 60%, #00cec9 100%);
}

.banner.payment {
    background: linear-gradient(90deg, #25283a 0%, #2c3e50 50%, #3e4d85 100%);
}

.banner.success {
    background: linear-gradient(90deg, #25283a 0%, #27ae60 50%, #2ecc71 100%);
}

.banner.hot {
    background: linear-gradient(90deg, #25283a 0%, #4527a0 60%, #311b92 100%);
}

.banner-btn {
    border: none;
    padding: 12px 22px;
    /* Чуть побольше, чтобы удобно нажимать */
    border-radius: 12px !important;
    /* <--- ВОЗВРАЩАЕМ СКРУГЛЕНИЕ (Принудительно) */
    font-weight: 700 !important;
    /* <--- ВОЗВРАЩАЕМ ЖИРНОСТЬ (Принудительно) */
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    background: white;
    color: #2d3436;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.1s;
    position: relative;
    z-index: 5;
    /* Чтобы кнопка всегда была поверх картинок */
}

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

/* --- Стили для кнопки альтернативной оплаты в модалке --- */
.pay-method-btn.manual {
    width: 100%;
    margin-top: 12px;
    justify-content: center;
    /* Центрируем текст */
    /* Цвет фона и рамки берется от базового класса .pay-method-btn, 
       поэтому здесь мы их не переопределяем, чтобы она была "как все" */
}

/* Зеленое свечение при наведении (как у других кнопок) */
.pay-method-btn.manual:hover {
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.2);
    border-color: #00b894;
}

.pay-method-btn.manual:active {
    background: rgba(0, 184, 148, 0.1);
    transform: scale(0.98);
}

/* --- ФИКС ЦВЕТА КНОПОК НА МОБИЛЬНЫХ --- */
.btn-primary,
.btn-success,
.btn-secondary,
button {
    color: #ffffff !important;
    /* Принудительно белый */
    -webkit-text-fill-color: #ffffff !important;
    /* Фикс для Safari/iOS */
}

.banner-btn {
    color: #2d3436 !important;
    -webkit-text-fill-color: #2d3436 !important;
}