/* ==========================================================================
   Khamen - clean shared stylesheet for inner pages
   Bootstrap 5 RTL + theme.css
   ========================================================================== */

/* Shared inner pages
   ========================================================================== */
.page-hero {
    background: var(--kh-gradient-brand);
    color: #fff;
    padding: 64px 0 56px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: "";
    position: absolute;
    width: 320px; height: 320px;
    background: rgba(255,255,255,.10);
    border-radius: 50%;
    top: -160px; inset-inline-start: -80px;
}
.page-hero-title {
    font-weight: 900;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin: 0;
    position: relative;
}
.page-hero-subtitle {
    margin: 10px 0 0;
    opacity: .9;
    font-size: 1.1rem;
    position: relative;
}

.pricing-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 2px solid transparent;
    border-radius: var(--kh-radius-xl);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--kh-shadow-sm);
    position: relative;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.pricing-card:hover { transform: translateY(-8px); box-shadow: var(--kh-shadow-lg); }

.pricing-card.featured {
    border-color: var(--kh-primary);
    box-shadow: var(--kh-shadow-glow);
}

.pricing-tag {
    position: absolute;
    top: -14px; inset-inline-start: 50%;
    transform: translateX(50%);
    background: var(--kh-gradient-brand);
    color: #fff;
    font-weight: 700;
    font-size: .8rem;
    padding: 6px 18px;
    border-radius: 50rem;
    white-space: nowrap;
    box-shadow: var(--kh-shadow-md);
}
.pricing-tag-free { background: var(--kh-success); }

