/* Games section styles */

/* MGID "additional page" ad mode hides all body children � keep games visible */
body.games-page.mg-additional-page > :not(.mg-additional-container),
html.games-page.mg-additional-page > :not(.mg-additional-container) {
    display: block !important;
}

body.games-page .mg-additional-container {
    display: none !important;
}

.games-ad-block {
    margin-bottom: 20px;
    text-align: center;
    overflow: hidden;
}

.games-ad-sidebar {
    margin-bottom: 20px;
}

.games-ad-content {
    margin-top: 20px;
}

.games-hub .games-intro,
.games-intro {
    margin-bottom: 30px;
}

.games-breadcrumb {
    margin-bottom: 15px;
    font-size: 14px;
    color: #777;
}

.games-breadcrumb a {
    color: #32bea6;
}

.games-category-cards {
    margin-top: 20px;
}

.games-category-card {
    display: block;
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    padding: 30px 25px;
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    text-decoration: none !important;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-height: 280px;
}

.games-category-card:hover {
    border-color: #32bea6;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    color: #333;
}

.games-category-icon {
    font-size: 48px;
    color: #32bea6;
    display: block;
    margin-bottom: 15px;
}

.games-category-casual .games-category-icon {
    color: #5cb85c;
}

.games-category-card h2 {
    margin-top: 0;
    font-size: 24px;
}

.games-count {
    display: block;
    color: #999;
    margin: 10px 0 15px;
    font-size: 13px;
}

.games-grid {
    margin-top: 10px;
}

.games-card {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 25px;
    transition: box-shadow 0.2s;
    overflow: hidden;
}

.games-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.games-card-link {
    display: block;
    color: #333;
    text-decoration: none !important;
}

.games-card-icon {
    background: #f5f5f5;
    text-align: center;
    padding: 25px;
    font-size: 42px;
    color: #32bea6;
    min-height: 100px;
}

.games-card-icon img {
    max-height: 60px;
    max-width: 100%;
}

.games-card-icon.games-card-cover {
    padding: 0;
    min-height: 0;
    height: 150px;
    overflow: hidden;
    background: #1a1a2e;
}

.games-card-icon.games-card-cover img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.games-card .caption {
    padding: 15px;
}

.games-card .caption h4 {
    margin-top: 0;
    font-size: 16px;
}

.games-card .caption p {
    font-size: 13px;
    color: #666;
    min-height: 40px;
}

/* Game play page � compact hero */
.games-play-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 14px 0 16px;
    margin-bottom: 0;
}

.games-play-hero .games-landing-hero-bg {
    position: absolute;
    inset: 0;
    background-size: 200% 200%;
    animation: gamesLandingGradient 8s ease infinite;
    z-index: 0;
}

.games-play-hero.games-landing-hero-seo .games-landing-hero-bg {
    background: linear-gradient(135deg, #0d2137 0%, #1a5276 35%, #148f77 65%, #1e8449 100%);
}

.games-play-hero.games-landing-hero-casual .games-landing-hero-bg {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 35%, #0f3460 65%, #533483 100%);
}

.games-play-hero-inner {
    position: relative;
    z-index: 1;
}

.games-play-breadcrumb {
    margin-bottom: 10px;
    font-size: 12px;
    opacity: 0.85;
}

.games-play-breadcrumb a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.games-play-breadcrumb a:hover {
    color: #fff;
    text-decoration: underline;
}

.games-play-breadcrumb-sep {
    margin: 0 5px;
    opacity: 0.5;
}

.games-play-hero-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.games-play-hero-main {
    flex: 1;
    min-width: 180px;
}

.games-play-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 4px;
    line-height: 1.2;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
}

.games-play-tagline {
    font-size: 13px;
    opacity: 0.85;
    margin: 0;
    line-height: 1.4;
    max-width: 520px;
}

.game-play-best-score-hero {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 8px 16px;
    text-align: center;
    backdrop-filter: blur(4px);
}

.game-play-best-score-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    color: rgba(255, 255, 255, 0.8);
}

.game-play-best-score-label i {
    color: #58d68d;
    margin-right: 3px;
}

.game-play-best-score-hero .games-high-score {
    font-size: 28px;
    line-height: 1;
    color: #fff;
    font-weight: bold;
}

