/*
Theme Name: Max777Games
Theme URI: https://max777games.com/
Author: Max777Games
Description: Clean multi-game classic WordPress theme with game cards, individual game pages and mobile sticky play buttons.
Version: 1.0.0
Text Domain: max777games
*/

:root {
    --purple: #6d28d9;
    --purple-dark: #5b21b6;
    --purple-soft: #ede9fe;
    --header: #6d28d9;
    --dark: #172033;
    --text: #172033;
    --muted: #64748b;
    --bg: #f6f7fb;
    --white: #ffffff;
    --border: #e2e8f0;
    --green: #08a866;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1100px, calc(100% - 40px));
    margin-inline: auto;
}

/* Header */
.site-header {
    background: var(--header);
    color: #fff;
}

.header-inner {
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 28px;
    font-weight: 800;
}

.site-logo img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 12px;
}

.primary-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 0;
    padding: 0;
}

.primary-nav a {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
}

.primary-nav a:hover {
    color: #ede9fe;
}

.header-button,
.hero-button-primary,
.hero-button-secondary,
.games-view-all,
.game-download-button,
.game-play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 22px;
    border-radius: 9px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    transition: .2s ease;
}

.header-button,
.hero-button-primary,
.games-view-all,
.game-download-button,
.game-play-button {
    background: var(--purple);
    color: #fff !important;
}

.header-button:hover,
.hero-button-primary:hover,
.games-view-all:hover,
.game-download-button:hover,
.game-play-button:hover {
    background: var(--purple-dark);
    color: #fff !important;
    transform: translateY(-1px);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Home hero */
.home-hero {
    padding: 78px 0 64px;
    background: #fff;
}

.home-hero-grid {
    display: grid;
    grid-template-columns: 1fr .9fr;
    gap: 60px;
    align-items: center;
}

.home-eyebrow {
    margin: 0 0 12px;
    color: var(--purple);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.home-hero h1 {
    margin: 0 0 20px;
    color: var(--dark);
    font-size: clamp(46px, 6vw, 72px);
    line-height: 1.0;
    letter-spacing: -0.03em;
}

.home-hero h1 span {
    color: var(--purple);
}

.home-hero p {
    max-width: 620px;
    margin: 0 0 28px;
    color: #475569;
    font-size: 18px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-button-secondary {
    border: 2px solid var(--purple);
    background: #fff;
    color: var(--purple) !important;
}

.hero-button-secondary:hover {
    background: var(--purple-soft);
}

.hero-visual {
    display: flex;
    justify-content: center;
}

.hero-visual img {
    width: min(430px, 100%);
    border-radius: 24px;
}

/* Home stats */
.home-stats {
    padding: 0 0 55px;
    background: #fff;
}

.stats-box {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
    border-radius: 16px;
    background: #111827;
    color: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .12);
}

.stat-item {
    padding: 16px 6px;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,.12);
}

.stat-item:last-child {
    border-right: 0;
}

.stat-value {
    display: block;
    color: #c4b5fd;
    font-size: 17px;
    font-weight: 800;
}

.stat-label {
    display: block;
    color: #cbd5e1;
    font-size: 10px;
    white-space: nowrap;
    
}

/* Game listing */
.games-section {
    padding: 62px 0;
    background: var(--bg);
}

.games-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.games-section-header h2 {
    margin: 0 0 6px;
    font-size: 34px;
    line-height: 1.2;
}

.games-section-header p {
    margin: 0;
    color: var(--muted);
}

.games-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.game-list-card {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr) 140px;
    align-items: center;
    gap: 20px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(15,23,42,.03);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.game-list-card:hover {
    border-color: #c4b5fd;
    box-shadow: 0 10px 24px rgba(15,23,42,.07);
    transform: translateY(-1px);
}

.game-card-main {
    grid-column: 1 / 3;
    min-width: 0;
    display: grid;
    grid-template-columns: 86px minmax(0,1fr);
    gap: 18px;
    align-items: center;
    color: inherit !important;
}

.game-card-image-wrap {
    width: 86px;
    height: 86px;
    overflow: hidden;
    border-radius: 17px;
    background: #eef2ff;
}

.game-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-card-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: var(--purple-soft);
    color: var(--purple);
    font-size: 30px;
    font-weight: 800;
}

.game-card-title {
    margin: 0 0 7px;
    color: #111827;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.25;
}