.pricing-name {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 8px 0 14px;
}
.pricing-price { margin-bottom: 20px; line-height: 1; }
.pricing-amount {
    font-size: 2.6rem;
    font-weight: 900;
    background: var(--kh-gradient-brand);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.pricing-currency { font-size: 1rem; font-weight: 700; color: var(--kh-gray); }

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 22px;
    text-align: start;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.pricing-features li { font-size: .95rem; color: var(--kh-dark); }
.pricing-features li i { color: var(--kh-success); margin-inline-end: 8px; }
.pricing-features .pricing-save i { color: var(--kh-secondary); }
.pricing-save { font-weight: 700; color: var(--kh-secondary); }

.pricing-desc {
    font-size: .85rem;
    color: var(--kh-gray);
    margin-bottom: 18px;
}

.content-page {
    max-width: 820px;
    margin-inline: auto;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.content-page h2 {
    font-weight: 800;
    font-size: 1.35rem;
    margin: 28px 0 12px;
    color: var(--kh-primary);
}
.content-page h2:first-child { margin-top: 0; }
.content-page p { color: var(--kh-dark); line-height: 1.9; margin-bottom: 14px; }

.faq-wrap { max-width: 820px; margin-inline: auto; }
.faq-item {
    background: var(--bg-card);
    border-radius: var(--kh-radius-md);
    box-shadow: var(--kh-shadow-sm);
    margin-bottom: 14px;
    overflow: hidden;
}
.faq-question {
    width: 100%;
    text-align: start;
    border: none;
    background: none;
    padding: 20px 24px;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--kh-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}
.faq-question .faq-icon { color: var(--kh-primary); transition: transform .25s ease; flex-shrink: 0; }
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }
.faq-answer { padding: 0 24px; max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease; }
.faq-answer.open { padding: 0 24px 20px; }
.faq-answer p { color: var(--kh-gray); line-height: 1.9; margin: 0; }

.contact-card {
    background: var(--bg-card);
    border-radius: var(--kh-radius-xl);
    padding: 36px 32px;
    box-shadow: var(--kh-shadow-sm);
}
.contact-card .form-label { font-weight: 600; margin-bottom: 6px; }
.contact-card .form-control { border-radius: var(--kh-radius-md); padding: 12px 14px; }
.contact-card .form-control:focus {
    border-color: var(--kh-primary);
    box-shadow: 0 0 0 .25rem rgba(107,10,111,.15);
}
.contact-info-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border-radius: var(--kh-radius-lg);
    padding: 20px 22px;
    box-shadow: var(--kh-shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: transform .2s ease, box-shadow .2s ease;
}
.contact-info-item:hover { transform: translateY(-3px); box-shadow: var(--kh-shadow-md); color: inherit; }
.ci-icon {
    width: 54px; height: 54px;
    flex-shrink: 0;
    border-radius: 16px;
    background: var(--kh-primary-bg);
    color: var(--kh-primary);
    font-size: 1.3rem;
    display: flex; align-items: center; justify-content: center;
}
.ci-label { margin: 0; font-size: .85rem; color: var(--kh-gray); font-weight: 600; }
.ci-value { margin: 0; font-weight: 700; overflow-wrap: anywhere; word-break: break-word; }
.contact-info-item > div { min-width: 0; }

.content-page a { overflow-wrap: anywhere; }
.content-page img,
.content-page pre,
.content-page table { max-width: 100%; }
.content-page pre { overflow-x: auto; white-space: pre-wrap; }
.content-page table { display: block; overflow-x: auto; }

@media (max-width: 767.98px) {
    .page-hero { padding: 48px 0 40px; }
    .contact-card { padding: 28px 20px; }
}
@media (max-width: 575.98px) {
    .faq-question { padding: 16px; }
    .faq-answer { padding: 0 16px; }
    .faq-answer.open { padding: 0 16px 16px; }
}

.checkout-card {
    background: var(--bg-card);
    border-radius: var(--kh-radius-xl);
    padding: 32px 28px;
    box-shadow: var(--kh-shadow-sm);
}
.result-icon { font-size: 3.5rem; line-height: 1; }
.result-ok   { color: var(--kh-success); }
.result-fail { color: var(--kh-danger); }
@media (max-width: 575.98px) {
    .checkout-card { padding: 24px 18px; }
}

.kh-sg-co-thumb {
    width: 72px; height: 72px; flex-shrink: 0; overflow: hidden;
    border-radius: var(--kh-radius-md);
    background: var(--kh-primary-bg, rgba(107, 10, 111, .08));
    display: flex; align-items: center; justify-content: center;
}
.kh-sg-co-thumb img { width: 100%; height: 100%; object-fit: cover; }
.kh-sg-co-thumb-fallback { font-size: 1.9rem; line-height: 1; }
@media (max-width: 575.98px) {
    .kh-sg-co-thumb { width: 58px; height: 58px; }
    .kh-sg-co-thumb-fallback { font-size: 1.5rem; }
}

.gift-hub-card {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    background: var(--bg-card); border: 1px solid var(--kh-border, var(--border)); border-radius: var(--kh-radius-xl);
    padding: 40px 26px 30px; text-decoration: none; color: var(--kh-dark);
    box-shadow: var(--kh-shadow-sm); transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.gift-hub-card:hover { transform: translateY(-6px); box-shadow: 0 18px 44px rgba(107,10,111,.14); border-color: var(--kh-secondary, #C0008F); color: var(--kh-dark); }
.gift-hub-icon {
    width: 76px; height: 76px; border-radius: 22px; display: flex; align-items: center; justify-content: center;
    font-size: 1.9rem; color: #fff; margin-bottom: 18px;
}
.gift-hub-redeem .gift-hub-icon { background: linear-gradient(135deg, #6B0A6F, #3A1578); }
.gift-hub-buy .gift-hub-icon { background: linear-gradient(135deg, #C0008F, #D930A8); }
.gift-hub-card h3 { font-weight: 800; margin-bottom: 6px; }
.gift-hub-card p { color: var(--kh-text-secondary, #6b6b6b); margin: 0; }
.gift-hub-go { margin-top: 18px; width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--kh-primary-bg, var(--kh-primary-bg)); color: var(--kh-primary); }

.gift-redeem-emoji { font-size: 3rem; color: var(--kh-secondary, #C0008F); }
.gift-code-input { letter-spacing: 2px; }
.gift-code-box {
    display: inline-block; margin: 6px auto 0; padding: 14px 26px; border-radius: 16px;
    background: var(--kh-primary-bg, var(--kh-primary-bg)); border: 2px dashed var(--kh-secondary, #C0008F);
    font-size: 1.5rem; font-weight: 800; letter-spacing: 3px; color: var(--kh-primary);
}
.pricing-gift-link { color: var(--kh-secondary, #C0008F) !important; font-weight: 700; font-size: .9rem; text-decoration: none; }
.pricing-gift-link:hover { text-decoration: underline; }

.cat-filters { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.cat-filter {
    border: 1px solid var(--kh-primary);
    background: var(--bg-card);
    color: var(--kh-primary);
    padding: 6px 18px;
    border-radius: 50rem;
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
    transition: all .2s ease;
}
.cat-filter:hover,
.cat-filter.active { background: var(--kh-primary); color: #fff; }

.cat-block { margin-bottom: 2.75rem; }

.cat-block-head { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 1.5rem; flex-wrap: wrap; }
.cat-block-title {
    font-size: 1.35rem; font-weight: 800; margin: 0; color: var(--kh-primary);
    position: relative; padding-bottom: 12px;
}
.cat-block-title::after {
    content: ""; position: absolute; bottom: 0; left: 0; right: 0; margin-inline: auto;
    width: 46px; height: 3px; border-radius: 3px;
    background: linear-gradient(90deg, var(--kh-primary), var(--kh-secondary));
}
.cat-free-badge { background: var(--kh-success); color: #fff; font-size: .75rem; font-weight: 700; padding: 3px 12px; border-radius: 50rem; }

.subcat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 280px)); justify-content: center; gap: 16px; }

.subcat-card {
    position: relative;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--kh-radius-xl);
    padding: 28px 16px 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(107, 10, 111, .04);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.subcat-card:hover { transform: translateY(-6px); box-shadow: 0 14px 34px rgba(107, 10, 111, .12); border-color: var(--kh-secondary); }
.subcat-icon { font-size: 2.8rem; line-height: 1; margin-bottom: 12px; transition: transform .25s ease; }
.subcat-card:hover .subcat-icon { transform: scale(1.12) rotate(-5deg); }
.subcat-name { font-size: 1.02rem; font-weight: 800; margin: 0 0 5px; color: var(--kh-dark); }
.subcat-count { font-size: .8rem; color: var(--kh-gray); font-weight: 600; }

.subcat-fav {
    position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2;
    width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
    border: none; border-radius: 50%; padding: 0; cursor: pointer; text-decoration: none;
    background: var(--kh-primary-bg); color: var(--kh-gray-light);
    font-size: 1rem; line-height: 1; box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    transition: transform .2s ease, background .2s ease, color .2s ease;
}
.subcat-fav:hover { transform: scale(1.12); color: var(--kh-danger); }
.subcat-fav.is-fav { background: #FFEAF2; color: var(--kh-danger); }
.subcat-fav.is-fav i { animation: favPop .35s ease; }
@keyframes favPop { 0% { transform: scale(1); } 45% { transform: scale(1.35); } 100% { transform: scale(1); } }

@media (max-width: 575.98px) {
    .subcat-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); justify-content: stretch; gap: 12px; }
    .subcat-icon { font-size: 2rem; }
    .cat-block-title { font-size: 1.15rem; }
}

.sg-wrap { max-width: 920px; }

.sg-progress { display: flex; gap: 6px; margin-bottom: 1.75rem; overflow-x: auto; padding-bottom: 4px; }
.sg-prog { display: flex; align-items: center; gap: 8px; flex: 1 0 auto; opacity: .5; }
.sg-prog.active, .sg-prog.done { opacity: 1; }
.sg-prog.done { cursor: pointer; }
.sg-prog-dot { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--border); color: var(--kh-gray); font-weight: 800; font-size: .85rem; flex-shrink: 0; }
.sg-prog.active .sg-prog-dot { background: var(--kh-primary); color: #fff; }
.sg-prog.done .sg-prog-dot { background: var(--kh-success); color: #fff; }
.sg-prog-label { font-size: .82rem; font-weight: 700; white-space: nowrap; }

.sg-step-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: .5rem; }
.sg-step-head h3 { font-size: 1.15rem; font-weight: 800; margin: 0; }
.sg-counter { background: var(--kh-primary-bg); color: var(--kh-primary); font-weight: 800; padding: 4px 14px; border-radius: 50rem; font-size: .9rem; white-space: nowrap; }

.sg-section-title { font-size: 1.15rem; font-weight: 800; margin: 0 0 1rem; display: flex; align-items: center; gap: 10px; }
.sg-num {
    width: 30px; height: 30px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; font-size: .9rem; font-weight: 800; color: #fff;
    background: var(--kh-gradient-primary, linear-gradient(135deg, #6B0A6F, #4A0E5C));
}

.sg-cat-block { margin-bottom: 1.5rem; }
.sg-cat-title { font-size: 1rem; font-weight: 800; margin-bottom: .75rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.text-team-a { color: #7B2CBF !important; }
.text-team-b { color: #0D9668 !important; }

.sg-grid .subcat-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); justify-content: stretch; gap: 12px; }
.subcat-pickable { cursor: pointer; user-select: none; }
.subcat-check { position: absolute; top: 8px; inset-inline-start: 8px; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--kh-primary); color: #fff; font-size: .7rem; opacity: 0; transform: scale(.5); transition: .15s ease; }
.subcat-card.is-selected .subcat-check { opacity: 1; transform: scale(1); }
.sg-grid[data-team="A"] .subcat-card.is-selected { border-color: #7B2CBF; box-shadow: 0 0 0 2px #7B2CBF; }
.sg-grid[data-team="A"] .subcat-card.is-selected .subcat-check { background: #7B2CBF; }
.sg-grid[data-team="B"] .subcat-card.is-selected { border-color: #0D9668; box-shadow: 0 0 0 2px #0D9668; }
.sg-grid[data-team="B"] .subcat-card.is-selected .subcat-check { background: #0D9668; }
.subcat-card.is-taken { opacity: .35; pointer-events: none; }
.subcat-card.is-disabled { opacity: .45; pointer-events: none; }

.subcat-pickable, .sg-power { cursor: pointer; }
.subcat-pickable:focus-visible, .sg-power:focus-visible { outline: 3px solid var(--kh-secondary); outline-offset: 3px; }
.subcat-low { color: var(--kh-danger); font-weight: 600; }

.sg-powers { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.sg-power { position: relative; background: var(--bg-card); border: 2px solid var(--border); border-radius: var(--kh-radius-lg); padding: 18px 12px; text-align: center; cursor: pointer; user-select: none; transition: .15s ease; }
.sg-power:hover { box-shadow: var(--kh-shadow-sm); }
.sg-power.is-selected { border-color: var(--kh-primary); box-shadow: 0 0 0 2px var(--kh-primary); }
.sg-power-icon { width: 48px; height: 48px; margin: 0 auto 8px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; overflow: hidden; }
.sg-power-icon img { width: 100%; height: 100%; object-fit: contain; }
.sg-power-name { font-size: .82rem; font-weight: 700; display: block; line-height: 1.3; }
.sg-power-check { position: absolute; top: 8px; inset-inline-start: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--kh-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .65rem; opacity: 0; transition: .15s ease; }
.sg-power.is-selected .sg-power-check { opacity: 1; }

.sg-free-toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; }
.sg-free-warn { color: var(--kh-danger); font-size: .85rem; margin-top: 8px; font-weight: 600; }

.sg-players summary { cursor: pointer; font-size: .9rem; font-weight: 600; }
.sg-player-row { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.sg-rm-player { border: none; background: none; color: var(--kh-danger); font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 0 6px; }

.sg-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 1.5rem; }
.sg-nav .btn { min-width: 120px; }
@media (max-width: 480px) { .sg-nav .btn { flex: 1; min-width: 0; } }

.sg-sum-cats { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.sg-sum-cats li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    padding: 6px 12px;
    border-radius: var(--kh-radius-sm);
    background: var(--kh-bg-surface);
    font-size: .9rem;
    font-weight: 600;
}
.sg-sum-pow { background: var(--kh-primary-bg); color: var(--kh-primary); padding: 5px 14px; border-radius: 50rem; font-size: .85rem; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }

.sg-toast { position: fixed; bottom: 20px; inset-inline: 0; margin-inline: auto; width: max-content; max-width: 90%; background: var(--kh-bg-dark); color: #fff; padding: 12px 22px; border-radius: 50rem; font-weight: 600; z-index: 1080; box-shadow: var(--kh-shadow-lg); }

.gs-result {
    text-align: center; padding: 2rem 1.5rem 1.5rem;
    background: linear-gradient(180deg, #fff 0%, var(--kh-secondary-bg) 60%, #F0EBFF 100%);
    border: 1px solid var(--kh-secondary-bg);
}
.gs-trophy { font-size: 3.4rem; line-height: 1; }
.gs-result-title {
    font-size: clamp(1.4rem, 4vw, 1.9rem); font-weight: 900; margin: .25rem 0;
    background: linear-gradient(135deg, var(--kh-secondary), var(--kh-primary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.gs-result-winner { font-size: 1.3rem; font-weight: 800; margin-bottom: 1.25rem; }

.gs-score-cards { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem; }
.gs-score-card {
    background: var(--bg-card); border: 2px solid var(--kh-light); border-radius: var(--kh-radius-lg);
    padding: 1.1rem 1.4rem; min-width: 190px; flex: 1 1 190px; max-width: 280px;
    border-top: 4px solid var(--tc, var(--kh-secondary)); box-shadow: var(--kh-shadow-sm);
    transition: transform .2s, box-shadow .2s;
}
.gs-score-card.is-win {
    border-color: var(--tc, var(--kh-secondary));
    box-shadow: 0 8px 30px color-mix(in srgb, var(--tc, var(--kh-secondary)) 22%, transparent);
    transform: translateY(-3px);
}
.gs-sc-name { font-weight: 800; font-size: 1rem; margin-bottom: .35rem; }
.gs-crown { margin-inline-end: 4px; }
.gs-sc-score { font-size: 2.4rem; font-weight: 900; color: var(--tc, var(--kh-secondary)); line-height: 1.1; }
.gs-sc-meta { font-size: .82rem; color: var(--kh-gray); margin-top: .35rem; }
.gs-sc-meta i { color: var(--kh-success); }
.gs-sc-players { font-size: .78rem; color: var(--kh-gray-light); margin-top: .35rem; }
.gs-result-foot { font-size: .8rem; color: var(--kh-gray); margin-top: .25rem; }

.gs-progress { height: 12px; background: var(--border); border-radius: 999px; overflow: hidden; }
.gs-progress-bar { height: 100%; background: linear-gradient(90deg, var(--kh-primary), var(--kh-secondary)); border-radius: 999px; }

.sg-flags { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.sg-flag {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .35rem .8rem; border-radius: 999px; cursor: pointer;
    background: var(--kh-bg-surface); border: 2px solid transparent; color: var(--kh-gray);
    font-size: .85rem; font-weight: 700; transition: .15s;
}
.sg-flag:hover { border-color: var(--kh-primary); color: var(--kh-primary); }
.sg-flag.is-active { background: var(--kh-primary); color: #fff; border-color: var(--kh-primary); }
.sg-flag-em { font-size: 1.05rem; line-height: 1; }

.sg-flag-all { font-weight: 800; letter-spacing: .3px; }
.sg-flag-all .sg-flag-name { display: inline !important; }
@media (max-width: 575.98px) {
    .sg-flags { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .35rem; }
    .sg-flag { flex: 0 0 auto; }
    .sg-flag-name { display: none; }
}

.subcat-flag {
    position: absolute; top: 8px; inset-inline-end: 8px;
    font-size: 1.1rem; line-height: 1; opacity: 0; transform: scale(.5); transition: .15s ease;
    pointer-events: none;
}
.subcat-card.is-selected .subcat-flag.show { opacity: 1; transform: scale(1); }

.sg-sum-flag { font-size: 1rem; line-height: 1; }
.sg-sum-country { font-size: .72rem; color: var(--kh-gray-light); }

/* Special-games cards
   ========================================================================== */
.kh-sg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.kh-sg-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 6px 20px rgba(107,10,111,.08);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.kh-sg-card:hover {
    transform: translateY(-7px);
    border-color: var(--kh-secondary);
    box-shadow: 0 20px 42px rgba(107,10,111,.15);
}

.kh-sg-media {
    position: relative;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    background: linear-gradient(145deg, var(--kh-primary-bg), #F7EAFB);
}

.kh-sg-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .4s ease;
}

.kh-sg-card:hover .kh-sg-media img {
    transform: scale(1.05);
}

.kh-sg-media-fallback {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.kh-sg-badge {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: 5px 13px;
    border: 2px solid #fff;
    border-radius: 50rem;
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    box-shadow: 0 5px 14px rgba(0,0,0,.18);
}

.kh-sg-badge-owned { background: var(--kh-success); }
.kh-sg-badge-free { background: var(--kh-secondary); }

.kh-sg-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .55rem;
    padding: 18px;
}

.kh-sg-name {
    margin: 0;
    color: var(--kh-dark);
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.45;
}

.kh-sg-cat {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: 4px 12px;
    border-radius: 50rem;
    background: var(--kh-primary-bg);
    color: var(--kh-primary);
    font-size: .75rem;
    font-weight: 700;
}

.kh-sg-cat-icon { font-size: .9rem; line-height: 1; }
.kh-sg-cat-img { width: 18px; height: 18px; object-fit: contain; }

.kh-sg-meta {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    border-top: 1px dashed var(--border);
}

.kh-sg-count {
    color: var(--kh-gray);
    font-size: .8rem;
    font-weight: 700;
}

.kh-sg-count i {
    color: var(--kh-primary);
    margin-inline-end: .2rem;
}

.kh-sg-price {
    color: var(--kh-primary);
    font-size: 1.05rem;
    font-weight: 900;
}

.kh-sg-price small {
    color: var(--kh-gray);
    font-size: .72rem;
}

.kh-sg-price-free {
    color: var(--kh-success);
    font-size: .9rem;
}

.kh-sg-cta {
    min-height: 44px;
    margin-top: .3rem;
    border: 0 !important;
    border-radius: 14px !important;
    background: var(--kh-gradient-primary) !important;
    color: #fff !important;
    font-weight: 900;
    box-shadow: 0 7px 16px rgba(107,10,111,.18);
}

.kh-sg-note {
    margin: .35rem 0 0;
    color: var(--kh-gray-light);
    font-size: .72rem;
    font-weight: 600;
    text-align: center;
}

.kh-sg-empty {
    text-align: center; padding: 3.5rem 1rem;
    background: var(--bg-card); border: 1.5px dashed var(--border);
    border-radius: var(--kh-radius-xl);
}
.kh-sg-empty-icon { font-size: 3rem; line-height: 1; margin-bottom: .75rem; }
.kh-sg-empty-title { font-size: 1.1rem; font-weight: 800; color: var(--kh-dark); margin: 0 0 .4rem; }
.kh-sg-empty-text { font-size: .9rem; color: var(--kh-gray); margin: 0 0 1.25rem; }

@media (max-width: 575.98px) {
    .kh-sg-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .kh-sg-body { padding: 12px; }
    .kh-sg-name { font-size: .92rem; }
    .kh-sg-media-fallback { font-size: 2.2rem; }
}

/* Special-games hero, search and filters
   ========================================================================== */
.kh-sg-hero {
    position: relative;
    min-height: 330px;
    overflow: hidden;
    background: #00B0C4;
    color: #ffffff;
}

.kh-sg-hero-container {
    position: relative;
    z-index: 3;
}

.kh-sg-hero-content {
    min-height: 270px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 45px 20px 75px;
    text-align: center;
}

.kh-sg-hero-title {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: clamp(2.4rem, 5vw, 4.3rem);
    line-height: 1.15;
    font-weight: 1000;
    letter-spacing: -1px;
    text-shadow: 0 5px 18px rgba(0, 0, 0, .10);
}

.kh-sg-hero-subtitle {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, .96);
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    line-height: 1.9;
    font-weight: 700;
}

.kh-sg-hero-decor {
    position: absolute;
    z-index: 1;
    border-radius: 50%;
    background: rgba(255, 255, 255, .10);
    pointer-events: none;
}

.kh-sg-hero-decor-one {
    width: 310px;
    height: 310px;
    top: -175px;
    inset-inline-end: -80px;
}

.kh-sg-hero-decor-two {
    width: 180px;
    height: 180px;
    bottom: -95px;
    inset-inline-start: 6%;
    background: rgba(255, 255, 255, .07);
}

.kh-sg-hero-wave {
    position: absolute;
    inset-inline: 0;
    bottom: -1px;
    z-index: 2;
    width: 100%;
    height: 95px;
    line-height: 0;
}

.kh-sg-hero-wave svg {
    display: block;
    width: 100%;
    height: 100%;
}

.kh-sg-hero-wave path {
    fill: #ffffff;
}

.kh-sg-hero + .section {
    padding-top: 45px !important;
}

.kh-sg-search {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 620px;
    margin: 0 auto 26px;
    gap: 0;
    direction: rtl;
}

.kh-sg-search-input {
    flex: 1;
    min-width: 0;
    font-family: inherit;
    font-weight: 600;
    min-height: 58px;
    padding-inline-start: 26px;
    padding-inline-end: 62px;
    border: 2px solid #d5d5d5;
    border-radius: 0 999px 999px 0;
    background: #ffffff;
    color: var(--kh-dark);
    font-size: 1rem;
    box-shadow: none;
}

.kh-sg-search-input:focus {
    border-color: #00B0C4;
    box-shadow: 0 0 0 4px rgba(0, 176, 196, .13);
}

.kh-sg-search-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    inset-inline-start: auto;
    inset-inline-end: 22px;
    z-index: 2;
    color: #00B0C4;
    font-size: 1.1rem;
}

.kh-sg-search-btn {
    min-width: 112px;
    min-height: 58px;
    margin-inline-start: -2px;
    padding-inline: 24px;
    border: 2px solid #00B0C4;
    border-radius: 999px 0 0 999px;
    background: #00B0C4;
    color: #ffffff;
    font-size: .95rem;
    font-weight: 900;
    box-shadow: none;
}

.kh-sg-search-btn:hover,
.kh-sg-search-btn:focus {
    border-color: #0097A8;
    background: #0097A8;
    color: #ffffff;
}

.kh-sg-chips {
    gap: 18px;
    margin-bottom: 42px !important;
}

.kh-sg-chips .cat-filter {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 62px;
    padding: 10px 10px 10px 26px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(180deg, #9E00BE 0%, #6B0A6F 100%);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 12px 25px rgba(107, 10, 111, .22);
    transition: transform .25s ease, background .25s ease, color .25s ease, box-shadow .25s ease;
}

.kh-sg-chips .cat-filter:hover {
    background: #00B0C4;
    color: #ffffff;
    transform: translateY(-4px);
    box-shadow: 0 18px 35px rgba(0, 176, 196, .28);
}

.kh-sg-chips .cat-filter.active {
    background: #5B0067;
    color: #ffffff;
    box-shadow: 0 18px 35px rgba(91, 0, 103, .35);
}

.kh-sg-chips .kh-sg-chip-mine.active {
    background: #5B0067;
    color: #ffffff;
}

.kh-sg-chip-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #ffffff;
    color: var(--kh-primary);
    font-size: 1.35rem;
    line-height: 1;
    transition: transform .25s ease, background .25s ease, color .25s ease;
}

.kh-sg-chips .cat-filter:hover .kh-sg-chip-icon,
.kh-sg-chips .cat-filter.active .kh-sg-chip-icon {
    background: #ffffff;
    color: var(--kh-primary);
    transform: scale(1.08);
}

@media (max-width: 767.98px) {

    .kh-sg-hero {
        min-height: 290px;
    }

    .kh-sg-hero-content {
        min-height: 235px;
        padding: 38px 16px 70px;
    }

    .kh-sg-hero-title {
        font-size: 2.3rem;
    }

    .kh-sg-hero-subtitle {
        max-width: 340px;
        font-size: .95rem;
        line-height: 1.75;
    }

    .kh-sg-hero-wave {
        height: 70px;
    }

    .kh-sg-search {
        max-width: 100%;
        margin-bottom: 22px;
        flex-wrap: nowrap;
    }

    .kh-sg-search-input {
        min-height: 52px;
        width: calc(100% - 92px);
        padding-inline-end: 48px;
        font-size: .88rem;
    }

    .kh-sg-search-icon {
        inset-inline-end: 17px;
        font-size: .95rem;
    }

    .kh-sg-search-btn {
        width: 92px;
        min-width: 92px;
        min-height: 52px;
        padding-inline: 12px;
        font-size: .85rem;
    }

    .kh-sg-chips {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        padding: 4px 2px 12px;
        scrollbar-width: none;
    }

    .kh-sg-chips::-webkit-scrollbar {
        display: none;
    }
    .kh-sg-chips .cat-filter {
        flex: 0 0 auto;
        min-height: 54px;
        padding: 8px 10px 8px 20px;
        gap: 14px;
        font-size: .9rem;
    }

    .kh-sg-chip-icon {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
}

@media (max-width: 420px) {

    .kh-sg-hero-title {
        font-size: 2rem;
    }

    .kh-sg-hero-subtitle {
        font-size: .88rem;
    }

    .kh-sg-search-input {
        font-size: .8rem;
    }
}

.kh-sg-chip-img {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Subcategory images
   ========================================================================== */
.subcat-media {
    padding: 0;
    overflow: hidden;
}

.subcat-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.subcat-icon-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Categories page
   ========================================================================== */
.categories-page .cat-filters {
    gap: 12px;
    margin-bottom: 32px !important;
    animation: catFiltersIn .45s ease-out both;
}

.categories-page .cat-filter {
    min-width: 105px;
    min-height: 46px;
    padding: 10px 24px;
    border: 2px solid #520E61;
    background: #fff;
    color: #520E61;
    border-radius: 50rem;
    font-size: 1rem;
    font-weight: 800;
    transition: transform .2s ease, box-shadow .2s ease,
                background .2s ease, color .2s ease;
}

.categories-page .cat-filter:hover {
    transform: translateY(-3px);
    box-shadow: 0 9px 20px rgba(82, 14, 97, .18);
}

.categories-page .cat-filter.active {
    background: #520E61;
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 9px 22px rgba(82, 14, 97, .24);
}

.categories-page .cat-block {
    position: relative;
    margin-bottom: 38px;
    padding: 28px;
    background: #FDF9FF;
    border: 1px solid #F0E3F3;
    border-radius: 32px;
}

.categories-page .cat-block-head-card {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
}

.categories-page .cat-main-card {
    text-align: center;
    width: 220px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(82, 14, 97, .15);
    border-radius: 24px;
    box-shadow: 0 10px 28px rgba(82, 14, 97, .10);
    transition: transform .25s ease, box-shadow .25s ease;
}

.categories-page .cat-main-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 38px rgba(82, 14, 97, .17);
}

.categories-page .cat-main-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
    height: 220px;
    background: #F2E5F6;
}

.categories-page .cat-main-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: none;
}

.categories-page .cat-main-name {
    padding: 15px 10px 17px;
    background: #520E61;
}

.categories-page .cat-main-name .cat-block-title {
    margin: 0;
    padding: 0;
    color: #fff;
    font-size: 1rem;
    font-weight: 900;
}

.categories-page .cat-main-name .cat-block-title::after {
    display: none;
}

.categories-page .subcat-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 255px));
    gap: 20px;
}

.categories-page .subcat-card {
    padding: 0 0 18px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(82, 14, 97, .14);
    border-radius: 24px;
    box-shadow: 0 7px 22px rgba(82, 14, 97, .07);
    transition: transform .25s ease, box-shadow .25s ease,
                border-color .25s ease;
}

.categories-page .subcat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(82, 14, 97, .35);
    box-shadow: 0 15px 32px rgba(82, 14, 97, .14);
}

.categories-page .subcat-media {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 0 0 15px;
    overflow: hidden;
    background: #F2E5F6;
}

.categories-page .subcat-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    transition: none !important;
}

.categories-page .subcat-card:hover .subcat-icon,
.categories-page .subcat-card:hover .subcat-image {
    transform: none !important;
}

.categories-page .subcat-name {
    margin: 0 0 5px;
    padding: 0 15px;
    font-size: 1.05rem;
    font-weight: 900;
}

.categories-page .subcat-count {
    padding: 0 15px;
    font-size: .83rem;
}

.categories-page .subcat-fav {
    top: 12px;
    inset-inline-end: 12px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, .94);
    color: #8C8293;
    font-size: 1.1rem;
    box-shadow: 0 6px 18px rgba(82, 14, 97, .16);
    transition: transform .2s ease, color .2s ease,
                background .2s ease;
}

.categories-page .subcat-fav:hover {
    color: #E93667;
    background: #fff;
    transform: translateY(-2px) scale(1.08);
}

@keyframes catFiltersIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.categories-page .cat-main-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(107, 10, 111, .08), rgba(192, 0, 143, .12));
    color: #520e61;
    font-size: 3rem;
}

.categories-page .cat-main-name .cat-free-badge {
    display: inline-block;
    margin-top: 8px;
}

.categories-page .cat-toggle {
    position: absolute;
    top: 18px;
    right: 18px;
    left: auto;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #520e61;
    color: #fff;
    box-shadow: 0 7px 18px rgba(82, 14, 97, .22);
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, color .2s ease;
}

.categories-page .cat-toggle:hover {
    transform: scale(1.07);
    background: #711482;
}

.categories-page .cat-block.is-open .cat-toggle {
    background: #e1e1e6;
    color: #520e61;
    box-shadow: none;
}

.categories-page .cat-panel[hidden],
.categories-page .subcat-card[hidden] {
    display: none !important;
}

.categories-page .cat-panel:not([hidden]) {
    animation: catPanelOpen .25s ease;
}

.categories-page .cat-panel:not([hidden]) .subcat-grid {
    padding-top: 20px;
}

.categories-page .cat-block:not(.is-open) {
    padding-block: 18px;
}

.categories-page .cat-block:not(.is-open) .cat-block-head-card {
    margin-bottom: 0;
}

.categories-page .cat-block:not(.is-open) .cat-main-card {
    border: 0;
    border-radius: 18px;
}

.categories-page .cat-block:not(.is-open) .cat-main-card:hover {
    transform: none;
}

.categories-page .cat-block:not(.is-open) .cat-main-image-wrap,
.categories-page .cat-block:not(.is-open) .cat-free-badge {
    display: none;
}

.categories-page .cat-block:not(.is-open) .cat-main-name {
    padding: 16px 24px;
}

@keyframes catPanelOpen {
    from {
        transform: translateY(-8px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 575.98px) {
    .categories-page .cat-block {
        padding: 16px;
        border-radius: 24px;
    }

    .categories-page .cat-filter {
        min-width: 90px;
        min-height: 43px;
        padding: 8px 17px;
        font-size: .9rem;
    }

    .categories-page .cat-main-card {
        width: 180px;
    }

    .categories-page .cat-main-image-wrap {
        height: 180px;
    }

    .categories-page .cat-toggle {
        top: 12px;
        right: 12px;
        width: 38px;
        height: 38px;
        font-size: 20px;
    }

    .categories-page .subcat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}