.games-play-hero-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.games-play-nav-link {
    display: inline-block;
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 16px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background 0.2s;
}

.games-play-nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.game-play-page.games-landing-body {
    padding-top: 20px;
}

.game-play-stage {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    scroll-margin-top: 20px;
}

.games-landing-accent-seo.game-play-stage {
    border-color: rgba(20, 143, 119, 0.25);
}

.games-landing-accent-casual.game-play-stage {
    border-color: rgba(83, 52, 131, 0.25);
}

.game-about-block-head h3 i.games-landing-accent-seo {
    color: #148f77;
}

.game-about-block-head h3 i.games-landing-accent-casual {
    color: #533483;
}

.game-play-page .game-canvas-wrap {
    background: #fff;
    border: none;
    border-radius: 0;
    padding: 24px;
    min-height: 200px;
}

.game-play-page .game-canvas-wrap-iframe {
    padding: 0;
    min-height: 0;
}

.game-play-related {
    background: #fff;
    border-radius: 12px;
    padding: 22px 22px 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #eee;
}

.game-play-related-head {
    margin-bottom: 18px;
}

.game-play-related-head h3 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
}

.game-play-related-head p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.games-play-related-cards {
    margin-bottom: 0;
}

.games-play-related-cards .games-landing-card {
    margin-bottom: 16px;
}

.game-play-stage-iframe {
    background: #0f0f14;
}

.game-iframe-wrap {
    position: relative;
    width: 100%;
    background: #0f0f14;
}

.game-iframe-wrap:fullscreen,
.game-iframe-wrap:-webkit-full-screen {
    width: 100%;
    height: 100%;
    background: #000;
}

.game-iframe-wrap:fullscreen .game-iframe,
.game-iframe-wrap:-webkit-full-screen .game-iframe {
    height: 100% !important;
}

.game-iframe-fullscreen-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    line-height: 40px;
    text-align: center;
    transition: background 0.2s ease;
}

.game-iframe-fullscreen-btn:hover,
.game-iframe-fullscreen-btn:focus {
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    outline: none;
}

.game-iframe {
    display: block;
    width: 100%;
    border: 0;
    background: #000;
}

@media (max-width: 767px) {
    .game-iframe-wrap .game-iframe {
        height: auto !important;
        aspect-ratio: var(--game-iframe-aspect, 960 / 600);
    }
}

.game-about-block {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #eee;
}

.game-about-block-head {
    background: #f8f8f8;
    padding: 16px 22px;
    border-bottom: 1px solid #eee;
}

.game-about-block-head h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.game-about-block-head h3 i {
    margin-right: 8px;
}

.game-about-block .game-about {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 22px;
    margin: 0;
}

.games-high-score {
    font-size: 36px;
    font-weight: bold;
    color: #32bea6;
}

.games-cta-panel .panel-body p {
    font-size: 13px;
}

.games-tool-links ul li {
    margin-bottom: 8px;
}

.games-tool-links a {
    color: #32bea6;
}

/* SEO Quiz */
.seo-quiz-game .quiz-progress {
    margin-bottom: 20px;
    font-weight: bold;
    color: #555;
}

.seo-quiz-game .quiz-question {
    font-size: 18px;
    margin-bottom: 20px;
}

.seo-quiz-game .quiz-options .btn {
    display: block;
    width: 100%;
    text-align: left;
    margin-bottom: 10px;
    white-space: normal;
}

.seo-quiz-game .quiz-result {
    text-align: center;
    padding: 20px;
}

.seo-quiz-game .quiz-score {
    font-size: 48px;
    font-weight: bold;
    color: #32bea6;
}

/* Keyword Memory */
.memory-game {
    max-width: 600px;
    margin: 0 auto;
}

.memory-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.memory-card {
    width: calc(25% - 10px);
    min-width: 100px;
    aspect-ratio: 1;
    background: #32bea6;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    user-select: none;
    transition: transform 0.2s;
}

.memory-card.flipped,
.memory-card.matched {
    background: #fff;
    color: #333;
    border: 2px solid #32bea6;
}

.memory-card .card-back {
    font-size: 24px;
}

.memory-stats {
    text-align: center;
    margin-bottom: 15px;
}

/* Rank Guess */
.rank-guess-game .site-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.rank-guess-game .site-card:hover {
    border-color: #32bea6;
}