.game-card-description {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.game-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
}

.game-meta-item {
    color: var(--muted);
    font-size: 13px;
}

.game-card-action {
    grid-column: 3;
    display: flex;
    justify-content: flex-end;
}

.game-download-button {
    width: 140px;
    min-height: 46px;
    gap: 8px;
}

.download-arrow {
    font-size: 17px;
}

/* Single game */
.game-single-hero {
    padding: 58px 0;
    background: #fff;
}

.game-single-grid {
    display: grid;
    grid-template-columns: minmax(280px, 480px) minmax(0, 1fr);
    gap: 52px;
    align-items: center;
}

.game-single-image img {
    width: 100%;
    max-height: 440px;
    object-fit: cover;
    border-radius: 20px;
}

.game-single-label {
    display: inline-block;
    margin-bottom: 10px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--purple-soft);
    color: var(--purple-dark);
    font-size: 12px;
    font-weight: 800;
}

.game-single-info h1 {
    margin: 0 0 15px;
    font-size: clamp(38px, 5vw, 58px);
    line-height: 1.05;
}

.game-single-info p {
    margin: 0 0 22px;
    color: #64748b;
    font-size: 17px;
}

.game-content-section {
    padding: 55px 0;
}

.game-content-box {
    max-width: 850px;
    margin-inline: auto;
    padding: 34px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
}

.game-content-box h2 {
    margin-top: 0;
}

.game-content-box p,
.game-content-box li {
    color: #475569;
}

.game-action-section {
    padding: 0 0 55px;
}

.game-action-box {
    max-width: 850px;
    margin-inline: auto;
    padding: 35px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
}

.game-action-box h2 {
    margin: 0 0 8px;
}

.game-action-box p {
    margin: 0 0 20px;
    color: var(--muted);
}

/* Footer */
.site-footer {
    padding: 38px 0;
    background: #111827;
    color: #fff;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
}

.site-footer h2 {
    margin-top: 0;
    font-size: 17px;
}

.site-footer p,
.site-footer a {
    color: #cbd5e1;
    font-size: 14px;
}

.footer-bottom {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,.12);
    color: #94a3b8;
    font-size: 13px;
}

/* Mobile sticky */
.mobile-game-sticky {
    display: none;
}

