/*
Theme Name: UaMarket Pro
Theme URI: https://polymarket.com.ua
Author: Anton
Description: Professional Market Theme (React-clone).
Version: 2.3
*/

:root {
    /* --- ГЛОБАЛЬНАЯ ПАЛИТРА --- */

    /* Фоны */
    --bg-dark: #1D2B3A;
    /* Основной фон сайта */
    --bg-card: #2F3F50;
    /* Фон карточек и шапки */

    /* Акцент (Кнопки, ссылки, графики) */
    --accent: #2C9CDB;
    --accent-hover: #56AFE2;

    /* Статусы */
    --success: #3BAB68;
    /* Зеленый (ТАК) */
    --danger: #E13737;
    /* Красный (НЕТ) */

    /* Текст */
    --text-main: #FFFFFF;
    /* Заголовки */
    --text-muted: #899cb2;
    /* Описание, второстепенный текст */

    /* Границы */
    --border-color: #3D5266;
}

/* База */
body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
    line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

/* Specificity boost to beat Tailwind Preflight */
.hero-banner h1 {
    font-size: 2.8rem !important;
    margin-bottom: 0.25em !important;
}

.hero-banner h2 {
    font-size: 1.8rem !important;
    opacity: 0.9 !important;
    margin-bottom: 0.75em !important;
}

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .hero-banner h1 {
        font-size: 2.2rem !important;
    }

    .hero-banner h2 {
        font-size: 1.5rem !important;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Анимации карточек */
.market-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
}

.market-card:hover {
    border-color: var(--accent);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3);
    transform: translateY(-4px);
}

/* --- ТИПОГРАФИКА (Для текстовых страниц) --- */

/* Делаем весь текст белым (p, li, span) */
.prose-invert p,
.prose-invert li,
.prose-invert span {
    color: var(--text-main) !important;
    opacity: 0.9;
    /* Легкая прозрачность для приятного чтения */
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* Делаем заголовки (h1-h6) чисто белыми */
.prose-invert h1,
.prose-invert h2,
.prose-invert h3,
.prose-invert h4,
.prose-invert h5,
.prose-invert h6 {
    color: var(--text-main) !important;
    font-weight: 700;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    line-height: 1.3;
}

/* Жирный текст (strong) - белый */
.prose-invert strong {
    color: var(--text-main) !important;
    font-weight: 700;
}

/* Настройка списков (точки) */
.prose-invert ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Ссылки внутри текста */
.prose-invert a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

.prose-invert a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Убираем лишние отступы у первого элемента для аккуратности */
.prose-invert>*:first-child {
    margin-top: 0;
}

/* Mobile Typography tweaks */
@media (max-width: 640px) {

    .prose-invert p,
    .prose-invert li,
    .prose-invert span {
        font-size: 0.925rem;
        /* Чуть меньше 16px */
        line-height: 1.6;
        margin-bottom: 0.75rem;
    }

    .prose-invert h1 {
        font-size: 1.5rem;
        margin-top: 1.2em;
    }

    .prose-invert h2 {
        font-size: 1.25rem;
        margin-top: 1.2em;
    }

    .prose-invert h3 {
        font-size: 1.125rem;
        margin-top: 1.1em;
    }
}





/* --- POLYMARKET POPUP & OVERLAY --- */

/* Фон-затемнение (Overlay) */
.poly-overlay {
    display: none;
    /* Скрыто по умолчанию */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    /* Полупрозрачный черный */
    backdrop-filter: blur(4px);
    /* Эффект блюра фона */
    z-index: 9998;
}

/* Сам контейнер попапа */
.poly-widget-container {
    display: none;
    /* Скрыто по умолчанию */
    background-color: #FFFFFF !important;
    width: 380px;
    padding: 30px 24px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    font-family: 'Inter', sans-serif;
    z-index: 9999;

    /* Центрирование на ВСЕХ экранах (и десктоп, и мобайл) */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    color: #000000;
    text-align: center;
}

/* Крестик закрытия */
.poly-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
}

.poly-close-btn:hover {
    color: #333;
}

/* Если окно открыто (класс добавляется скриптом) */
.poly-open {
    display: block !important;
}

/* Остальные стили кнопок оставляем те же... */
.poly-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.poly-logo {
    margin-bottom: 16px;
}

.poly-header h3 {
    font-size: 22px !important;
    font-weight: 600 !important;
    color: #000000 !important;
    margin: 0 !important;
}

/* Кнопка Google */
.poly-btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 50px;
    background-color: #0d6efd;
    color: #fff !important;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 500;
    font-size: 16px;
    transition: background 0.2s;
}

.poly-btn-google:hover {
    background-color: #0b5ed7;
}

/* Разделитель */
.poly-divider {
    display: flex;
    align-items: center;
    color: #8e8e93;
    font-size: 14px;
    margin: 20px 0;
}

.poly-divider::before,
.poly-divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #e5e5e5;
}

.poly-divider span {
    padding: 0 10px;
}

/* Поле Email */
.poly-input-group {
    position: relative;
    margin-bottom: 24px;
}

.poly-input-group input {
    width: 100%;
    height: 50px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 0 100px 0 16px;
    font-size: 16px;
    outline: none;
    color: #333;
    background: #fff;
}

.poly-input-group input:focus {
    border-color: #0d6efd;
}

.poly-btn-continue {
    position: absolute;
    right: 6px;
    top: 6px;
    bottom: 6px;
    padding: 0 16px;
    background-color: #8ab4f8;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

/* Сетка кошельков */
.poly-wallet-grid {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.wallet-item {
    width: 60px;
    height: 48px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.wallet-item:hover {
    border-color: #0d6efd;
    background: #f8f9fa;
}

.wallet-item img,
.wallet-item svg {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

/* Адаптив */
@media (max-width: 640px) {
    .poly-widget-container {
        width: 90%;
    }
}