.rank-guess-game .site-card.selected-correct {
    border-color: #5cb85c;
    background: #f0fff0;
}

.rank-guess-game .site-card.selected-wrong {
    border-color: #d9534f;
    background: #fff0f0;
}

.rank-guess-game .stat-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

/* Game layout with sidebar (play pages) */
.game-layout-with-sidebar {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

.game-layout-main {
    flex: 1;
    min-width: 0;
}

.game-layout-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 15px;
}

.game-guide-panel {
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(83, 52, 131, 0.08);
}

.game-guide-panel-head {
    background: linear-gradient(135deg, #533483, #0f3460);
    color: #fff;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 700;
}

.game-guide-panel-head i {
    margin-right: 8px;
}

.game-guide-section {
    padding: 14px 18px;
    border-bottom: 1px solid #eef0f3;
}

.game-guide-section-last {
    border-bottom: none;
}

.game-guide-section h5 {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    color: #333;
}

.game-guide-section h5 i {
    color: #533483;
    margin-right: 5px;
    font-size: 12px;
}

.game-guide-card {
    background: #f8f9fb;
    border: 1px solid #e8ecf0;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 14px;
}

.game-guide-card:last-child {
    margin-bottom: 0;
}

.game-guide-card h4 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.game-guide-card h4 i {
    color: #533483;
    margin-right: 6px;
}

.game-guide-steps {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}

.game-guide-steps li {
    margin-bottom: 6px;
}

.game-guide-steps li:last-child {
    margin-bottom: 0;
}

.game-guide-controls {
    list-style: none;
    padding: 0;
    margin: 0;
}

.game-guide-controls li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #555;
    margin-bottom: 10px;
}

.game-guide-controls li:last-child {
    margin-bottom: 0;
}

.game-key-group {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
}

.game-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 11px;
    font-family: inherit;
    box-shadow: 0 2px 0 #ddd;
    padding: 0 4px;
    color: #533483;
}

.game-key-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #533483, #0f3460);
    color: #fff;
    border-radius: 6px;
    font-size: 12px;
    flex-shrink: 0;
}

.game-guide-tips {
    list-style: none;
    padding: 0;
    margin: 0;
}

.game-guide-tips li {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 8px;
    padding-left: 2px;
}

.game-guide-tips li i {
    color: #32bea6;
    margin-right: 6px;
    font-size: 11px;
}

.game-guide-tips li:last-child {
    margin-bottom: 0;
}

.game-guide-legend-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.game-guide-legend-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
}

.game-guide-legend-list li:last-child {
    margin-bottom: 0;
}

.snake-legend-swatch {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    flex-shrink: 0;
}

.snake-legend-head {
    background: #5dffc0;
}

.snake-legend-body {
    background: #32bea6;
}

.snake-legend-food {
    background: #ff6b6b;
    border-radius: 6px;
}

/* Snake */
.snake-game-layout {
    max-width: 100%;
}

.snake-game-wrap {
    max-width: none;
    margin: 0;
}

.snake-game-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.snake-score-box {
    background: linear-gradient(135deg, #533483, #0f3460);
    color: #fff;
    border-radius: 8px;
    padding: 8px 18px;
    text-align: center;
    min-width: 80px;
}

.snake-score-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.85;
}

.snake-score-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.1;
}

.snake-btn-start {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #32bea6, #2a9d8a);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 3px 12px rgba(50, 190, 166, 0.35);
}

.snake-btn-start:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(50, 190, 166, 0.45);
}

.snake-board-wrap {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(83, 52, 131, 0.2);
    border: 3px solid #533483;
    line-height: 0;
}

#snake-canvas {
    display: block;
    width: 100%;
    height: auto;
    background: #0d1117;
    touch-action: none;
    outline: none;
}

.snake-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 17, 23, 0.82);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
    pointer-events: none;
}

.snake-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.snake-overlay-inner {
    text-align: center;
    padding: 24px;
    color: #fff;
}

.snake-overlay-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px;
}

.snake-overlay-msg {
    font-size: 14px;
    opacity: 0.85;
    margin: 0 0 18px;
    line-height: 1.5;
}

.snake-overlay-btn {
    margin: 0 auto;
}