/* Responsive */
@media (max-width: 900px) {
    .primary-nav {
        display: none;
    }

    .home-hero-grid,
    .game-single-grid {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        order: -1;
    }

    .stats-box {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-item:nth-child(2) {
        border-right: 0;
    }

    .stat-item:nth-child(-n+2) {
        border-bottom: 1px solid rgba(255,255,255,.12);
    }
}

@media (max-width: 700px) {
    .hero-visual {
    display: none !important;
    }

    .home-hero-grid {
    display: block;
    }
    .container {
        width: min(100% - 24px, 1100px);
    }

    .header-inner {
        min-height: 68px;
    }

    .site-logo {
        font-size: 21px;
    }

    .site-logo img {
        width: 44px;
        height: 44px;
    }

    .header-button {
        min-height: 40px;
        padding: 9px 13px;
        font-size: 13px;
    }

    .home-hero {
        padding: 52px 0 42px;
    }

    .home-hero h1 {
        font-size: 42px;
    }

    .home-hero p {
        font-size: 15px;
    }

    .home-stats {
        padding-bottom: 35px;
    }

    .games-section {
        padding: 42px 0;
    }

    .games-section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .games-section-header h2 {
        font-size: 28px;
    }

    .game-list-card {
        grid-template-columns: 68px minmax(0,1fr);
        gap: 12px;
        padding: 12px;
    }

    .game-card-main {
        grid-column: 1 / -1;
        grid-template-columns: 68px minmax(0,1fr);
        gap: 12px;
    }

    .game-card-image-wrap {
        width: 68px;
        height: 68px;
        border-radius: 14px;
    }

    .game-card-title {
        font-size: 17px;
    }

    .game-card-description {
        font-size: 12px;
    }

    .game-card-meta {
        gap: 6px 10px;
    }

    .game-meta-item {
        font-size: 11px;
    }

    .game-card-action {
        grid-column: 1 / -1;
    }

    .game-download-button {
        width: 100%;
    }

    .game-single-hero {
        padding: 38px 0;
    }

    .game-single-info h1 {
        font-size: 38px;
    }

    .game-content-box,
    .game-action-box {
        padding: 24px 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .mobile-game-sticky {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 99999;
        display: block;
        padding: 9px 12px;
        background: rgba(17,24,39,.97);
        box-shadow: 0 -4px 18px rgba(0,0,0,.16);
    }

    .mobile-game-sticky-button {
        width: 100%;
        min-height: 48px;
        padding: 12px 20px;
        border-radius: 25px;
        background: #ff1744;
        color: #fff !important;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 800;
    }

    body.has-mobile-sticky {
        padding-bottom: 70px;
    }
}
@media (max-width: 420px) {

    .stats-box {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .stat-item {
        padding: 14px 3px;
    }

    .stat-value {
        font-size: 15px;
    }

    .stat-label {
        font-size: 9px;
        white-space: nowrap;
    }
}
/* =========================================================
   BLOG SYSTEM
   ========================================================= */

.blog-hero,
.single-post-hero {
	padding: 70px 0 55px;
	background: linear-gradient(135deg, #f7f3ff, #ffffff);
	border-bottom: 1px solid #eee;
}

.blog-eyebrow {
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 1.5px;
	color: #7c3aed;
}

.blog-hero h1,
.single-post-hero h1 {
	margin: 0;
	color: #171225;
	font-size: clamp(34px, 5vw, 56px);
	line-height: 1.08;
}

.blog-hero p:not(.blog-eyebrow) {
	max-width: 700px;
	margin: 18px 0 0;
	color: #666;
	font-size: 17px;
	line-height: 1.7;
}


/* Blog cards */

.blog-section {
	padding: 60px 0;
}

.blog-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 26px;
}

.blog-card {
	overflow: hidden;
	background: #fff;
	border: 1px solid #e8e5ef;
	border-radius: 18px;
	box-shadow: 0 8px 25px rgba(30, 20, 60, 0.06);
}

.blog-card-image {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #f4f1fa;
}

.blog-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.blog-card-placeholder {
	width: 100%;
	height: 100%;
	display: grid;
	place-items: center;
	font-size: 55px;
}

.blog-card-content {
	padding: 22px;
}

.blog-card-date {
	margin-bottom: 9px;
	font-size: 12px;
	font-weight: 700;
	color: #8a8495;
}

.blog-card h2 {
	margin: 0 0 12px;
	font-size: 21px;
	line-height: 1.3;
}

.blog-card h2 a {
	color: #181323;
	text-decoration: none;
}

.blog-card h2 a:hover {
	color: #7c3aed;
}

.blog-card-content p {
	margin: 0 0 18px;
	color: #666;
	line-height: 1.65;
}

.blog-read-more {
	color: #7c3aed;
	font-weight: 700;
	text-decoration: none;
}


/* Single article */

.single-post-date {
	margin: 15px 0 8px;
	color: #777;
	font-size: 14px;
}

.single-post-image {
	max-width: 1000px;
	margin: 35px auto 0;
}

.single-post-image img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 18px;
}

.single-post-content {
	padding: 50px 0 70px;
}

.article-content {
	max-width: 820px;
	margin: 0 auto;
	color: #292532;
	font-size: 17px;
	line-height: 1.8;
}

.article-content h2 {
	margin-top: 42px;
	margin-bottom: 15px;
	font-size: 30px;
	line-height: 1.25;
}

.article-content h3 {
	margin-top: 32px;
	margin-bottom: 12px;
	font-size: 23px;
}

.article-content img {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
}

.article-content a {
	color: #7c3aed;
	font-weight: 600;
}


/* Pagination */

.blog-pagination {
	margin-top: 45px;
	text-align: center;
}

.blog-pagination .nav-links {
	display: flex;
	justify-content: center;
	gap: 10px;
	flex-wrap: wrap;
}

.blog-pagination a,
.blog-pagination span {
	padding: 9px 14px;
	border: 1px solid #ddd;
	border-radius: 8px;
	text-decoration: none;
}

.blog-empty {
	padding: 60px 20px;
	text-align: center;
}


/* Mobile */

@media (max-width: 767px) {

	.blog-hero,
	.single-post-hero {
		padding: 45px 0 35px;
	}

	.blog-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.blog-section {
		padding: 40px 0;
	}

	.single-post-content {
		padding: 35px 0 50px;
	}

	.article-content {
		font-size: 16px;
	}

	.blog-card-content {
		padding: 18px;
	}

}