/**
 * Fleep — hover и действия на карточках игр (вместо Dune champagne UI из casino.css).
 */
body.fleep-ui .game-card {
    --fleep-card-overlay: rgba(29, 30, 32, 0.82);
    --fleep-card-overlay-strong: rgba(29, 30, 32, 0.92);
}

body.fleep-ui .game-card-inner,
body.fleep-ui .game-card-inner--thumb,
body.fleep-ui .game-card-img-wrap {
    border-radius: var(--fleep-radius, 8px);
}

body.fleep-ui .game-card-inner--thumb {
    position: relative;
    overflow: hidden;
}

/* Полосы на главной: только превью, без подписи снизу */
body.fleep-ui .game-card--strip .game-card-info {
    display: none !important;
}

/* --- Overlay --- */
body.fleep-ui .game-card-hover {
    position: absolute;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(
        180deg,
        rgba(29, 30, 32, 0.35) 0%,
        rgba(29, 30, 32, 0.78) 45%,
        rgba(29, 30, 32, 0.92) 100%
    ) !important;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

body.fleep-ui .game-card--has-hover:hover .game-card-hover,
body.fleep-ui .game-card--has-hover:focus-within .game-card-hover {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto;
}

/* Оверлей на всю карточку (полосы и сетка) */
body.fleep-ui .game-card--strip .game-card-inner--thumb .game-card-hover,
body.fleep-ui .game-card--grid .game-card-hover,
body.fleep-ui .game-card--pinko .game-card-hover {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: unset;
    border-radius: var(--fleep-radius, 8px);
}

body.fleep-ui .game-card--strip .game-card-img {
    position: relative;
    aspect-ratio: var(--slot-aspect, 4 / 3);
    min-height: 0;
}

body.fleep-ui .game-card--strip .game-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (hover: none), (pointer: coarse) {
    body.fleep-ui .game-card--has-hover .game-card-hover {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    body.fleep-ui .game-card--has-hover.is-touch-open .game-card-hover {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    body.fleep-ui .game-card--has-hover:hover,
    body.fleep-ui .game-card--has-hover:focus-within {
        border-color: transparent !important;
        box-shadow: none !important;
        transform: none !important;
    }
}

/* --- Buttons --- */
body.fleep-ui .game-card-btn {
    width: 100%;
    max-width: 132px;
    min-height: 36px;
    padding: 8px 14px;
    margin: 0;
    border: none;
    border-radius: var(--fleep-radius, 8px) !important;
    font-family: var(--fleep-font, Roboto, sans-serif) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transform: none !important;
    transition: background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

body.fleep-ui .game-card-btn--play {
    background: linear-gradient(135deg, #F3372B 0%, #D91000 52%, #AB2416 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(217, 16, 0, 0.35) !important;
}

body.fleep-ui .game-card-btn--play:hover {
    background: linear-gradient(135deg, #FF4A3E 0%, #F3372B 50%, #D91000 100%) !important;
    box-shadow: 0 6px 18px rgba(217, 16, 0, 0.45) !important;
    transform: none !important;
}

body.fleep-ui .game-card-btn--demo {
    background: var(--fleep-panel-bg, #262628) !important;
    color: var(--fleep-text-muted, #83898E) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.15) !important;
}

body.fleep-ui .game-card-btn--demo:hover {
    background: var(--fleep-panel-hover, #2e3034) !important;
    color: var(--fleep-text, #fff) !important;
    border-color: rgba(217, 16, 0, 0.35) !important;
    transform: none !important;
}

body.fleep-ui .game-card-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    font-size: 10px;
    line-height: 1;
    flex-shrink: 0;
}

body.fleep-ui .game-card-btn-icon svg {
    display: block;
    width: 14px;
    height: 14px;
}

/* --- Favorite --- */
body.fleep-ui .game-card-fav-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 6;
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--fleep-radius, 8px);
    background: rgba(29, 30, 32, 0.72) !important;
    color: var(--fleep-text-muted, #83898E) !important;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

body.fleep-ui .game-card-fav-btn svg {
    width: 16px;
    height: 16px;
}

body.fleep-ui .game-card-fav-btn:hover {
    background: var(--fleep-panel-hover, #2e3034) !important;
    color: var(--fleep-text, #fff) !important;
}

body.fleep-ui .game-card-fav-btn.active,
body.fleep-ui .game-card-fav-btn.active:hover {
    color: var(--fleep-red, #D91000) !important;
    background: rgba(29, 30, 32, 0.88) !important;
}

body.fleep-ui .game-card-fav-btn.active svg {
    fill: var(--fleep-red, #D91000);
    stroke: var(--fleep-red, #D91000);
}

/* --- Badges on thumb --- */
body.fleep-ui .game-thumb-tag--hit {
    background: linear-gradient(135deg, #F3372B 0%, #D91000 100%) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

body.fleep-ui .game-thumb-tag--new {
    background: var(--fleep-panel-bg, #262628) !important;
    color: var(--fleep-red-light, #F3372B) !important;
    border: 1px solid rgba(217, 16, 0, 0.35);
}

body.fleep-ui .game-thumb-tag--rtp {
    background: rgba(29, 30, 32, 0.92) !important;
    color: var(--fleep-red, #D91000) !important;
    border: 1px solid rgba(217, 16, 0, 0.35) !important;
}

/* --- Card hover frame --- */
body.fleep-ui .game-card--has-hover:hover,
body.fleep-ui .game-card--has-hover:focus-within {
    border-color: rgba(217, 16, 0, 0.45) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(217, 16, 0, 0.12) !important;
    transform: none !important;
}

body.fleep-ui .game-card-name {
    color: var(--fleep-text, #fff) !important;
}

body.fleep-ui .game-card-provider {
    color: var(--fleep-text-muted, #83898E) !important;
}

/* Поиск: подсказка «Играть» */
body.fleep-ui .search-popup-game-play-hint {
    background: linear-gradient(135deg, #F3372B 0%, #D91000 100%) !important;
    color: #fff !important;
    border-radius: var(--fleep-radius, 8px) !important;
    box-shadow: 0 4px 12px rgba(217, 16, 0, 0.35) !important;
}