.snake-controls {
    margin-top: 18px;
    display: flex;
    justify-content: center;
}

.snake-dpad {
    display: inline-grid;
    grid-template-columns: 56px 56px 56px;
    grid-template-rows: 56px 56px 56px;
    gap: 6px;
}

.snake-dpad-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    font-size: 18px;
    background: linear-gradient(180deg, #f8f8f8 0%, #ececec 100%);
    border: 2px solid #ddd;
    border-radius: 10px;
    color: #533483;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, border-color 0.15s;
    padding: 0;
}

.snake-dpad-btn:hover {
    background: linear-gradient(180deg, #fff 0%, #f0f0f0 100%);
    border-color: #533483;
}

.snake-dpad-btn:active {
    transform: scale(0.94);
    background: #e8e8e8;
}

.snake-dpad-empty {
    visibility: hidden;
}

.snake-game-layout .game-layout-main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.snake-game-toolbar {
    width: 100%;
    max-width: 440px;
}

.snake-board-wrap {
    width: 100%;
    max-width: 440px;
}

.snake-controls {
    width: 100%;
    max-width: 440px;
}

@media (max-width: 767px) {
    .game-layout-with-sidebar {
        flex-direction: column;
    }

    .game-layout-sidebar {
        width: 100%;
        position: static;
    }

    .snake-game-layout .game-layout-main {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .snake-game-toolbar {
        justify-content: center;
    }

    .snake-dpad {
        grid-template-columns: 52px 52px 52px;
        grid-template-rows: 52px 52px 52px;
    }

    .snake-dpad-btn {
        width: 52px;
        height: 52px;
    }
}

/* 2048 */
.game-2048-layout .game-layout-main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-2048-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    width: 100%;
    max-width: 440px;
}

.game-2048-best-box {
    background: linear-gradient(135deg, #148f77, #1a5276) !important;
}

.game-2048-board-wrap {
    position: relative;
    width: 100%;
    max-width: 440px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(83, 52, 131, 0.2);
    border: 3px solid #533483;
    line-height: 0;
}

.game-2048-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    background: #bbada0;
    padding: 10px;
    touch-action: none;
    line-height: normal;
}

.game-2048-cell {
    aspect-ratio: 1;
    background: #cdc1b4;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #776e65;
    transition: transform 0.1s ease, background-color 0.15s ease;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.game-2048-cell.tile-2 { background: #eee4da; color: #776e65; }
.game-2048-cell.tile-4 { background: #ede0c8; color: #776e65; }
.game-2048-cell.tile-8 { background: #f2b179; color: #fff; }
.game-2048-cell.tile-16 { background: #f59563; color: #fff; }
.game-2048-cell.tile-32 { background: #f67c5f; color: #fff; }
.game-2048-cell.tile-64 { background: #f65e3b; color: #fff; }
.game-2048-cell.tile-128 { background: #edcf72; color: #fff; font-size: 24px; }
.game-2048-cell.tile-256 { background: #edcc61; color: #fff; font-size: 24px; }
.game-2048-cell.tile-512 { background: #edc850; color: #fff; font-size: 22px; }
.game-2048-cell.tile-1024 { background: #edc53f; color: #fff; font-size: 20px; }
.game-2048-cell.tile-2048 { background: #edc22e; color: #fff; font-size: 20px; box-shadow: 0 0 12px rgba(237, 194, 46, 0.6); }
.game-2048-cell.tile-4096 { background: #3c3a32; color: #fff; font-size: 18px; }
.game-2048-cell.tile-8192 { background: #3c3a32; color: #fff; font-size: 16px; }

.game-2048-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(187, 173, 160, 0.88);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
    pointer-events: none;
    line-height: normal;
}

.game-2048-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.game-2048-overlay-inner {
    text-align: center;
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    max-width: 280px;
    margin: 16px;
}

.game-2048-overlay-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #533483;
}

.game-2048-overlay-msg {
    font-size: 14px;
    color: #666;
    margin: 0 0 18px;
    line-height: 1.5;
}

.game-2048-overlay-btn {
    margin: 0 auto;
}

.game-2048-controls {
    width: 100%;
    max-width: 440px;
}

.game-2048-legend .game-2048-legend-swatch {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.game-2048-legend .game-2048-legend-swatch.tile-2 {
    background: #eee4da;
    color: #776e65;
}

.game-2048-legend .game-2048-legend-swatch.tile-64 {
    background: #f65e3b;
    color: #fff;
}

.game-2048-legend .game-2048-legend-swatch.tile-2048 {
    background: #edc22e;
    color: #fff;
}

@media (max-width: 480px) {
    .game-2048-cell {
        font-size: 22px;
    }

    .game-2048-cell.tile-128,
    .game-2048-cell.tile-256 {
        font-size: 18px;
    }

    .game-2048-cell.tile-512,
    .game-2048-cell.tile-1024,
    .game-2048-cell.tile-2048 {
        font-size: 15px;
    }

    .game-2048-toolbar {
        justify-content: center;
    }
}

@media (max-width: 767px) {
    .memory-card {
        width: calc(33.33% - 10px);
        min-width: 80px;
        font-size: 10px;
    }
    .games-category-card {
        min-height: auto;
    }
}

/* Homepage teaser */
.games-home-teaser {
    background: #f8f8f8;
    border-radius: 6px;
    padding: 25px;
    margin-top: 30px;
    text-align: center;
}

.games-home-teaser h3 {
    margin-top: 0;
}

/* Games category landing pages */
.games-landing-hero {
    position: relative;
    overflow: hidden;
    padding: 70px 0 60px;
    margin-bottom: 0;
    color: #fff;
}

.games-landing-hero-bg {
    position: absolute;
    inset: 0;
    background-size: 200% 200%;
    animation: gamesLandingGradient 8s ease infinite;
    z-index: 0;
}

.games-landing-hero-casual .games-landing-hero-bg {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 35%, #0f3460 65%, #533483 100%);
}

.games-landing-hero-seo .games-landing-hero-bg {
    background: linear-gradient(135deg, #0d2137 0%, #1a5276 35%, #148f77 65%, #1e8449 100%);
}

@keyframes gamesLandingGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.games-landing-hero-particles {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.games-landing-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    animation: gamesLandingFloat 6s ease-in-out infinite;
}

.games-landing-particle:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.games-landing-particle:nth-child(2) { top: 60%; left: 85%; animation-delay: 1s; width: 8px; height: 8px; }
.games-landing-particle:nth-child(3) { top: 80%; left: 20%; animation-delay: 2s; }
.games-landing-particle:nth-child(4) { top: 30%; left: 70%; animation-delay: 0.5s; width: 4px; height: 4px; }
.games-landing-particle:nth-child(5) { top: 45%; left: 40%; animation-delay: 1.5s; }
.games-landing-particle:nth-child(6) { top: 15%; left: 55%; animation-delay: 2.5s; width: 10px; height: 10px; }

@keyframes gamesLandingFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.4; }
    50% { transform: translateY(-20px) scale(1.2); opacity: 0.8; }
}

.games-landing-hero-inner {
    position: relative;
    z-index: 2;
}

.games-landing-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    backdrop-filter: blur(4px);
}

.games-landing-title {
    font-size: 48px;
    font-weight: 800;
    margin: 0 0 15px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
}

.games-landing-tagline {
    font-size: 18px;
    opacity: 0.9;
    max-width: 560px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.games-landing-hero-actions {
    margin-bottom: 25px;
}

.games-landing-cta-primary {
    border: none;
    color: #fff;
    padding: 14px 32px;
    font-weight: 700;
    border-radius: 30px;
    margin-right: 10px;
    margin-bottom: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.games-landing-accent-casual.games-landing-cta-primary {
    background: linear-gradient(135deg, #32bea6, #2a9d8a);
    box-shadow: 0 4px 20px rgba(50, 190, 166, 0.4);
}

.games-landing-accent-seo.games-landing-cta-primary {
    background: linear-gradient(135deg, #148f77, #1e8449);
    box-shadow: 0 4px 20px rgba(20, 143, 119, 0.4);
}

.games-landing-cta-primary:hover,
.games-landing-cta-primary:focus {
    color: #fff;
    transform: translateY(-2px);
}

.games-landing-accent-casual.games-landing-cta-primary:hover,
.games-landing-accent-casual.games-landing-cta-primary:focus {
    box-shadow: 0 6px 28px rgba(50, 190, 166, 0.55);
}

.games-landing-accent-seo.games-landing-cta-primary:hover,
.games-landing-accent-seo.games-landing-cta-primary:focus {
    box-shadow: 0 6px 28px rgba(20, 143, 119, 0.55);
}

.games-landing-cta-secondary {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    padding: 12px 28px;
    font-weight: 600;
    border-radius: 30px;
    margin-right: 8px;
    margin-bottom: 8px;
    transition: background 0.2s, border-color 0.2s;
}

.games-landing-cta-secondary:hover,
.games-landing-cta-secondary:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    color: #fff;
}

.games-landing-perks {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    opacity: 0.85;
}

.games-landing-hero-casual .games-landing-perks li i {
    color: #32bea6;
    margin-right: 5px;
}

.games-landing-hero-seo .games-landing-perks li i {
    color: #58d68d;
    margin-right: 5px;
}

.games-landing-body {
    padding: 30px 15px 50px;
}

.games-landing-banner-ad {
    margin-bottom: 30px;
}

.games-landing-section-head {
    text-align: center;
    margin-bottom: 30px;
}

.games-landing-section-head h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px;
}

.games-landing-section-head h2 i {
    margin-right: 8px;
}

.games-landing-section-head h2 i.games-landing-accent-casual {
    color: #533483;
}

.games-landing-section-head h2 i.games-landing-accent-seo {
    color: #148f77;
}

.games-landing-section-head p {
    color: #777;
    font-size: 16px;
}

.games-landing-card {
    position: relative;
    display: block;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 25px;
    color: #333;
    text-decoration: none !important;
    border: 2px solid transparent;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.games-landing-accent-casual.games-landing-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 35px rgba(83, 52, 131, 0.2);
    border-color: #533483;
    color: #333;
}

.games-landing-accent-seo.games-landing-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 35px rgba(20, 143, 119, 0.2);
    border-color: #148f77;
    color: #333;
}

.games-landing-card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.games-landing-accent-casual .games-landing-card-glow {
    background: radial-gradient(circle, rgba(83, 52, 131, 0.08) 0%, transparent 70%);
}

.games-landing-accent-seo .games-landing-card-glow {
    background: radial-gradient(circle, rgba(20, 143, 119, 0.08) 0%, transparent 70%);
}

.games-landing-card:hover .games-landing-card-glow {
    opacity: 1;
}

.games-landing-card-icon {
    text-align: center;
    padding: 35px 20px;
    font-size: 48px;
    color: #fff;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.games-landing-accent-casual .games-landing-card-icon {
    background: linear-gradient(135deg, #533483 0%, #0f3460 100%);
}

.games-landing-accent-seo .games-landing-card-icon {
    background: linear-gradient(135deg, #148f77 0%, #1a5276 100%);
}

.games-landing-card-icon img {
    max-height: 70px;
    max-width: 100%;
}

.games-landing-card-icon.games-landing-card-cover {
    position: relative;
    padding: 0;
    min-height: 0;
    height: 170px;
    overflow: hidden;
    background: #1a1a2e;
}

.games-landing-card-icon.games-landing-card-cover::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 45%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.18) 100%);
    pointer-events: none;
}

.games-landing-card-icon.games-landing-card-cover img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.35s ease;
}

.games-landing-card:hover .games-landing-card-cover img {
    transform: scale(1.04);
}

.games-landing-card-body {
    padding: 20px;
}

.games-landing-card-body h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
}

.games-landing-card-body p {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
    min-height: 38px;
}

.games-landing-card-btn {
    display: inline-block;
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}

.games-landing-accent-casual .games-landing-card-btn {
    background: linear-gradient(135deg, #32bea6, #2a9d8a);
}

.games-landing-accent-seo .games-landing-card-btn {
    background: linear-gradient(135deg, #148f77, #1e8449);
}

.games-landing-accent-casual.games-landing-card:hover .games-landing-card-btn {
    background: linear-gradient(135deg, #533483, #0f3460);
}

.games-landing-accent-seo.games-landing-card:hover .games-landing-card-btn {
    background: linear-gradient(135deg, #1a5276, #0d2137);
}

.games-landing-features {
    margin-top: 40px;
    padding: 30px 0;
    border-top: 1px solid #eee;
}

.games-landing-feature {
    text-align: center;
    padding: 15px;
}

.games-landing-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
    margin-bottom: 12px;
}

.games-landing-accent-casual.games-landing-feature-icon {
    background: linear-gradient(135deg, #533483, #0f3460);
}

.games-landing-accent-seo.games-landing-feature-icon {
    background: linear-gradient(135deg, #148f77, #1a5276);
}

.games-landing-feature h4 {
    font-weight: 700;
    margin-bottom: 8px;
}

.games-landing-feature p {
    font-size: 13px;
    color: #777;
    line-height: 1.5;
}

.games-landing-sidebar-panel {
    border-radius: 8px;
    overflow: hidden;
}

.games-landing-bottom-ad {
    text-align: center;
}

/* Games hub landing */
.games-landing-hero-hub .games-landing-hero-bg {
    background: linear-gradient(135deg, #1a1a2e 0%, #533483 25%, #148f77 55%, #0f3460 80%, #1a5276 100%);
}

.games-landing-accent-hub.games-landing-cta-primary {
    background: linear-gradient(135deg, #32bea6, #148f77);
    box-shadow: 0 4px 20px rgba(50, 190, 166, 0.4);
}

.games-landing-accent-hub.games-landing-cta-primary:hover,
.games-landing-accent-hub.games-landing-cta-primary:focus {
    box-shadow: 0 6px 28px rgba(50, 190, 166, 0.55);
}

.games-landing-perks-hub li i {
    color: #58d68d;
    margin-right: 5px;
}

.games-landing-section-head h2 i.games-landing-accent-hub {
    color: #32bea6;
}

.games-landing-accent-hub.games-landing-feature-icon {
    background: linear-gradient(135deg, #32bea6, #533483);
}

.games-hub-category-cards {
    margin-bottom: 10px;
}

.games-hub-category-card {
    position: relative;
    display: block;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    padding: 35px 30px;
    margin-bottom: 25px;
    text-align: center;
    color: #333;
    text-decoration: none !important;
    border: 2px solid transparent;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    min-height: 320px;
}

.games-hub-category-card:hover {
    transform: translateY(-6px);
    color: #333;
}

.games-landing-accent-seo.games-hub-category-card:hover {
    box-shadow: 0 12px 35px rgba(20, 143, 119, 0.2);
    border-color: #148f77;
}

.games-landing-accent-casual.games-hub-category-card:hover {
    box-shadow: 0 12px 35px rgba(83, 52, 131, 0.2);
    border-color: #533483;
}

.games-hub-category-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.games-landing-accent-seo .games-hub-category-glow {
    background: radial-gradient(circle, rgba(20, 143, 119, 0.08) 0%, transparent 70%);
}

.games-landing-accent-casual .games-hub-category-glow {
    background: radial-gradient(circle, rgba(83, 52, 131, 0.08) 0%, transparent 70%);
}

.games-hub-category-card:hover .games-hub-category-glow {
    opacity: 1;
}

.games-hub-category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    font-size: 32px;
    color: #fff;
    margin-bottom: 18px;
}

.games-landing-accent-seo .games-hub-category-icon {
    background: linear-gradient(135deg, #148f77, #1a5276);
}

.games-landing-accent-casual .games-hub-category-icon {
    background: linear-gradient(135deg, #533483, #0f3460);
}

.games-hub-category-card h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px;
}

.games-hub-category-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    min-height: 66px;
}

.games-hub-category-count {
    display: block;
    color: #999;
    font-size: 13px;
    margin-bottom: 18px;
}

.games-hub-popular {
    margin-top: 20px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.games-hub-group-title {
    font-size: 20px;
    font-weight: 700;
    margin: 25px 0 20px;
}

.games-hub-group-title i {
    margin-right: 8px;
}

@media (max-width: 767px) {
    .games-landing-title {
        font-size: 32px;
    }

    .games-landing-tagline {
        font-size: 16px;
    }

    .games-landing-cta-primary,
    .games-landing-cta-secondary {
        display: block;
        width: 100%;
        margin: 0 0 10px;
    }

    .games-landing-perks {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .games-hub-category-card {
        min-height: auto;
    }

    .games-play-hero-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .games-play-hero-nav {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
    }

    .games-play-title {
        font-size: 22px;
    }

    .games-landing-hero {
        padding: 50px 0 40px;
    }
}
