/* Game Header Redesign - в стиле основного сайта */

/* Основной контейнер хэдера */
._ah_ {
    overflow: visible !important;
}

/* Контейнер с контентом хэдера */
._ai_ {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    z-index: 100 !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 24px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
    height: auto !important;
}

/* Логотип/ссылка на главную */
._al_ {
    width: auto !important;
    min-width: auto !important;
    height: auto !important;
    background: none !important;
    background-size: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
    text-decoration: none !important;
    color: inherit !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    padding: 0 !important;
}

/* Контейнер с заголовком */
._am_ {
    padding: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    color: #ffffff !important;
    max-width: none !important;
    flex: 1 1 auto !important;
}

/* Подзаголовок "Играем в карты онлайн" */
._an_ {
    height: auto !important;
    line-height: 1.4 !important;
    opacity: 1 !important;
    font-size: 14px !important;
    color: rgba(255, 255, 255, 0.85) !important;
    margin: 0 !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

/* Название игры */
._ao_ {
    font-size: 18px !important;
    height: auto !important;
    line-height: 1.4 !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin: 4px 0 0 0 !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

/* Контейнер для счетчиков */
._ap_ {
    display: flex !important;
    align-items: center !important;
    height: auto !important;
}

/* Контейнер для ссылок (Комментарии, Правила) */
._ar_ {
    font-size: 14px !important;
    padding-right: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 20px !important;
}

/* Ссылки в хэдере */
._as_ {
    display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
    padding: 8px 12px !important;
    background: rgba(255, 255, 255, 0.15) !important;
    background-size: auto !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

._as_:hover {
    background-color: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

/* Комментарии */
._at_ {
    padding-left: 0 !important;
    background-image: none !important;
    background-size: auto !important;
}

._at_::before {
    content: "💬";
    margin-right: 6px;
    font-size: 16px;
}

/* Правила */
._au_ {
    padding-left: 0 !important;
    background-image: none !important;
    background-size: auto !important;
}

._au_::before {
    content: "📖";
    margin-right: 6px;
    font-size: 16px;
}

/* Счетчики ходов и рекордов */
._p0_ {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    margin-right: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

._p1_ {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    margin: 0;
}

._p2_ {
    font-size: 16px;
    color: #ffffff;
    font-weight: 700;
    margin: 0;
}

/* Адаптивность */
@media screen and (max-width: 1400px) {
}

@media screen and (max-width: 960px) {
    ._ai_ {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 16px !important;
    }

    ._ar_ {
        order: 3;
        width: 100%;
        justify-content: center;
    }
}

@media screen and (max-width: 720px) {
    ._ai_ {
        gap: 12px !important;
    }

    ._an_ {
        font-size: 13px !important;
    }

    ._ao_ {
        font-size: 16px !important;
    }

    ._ar_ {
        gap: 12px !important;
    }

    ._as_ {
        padding: 6px 10px !important;
        font-size: 13px !important;
    }

    ._ap_ {
        flex-wrap: wrap;
        gap: 8px;
    }

    ._p0_ {
        margin-right: 4px;
        padding: 6px 10px;
    }
}

/* Темная тема */
body.m2-dark ._ai_ {
    background: linear-gradient(135deg, #4c1d95 0%, #581c87 100%) !important;
    border-bottom-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 4px 12px rgba(76, 29, 149, 0.4) !important;
}

body.m2-dark ._an_ {
    color: rgba(255, 255, 255, 0.9) !important;
}

body.m2-dark ._ao_ {
    color: #ffffff !important;
}

body.m2-dark ._as_ {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

body.m2-dark ._as_:hover {
    background-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

body.m2-dark ._p0_ {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

body.m2-dark ._p1_ {
    color: rgba(255, 255, 255, 0.85);
}

body.m2-dark ._p2_ {
    color: #ffffff;
}

/* Кнопки управления игрой */
._8z_ {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 0 !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

._8z_:hover {
    background: rgba(255, 255, 255, 0.22) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

._8z_:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15) !important;
}

/* SVG иконки в кнопках */
._8z_ ._91_ {
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    padding: 0 !important;
    transition: all 0.25s ease !important;
    position: relative !important;
    background-size: 24px 24px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    width: 36px !important;
    height: 36px !important;
}

/* Скрываем старые path */
._8z_ ._91_ ._9r_ {
    display: none !important;
}

/* Новая игра - Play icon (первая кнопка) */
._8e_ > ._8z_._90_:first-child ._91_ {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") !important;
}

/* Начать заново - Refresh icon (вторая кнопка) */
._8e_ > ._8z_:nth-child(2) ._91_ {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z'/%3E%3C/svg%3E") !important;
}

/* Отменить ход - Undo icon (третья кнопка) */
._8e_ > ._8z_:nth-child(3) ._91_ {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z'/%3E%3C/svg%3E") !important;
}

/* Подсказать ход - Lightbulb icon (четвертая кнопка) */
._8e_ > ._8z_._90_:nth-child(4) ._91_ {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 21c0 .5.4 1 1 1h4c.6 0 1-.5 1-1v-1H9v1zm3-19C8.1 2 5 5.1 5 9c0 2.4 1.2 4.5 3 5.7V17c0 .5.4 1 1 1h6c.6 0 1-.5 1-1v-2.3c1.8-1.3 3-3.4 3-5.7 0-3.9-3.1-7-7-7z'/%3E%3C/svg%3E") !important;
}

/* Отключить звуки - Sound icon (шестая кнопка, после _8f_) */
._8e_ > ._8z_._90_:nth-child(6) ._91_ {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z'/%3E%3C/svg%3E") !important;
}

/* Отключить звуки - активное состояние (звуки выключены) */
._8e_ > ._8z_._90_._sound-off ._91_,
._8e_ > ._8z_._90_:nth-child(6)[class*='active'] ._91_,
._8e_ > ._8z_._90_:nth-child(6)[class*='disabled'] ._91_,
._8e_ > ._8z_._90_:nth-child(6)[class*='_active'] ._91_,
._8e_ > ._8z_._90_:nth-child(6)[class*='_disabled'] ._91_ {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z'/%3E%3C/svg%3E") !important;
}

/* Отключить масштабирование - Resize icon (седьмая кнопка) */
._8e_ > ._8z_._90_:nth-child(7) ._91_ {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M22 18v-2H8V4H2v2h4v2H4v2h2v8h14v-2h2zM10 6h10v10h-2V8h-8V6z'/%3E%3C/svg%3E") !important;
}

/* Отключить масштабирование - активное состояние (масштабирование выключено) */
._8e_ > ._8z_._90_._resize-off ._91_,
._8e_ > ._8z_._90_:nth-child(7)[class*='active'] ._91_,
._8e_ > ._8z_._90_:nth-child(7)[class*='disabled'] ._91_,
._8e_ > ._8z_._90_:nth-child(7)[class*='_active'] ._91_,
._8e_ > ._8z_._90_:nth-child(7)[class*='_disabled'] ._91_ {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M22 18h-2v-2h2v2zm-2-4h-2v-2h2v2zm-4 4h-2v-2h2v2zm-4-4h-2v-2h2v2zm-4 4H6v-2h2v2zm-4-4H2v-2h2v2zm16-8h-2V4h2v2zm-4 4h-2V8h2v2zm-4-4H8V4h2v2zm-4 4H4V8h2v2z'/%3E%3C/svg%3E") !important;
}

._8z_:hover ._91_ {
    background-color: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.05) !important;
}

/* Текст в кнопках */
._8z_ ._92_ {
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
    padding-right: 12px !important;
}

/* Активное состояние кнопки */
._8z_._90_ {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

._8z_._90_:hover {
    background: rgba(255, 255, 255, 0.28) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

/* Адаптивность для кнопок */
@media screen and (max-width: 720px) {
    ._8z_ {
        padding: 0 !important;
        gap: 6px !important;
    }

    ._8z_ ._91_ {
        width: 28px !important;
        height: 28px !important;
        padding: 4px !important;
    }

    ._8z_ ._92_ {
        font-size: 12px !important;
    }
}

/* Темная тема для кнопок */
body.m2-dark ._8z_ {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

body.m2-dark ._8z_:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
}

body.m2-dark ._8z_ ._91_ {
    background-color: rgba(255, 255, 255, 0.25) !important;
}

body.m2-dark ._8z_:hover ._91_ {
    background-color: rgba(255, 255, 255, 0.35) !important;
}

body.m2-dark ._8z_._90_ {
    background: rgba(255, 255, 255, 0.22) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
}

body.m2-dark ._8z_._90_:hover {
    background: rgba(255, 255, 255, 0.32) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
}

