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

:root {
    --primary-bg: #1a1a2e;
    --secondary-bg: #16213e;
    --card-bg: #0f3460;
    --accent-color: #e94560;
    --text-color: #e0e0e0;
    --highlight-color: #53bf9d;
    --highlight-color-rgb: 83, 191, 157;
    --star-color: #f39c12;
    --border-radius: 8px;
    --transition-speed: 0.3s;
    --container-width-main: 1200px;
    --secondary-bg-transparent: rgba(22, 33, 62, 0.8);
    --font-body-initial: 'Roboto', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --font-heading: 'Roboto', sans-serif;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background-color: var(--primary-bg);
    color: var(--text-color);
    line-height: 1.7;
}

html.wp-toolbar body .site-main {
    padding-top: 10px;
}

body:not(.wp-toolbar) .site-main {
    padding-top: 30px;
}

.content-section + .content-section {
    margin-top: 1rem;
}

.container {
    max-width: var(--container-width-main);
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 0.75em;
}

.main-title {
    font-size: 2.8em;
    color: var(--highlight-color);
    text-align: center;
    font-family: var(--font-heading);
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 0.75em;
}

.site-title-logo a, .site-title-logo a:hover {
    color: #fff;
}
h1.site-title-logo a, p.site-title-logo a {
    font-family: var(--font-heading);
    font-size: 1.8em;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}
.logo h1.site-title-logo {
    font-size: 1.8em;
}

h2 { font-size: 2.2em; color: var(--highlight-color); text-shadow: 1px 1px 3px rgba(0,0,0,0.5); }
h3 { font-size: 1.8em; }
h4 { font-size: 1.2em; }

h2, .h2 {
    margin-bottom: 0.4em;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: #fff;
}

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

button,
input[type="submit"],
input[type="button"] {
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.site-header {
    background-color: var(--secondary-bg);
    padding: 15px 0;
    border-bottom: 3px solid var(--accent-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s ease-in-out;
}

.site-header-hidden {
    transform: translateY(-100%);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    flex-grow: 0;
    flex-shrink: 0;
    flex-basis: auto;
}
.logo a {
    display: inline-block;
}
.logo img {
    height: 50px;
    width: auto;
    display: block;
}
.custom-logo-link img {
     height: 70px !important;
     width: auto !important;
}
h1.site-title-logo, p.site-title-logo {
    margin: 0;
}

.main-menu {
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: 0;
    display: flex;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
}

.main-menu ul,
.footer-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.main-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 8px;
}

.main-menu ul li {
    margin-left: 0;
}

.footer-links li {
    margin-left: 25px;
}
.footer-links li:first-child {
    margin-left: 0;
}

.main-menu ul a {
    color: var(--text-color);
    font-size: 1.1em;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 50px;
    transition: color 0.3s ease, background-color 0.3s ease;
    white-space: nowrap;
    display: inline-block;
    border: 2px solid transparent;
}
.main-menu ul a:hover {
    color: #fff;
    background-color: var(--card-bg);
    border-color: var(--accent-color);
}

.main-menu ul .current-menu-item > a,
.main-menu ul .current-page-item > a,
.main-menu ul .current-menu-ancestor > a,
.main-menu ul .current-page-ancestor > a {
    color: #fff;
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.search-container {
    position: relative;
    flex-grow: 0;
    flex-shrink: 0;
    flex-basis: 250px;
}
.search-form {
    display: flex;
    width: 100%;
}

.search-bar {
    display: flex;
    width: 100%;
    align-items: center;
}

.search-bar input[type="search"],
.search-bar input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #555;
    border-radius: 8px 0 0 8px;
    background-color: #333;
    color: #fff;
    outline: none;
    border-right: none;
    flex-grow: 1;
}
.search-bar button[type="submit"],
.search-bar button {
    padding: 8px 15px;
    border: 1px solid var(--accent-color);
    background-color: var(--accent-color);
    color: #fff;
    cursor: pointer;
    border-radius: 0 8px 8px 0;
    transition: background-color 0.3s ease, transform 0.3s ease;
    flex-shrink: 0;
}
.search-bar button:hover {
    background-color: #d03850;
}

#liveSearchResults {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--secondary-bg);
    border: 1px solid var(--card-bg);
    border-top: none;
    border-radius: 0 0 8px 8px;
    z-index: 999;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: none;
}
#liveSearchResults ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
#liveSearchResults li a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: var(--text-color);
    border-bottom: 1px solid var(--card-bg);
    transition: background-color 0.3s ease;
    gap: 10px;
}
#liveSearchResults li:last-child a {
    border-bottom: none;
}
#liveSearchResults li a:hover {
    background-color: var(--card-bg);
    color: #fff;
}
#liveSearchResults li img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
#liveSearchResults li .title {
    font-size: 0.9em;
    line-height: 1.3;
}
#liveSearchResults p {
    padding: 15px;
    text-align: center;
    color: var(--text-color);
    margin: 0;
    font-size: 0.9em;
}

.ad-placement {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 10px;
    margin: 20px auto;
    text-align: center;
}
.ad-placement > * {
    margin: 0 auto;
}
.ad-placement-single_above_title {
    padding-top: 65px;
    padding-bottom: 55px;
    margin-top: 35px;
}

.page-header {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none;
}
.page-header .page-title {
    margin-bottom: 0;
    margin-top: -35px;
}

.game-breadcrumbs {
    text-align: center;
    font-size: 0.9em;
    color: #aaa;
    display: block;
    margin-bottom: 20px;
}
.game-breadcrumbs a { color: #ccc; }
.game-breadcrumbs a:hover { color: var(--accent-color); }

html.wp-toolbar body .game-breadcrumbs {
    margin-top: 0 !important;
}
body.tax-game_category .site-main .page-header,
body.is-tag .site-main .page-header {
    margin-top: -15px;
}
.tag-archive-title {
    line-height: 1.2;
    margin-top: -25px;
}
.game-breadcrumbs + .page-header,
.game-breadcrumbs + .page-header .main-title,
.game-breadcrumbs + .main-title {
    margin-top: 0 !important;
    padding-top: 0 !important;
    line-height: 1.2em !important;
}
.front-page-main-title {
    margin-top: 0;
    margin-bottom: 25px !important;
    padding-top: 20px;
    padding-bottom: 20px;
    line-height: 1.2em;
}

.page-content, .index-content, .search-results-grid {
    background-color: var(--secondary-bg);
    padding: 40px 25px 25px 25px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}
.page-content .page-title,
.index-content .page-title {
    margin-bottom: 20px;
}

.front-page-custom-block {
    background-color: var(--secondary-bg);
    padding: 25px 30px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    font-size: 1.05em;
    line-height: 1.6;
    text-align: left;
    margin-bottom: 25px;
}
.front-page-custom-block p {
    margin-bottom: 1em;
}
.front-page-custom-block h2,
.front-page-custom-block h3 {
    color: var(--highlight-color);
    margin-top: 1em;
    margin-bottom: 0.5em;
    text-align: left;
}

body:not(.game-as-front-page) .front-page-content-area {
    background-color: var(--secondary-bg);
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}
body.game-as-front-page .front-page-content-area {
    background-color: transparent;
    box-shadow: none;
    padding: 0;
    margin: 0;
}
body:not(.game-as-front-page) .front-page-content-area .front-page-main-title {
    margin-top: 0;
    margin-bottom: 30px;
    text-align: left;
}
body:not(.game-as-front-page) .front-page-content-area .page-editor-content {
    font-size: 1.1em;
    line-height: 1.7;
    text-align: left;
}
body:not(.game-as-front-page) .front-page-content-area .page-editor-content p {
    margin-bottom: 1em;
}
body:not(.game-as-front-page) .front-page-content-area .page-editor-content h2,
body:not(.game-as-front-page) .front-page-content-area .page-editor-content h3 {
    color: var(--highlight-color);
    margin-top: 1.5em;
    margin-bottom: 0.7em;
    text-align: left;
}

.page-entry h2,
.page-entry h3 {
    color: var(--highlight-color);
}

.index-entry, .search-result-item {
    border-bottom: 1px solid var(--card-bg);
    padding-bottom: 25px;
    margin-bottom: 25px;
}
.index-entry:last-child, .search-result-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.index-entry .entry-title a, .search-result-item .entry-title a {
    color: var(--highlight-color);
    font-size: 1.5em;
}
.index-entry .entry-title a:hover {
    color: var(--accent-color);
}
.index-entry .entry-thumbnail {
    margin: 15px 0;
    border-radius: 8px;
    overflow: hidden;
}
.index-entry .read-more-link, .search-result-item .read-more-link {
    display: inline-block;
    background-color: var(--accent-color);
    color: #fff;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9em;
    margin-top: 10px;
}
.index-entry .read-more-link:hover {
    background-color: var(--highlight-color);
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}
.pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid var(--card-bg);
    color: var(--text-color);
    border-radius: 8px;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background-color: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}
.pagination .prev, .pagination .next {
    font-weight: bold;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
}

.game-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: block;
    color: var(--text-color);
}
.game-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4), 0 0 15px rgba(233, 69, 96, 0.5);
}
.game-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-bottom: 3px solid var(--highlight-color);
    transition: opacity 0.3s ease;
}
.game-card:hover img {
    opacity: 0.7;
}
.game-card .game-card-title {
    margin: 15px 0;
    font-size: 1.1em;
    color: #fff;
    padding: 0 10px;
    min-height: 2.4em;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    font-family: var(--font-heading);
    font-weight: 700;
}
.similar-games-section .game-card .game-card-title {
    font-size: 1em;
    margin: 10px 0;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(233, 69, 96, 0.7);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.game-card:hover .game-overlay {
    opacity: 1;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.5em;
    color: var(--text-color);
    padding: 50px 20px;
}

.section-title {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 25px;
}

.featured-game-card {
    border-radius: 8px;
    overflow: hidden;
}
.game-card-featured-link {
    display: flex;
    flex-direction: row;
    background-color: var(--card-bg);
    color: var(--text-color);
    transition: background-color 0.3s;
    border-radius: 8px;
}
.game-card-featured-link:hover {
    background-color: var(--primary-bg);
}
.game-card-featured-link .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.game-card-featured-link > div:first-child {
    width: 40%;
    flex-shrink: 0;
    border-right: 3px solid var(--highlight-color);
}

.featured-game-content {
    padding: 25px 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.featured-game-content h3 {
    font-size: 2.2em;
    color: #fff;
    margin-top: 0;
    margin-bottom: 15px;
}
.featured-game-content .game-excerpt {
    font-size: 1em;
    margin-bottom: 20px;
    line-height: 1.6;
    color: #ccc;
}
.featured-game-content .game-excerpt p {
    margin-bottom: 0;
}
.featured-game-content .play-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: #fff;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s;
    align-self: flex-start;
    margin-top: auto;
}
.featured-game-content .play-button:hover {
    background-color: var(--highlight-color);
}

.game-title {
    text-align: center;
}

.star-rating-section {
    text-align: center;
    margin-top: -20px;
}
.star-rating-section .stars {
    font-size: 2.5em;
    cursor: pointer;
    line-height: 1;
    color: #444;
}
.star-rating-section .stars .star {
    transition: color 0.2s ease, transform 0.1s ease;
    display: inline-block;
}
.star-rating-section .stars .star.hovered,
.star-rating-section .stars .star:hover {
    color: var(--star-color);
    opacity: 0.7;
    transform: scale(1.1);
}
.star-rating-section .stars .star.selected {
    color: var(--star-color);
    opacity: 1;
    transform: scale(1);
}
.rating-info { font-size: 0.9em; color: #ccc; margin-top: 8px; }

.game-interactive-area {
    margin: 0 auto;
}

.game-launch-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.game-placeholder-wrapper {
    width: 100%;
    position: relative;
    background-color: var(--card-bg);
    background-image:
        linear-gradient(
            100deg,
            transparent 20%,
            rgba(var(--highlight-color-rgb), 0.1) 45%,
            rgba(var(--highlight-color-rgb), 0.1) 55%,
            transparent 80%
        ),
        linear-gradient(
            rgba(255, 255, 255, 0.04) 1px,
            transparent 1px
        );
    background-size:
        250% 100%,
        100% 3px;
    background-repeat: no-repeat, repeat;
    border-radius: 8px;
    overflow: hidden;
    animation: shimmerEffect 5s linear infinite;
}
.game-placeholder-wrapper::before {
    content: "";
    display: block;
    padding-top: 56.25%;
}

.game-placeholder-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.game-placeholder-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    cursor: pointer;
    margin-bottom: 15px;
}

.game-play-button {
    padding: 15px 40px;
    font-size: 1.5em;
    font-weight: bold;
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    line-height: 1;
}
.game-play-button:hover {
    transform: scale(1.1);
    background-color: var(--highlight-color);
    box-shadow: 0 6px 25px rgba(0,0,0,0.3);
}

.game-iframe-wrapper {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    background-color: #000;
    border: 3px solid var(--secondary-bg);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.game-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.game-controls {
    text-align: center;
    display: none;
    margin-top: 15px;
}
.fullscreen-button {
    padding: 10px 20px;
    font-size: 1em;
    background-color: var(--highlight-color);
    color: var(--primary-bg);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
}
.fullscreen-button:hover { background-color: var(--highlight-color); transform: scale(1.05);}

.game-iframe-wrapper:-webkit-full-screen { padding-bottom: 100vh !important; height: 100vh !important; }
.game-iframe-wrapper:-moz-full-screen { padding-bottom: 100vh !important; height: 100vh !important; }
.game-iframe-wrapper:-ms-fullscreen { padding-bottom: 100vh !important; height: 100vh !important; }
.game-iframe-wrapper:fullscreen { padding-bottom: 100vh !important; height: 100vh !important; }

.game-categories-list, .game-tags-list {
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: 8px;
}
.game-categories-list h4, .game-tags-list h4 {
    color: var(--highlight-color);
    margin-bottom: 15px;
    font-size: 1.3em;
}
.game-categories-list ul, .game-tags-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.game-categories-container ul li a,
.game-popular-searches-container ul li a {
    display: inline-block;
    background-color: var(--secondary-bg);
    color: var(--text-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9em;
    transition: background-color 0.3s, color 0.3s;
}
.game-categories-container ul li a:hover,
.game-popular-searches-container ul li a:hover {
    background-color: var(--accent-color);
    color: #fff;
}

.local-comments-section {
    background-color: var(--secondary-bg);
    padding: 25px 30px;
    border-radius: 8px;
    text-align: center;
}
.local-comments-section h3,
.local-comments-section h4 {
    color: var(--highlight-color);
    text-align: center;
    margin-bottom: 20px;
}
.local-comments-section h4 {
    font-size: 1.6em;
    margin-top: 30px;
}

#localCommentsList .comment-item {
    background-color: var(--card-bg);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid var(--accent-color);
}
#localCommentsList .comment-author {
    font-weight: bold;
    color: var(--highlight-color);
    margin-bottom: 5px;
    font-size: 1.05em;
}
#localCommentsList .comment-date {
    font-size: 0.8em;
    color: #888;
    margin-bottom: 8px;
}
#localCommentsList .comment-text p {
    font-size: 0.95em;
    margin-bottom: 0.5em;
    word-break: break-word;
    line-height: 1.6;
}

#localCommentForm div {
    margin-bottom: 15px;
}
#localCommentForm label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9em;
    color: #ccc;
    font-weight: 500;
}
#localCommentForm input[type="text"],
#localCommentForm textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #444;
    background-color: #333;
    color: var(--text-color);
    font-family: var(--font-body-original);
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}
#localCommentForm input[type="text"]:focus,
#localCommentForm textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 5px var(--accent-color);
    outline: none;
}
#localCommentForm textarea {
    min-height: 100px;
    resize: vertical;
}
#localCommentForm button[type="submit"] {
    padding: 12px 25px;
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}
#localCommentForm button[type="submit"]:hover {
    background-color: var(--highlight-color);
}

.similar-games-section h3 {
    text-align: center;
    color: var(--highlight-color);
    margin-bottom: 25px;
    font-size: 2em;
}
.similar-games-section .game-card img { height: 120px; }

.site-footer {
    background-color: var(--footer-bg, #0d0d1a);
    color: #888;
    padding: 30px 0;
    margin-top: 60px;
    text-align: center;
    border-top: 1px solid #333;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.footer-links ul {
    justify-content: center;
}
.footer-links a {
    color: #888;
    margin: 0 10px;
    font-size: 0.9em;
}
.footer-links a:hover {
    color: var(--accent-color);
}
.copyright {
    font-size: 0.9em;
    flex-basis: 100%;
    text-align: center;
    margin-top: 10px;
}
.footer-content > .footer-links, .footer-content > .copyright {
    flex-basis: auto;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    z-index: 1005;
    order: 2;
}

.mobile-menu-toggle .hamburger-icon {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-color);
    position: relative;
    transition: all 0.3s ease;
}

.mobile-menu-toggle .hamburger-icon::before,
.mobile-menu-toggle .hamburger-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

.mobile-menu-toggle .hamburger-icon::before { top: -7px; }
.mobile-menu-toggle .hamburger-icon::after { bottom: -7px; }

.mobile-menu-toggle.active .hamburger-icon { background-color: transparent; }
.mobile-menu-toggle.active .hamburger-icon::before { transform: translateY(7px) rotate(45deg); }
.mobile-menu-toggle.active .hamburger-icon::after { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 769px) { .mobile-menu-toggle { display: none !important; } }
@media (max-width: 1024px) { .featured-game-content h3 { font-size: 1.8em; } }
@media (max-width: 768px) {
    h1, h1.page-title, h1.game-title, h1.front-page-main-title { font-size: 2.2em; }
    h2, .section-title, .similar-games-section h3 { font-size: 1.8em; }
    h3, .featured-game-content h3 { font-size: 1.5em; }
    .header-content { align-items: center; }
    .logo { flex-grow: 1; flex-shrink: 1; }
    .mobile-menu-toggle { display: block; order: 2; margin-left: 15px; }
    .main-menu { order: 3; width: 100%; position: relative; flex-grow: 0; flex-basis: 100%; justify-content: flex-start; overflow: visible; }
    .main-menu ul { display: none; flex-direction: column; position: absolute; top: calc(100% + 15px); left: 0; right: 0; background-color: var(--secondary-bg); padding: 0; box-shadow: 0 5px 10px rgba(0,0,0,0.2); border-top: 1px solid var(--card-bg); z-index: 1000; }
    .main-menu ul li { margin-left: 0; width: 100%; }
    .main-menu.active ul { display: flex; }
    .main-menu ul li a { display: block; padding: 12px 20px; border-bottom: 1px solid var(--card-bg); text-align: left; font-size: 1em; border-bottom-color: var(--card-bg) !important; }
    .main-menu ul li a:hover,
    .main-menu ul .current-menu-item > a,
    .main-menu ul .current_page_item > a { color: #fff; background-color: var(--accent-color); }
    .search-container { order: 4; margin-top: 15px; flex-grow: 0; flex-basis: 100%; }
    .games-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px; }
    .game-card-featured-link { flex-direction: column; }
    .game-card-featured-link > div:first-child { width: 100%; height: 220px; border-right: none; border-bottom: 3px solid var(--highlight-color); }
    .featured-game-content { padding: 20px; }
    .featured-game-content .play-button { align-self: center; }
    .page-content, .index-content, .search-results-grid, .game-content-about, .game-content-details, .game-review-section, .archive-description-top, .front-page-custom-block { padding: 20px; }
    .game-placeholder-content { padding: 15px; }
}
@media (max-width: 480px) {
    h1, h1.page-title, h1.game-title, h1.front-page-main-title { font-size: 1.8em; }
    h2, .section-title, .similar-games-section h3 { font-size: 1.6em; }
    h3, .featured-game-content h3 { font-size: 1.3em; }
     .games-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 15px; }
    .game-card h3, .game-card h4, .game-card .game-card-title { font-size: 1em; min-height: 2em; }
    .star-rating-section .stars { font-size: 2em; }
    .footer-content { flex-direction: column; gap: 15px; }
    .footer-links ul { flex-direction: column; gap: 8px; }
    .footer-links li { margin-left: 0; }
    .game-placeholder-content { padding: 10px; }
}
@keyframes shimmerEffect { 0% { background-position: -150% center, 0 0; } 100% { background-position: 250% center, 0 0; } }
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
.screen-reader-text:focus { background-color: #f1f1f1; border-radius: 3px; box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6); clip: auto !important; clip-path: none; color: #21759b; display: block; font-size: 14px; font-weight: bold; height: auto; left: 5px; line-height: normal; padding: 15px 23px 14px; text-decoration: none; top: 5px; width: auto; z-index: 100000; }
.client-filter-container { position: relative; }
.client-game-filter-input { box-sizing: border-box; width: 100%; height: 50px; padding: 10px 20px 10px 50px; background-color: var(--secondary-bg, #16213e); border: 1px solid var(--card-bg, #0f3460); border-radius: 8px; color: var(--text-color, #e0e0e0); font-size: 16px; transition: border-color 0.3s ease, box-shadow 0.3s ease; }
.client-game-filter-input::placeholder { color: var(--text-color); opacity: 0.6; }
.client-game-filter-input:focus { outline: none; border-color: var(--highlight-color, #53bf9d); box-shadow: 0 0 0 3px rgba(83, 191, 157, 0.2); }
.client-filter-container .filter-icon-GF { position: absolute; top: 50%; left: 18px; transform: translateY(-50%); color: var(--text-color); opacity: 0.5; pointer-events: none; font-size: 18px; }
@media (max-width: 768px) and (orientation: portrait) { .game-placeholder-wrapper::before { padding-top: 0; } .game-placeholder-wrapper { height: 65vh; min-height: 480px; } }
.star-rating-section.disabled .stars { cursor: not-allowed; opacity: 0.7; }
.star-rating-section.processing .stars { cursor: wait; }
.user-vote-status { display: block; font-size: 0.8em; margin-top: 5px; color: #999; min-height: 1em; }
.social-share-section { background-color: var(--secondary-bg); padding: 20px 25px; border-radius: 8px; text-align: center; }
.social-share-buttons { display: flex; justify-content: center; gap: 15px; }
.social-share-button { display: inline-flex; align-items: center; justify-content: center; width: 45px; height: 45px; border-radius: 50%; color: #fff !important; font-size: 1.2em; text-decoration: none; transition: transform 0.2s ease, opacity 0.2s ease; }
.social-share-button:hover { transform: scale(1.1); opacity: 0.9; }
.social-share-button.facebook { background-color: #3b5998; }
.social-share-button.twitter { background-color: #1da1f2; }
.social-share-button.telegram { background-color: #0088cc; }
.social-share-button.vk { background-color: #4a76a8; }
.game-placeholder-wrapper { contain: paint layout style; }
.game-placeholder-content .game-play-button { min-height: 44px; min-width: 100px; }
.game-loader { width: 60px; height: 60px; border: 6px solid rgba(255, 255, 255, 0.2); border-top-color: var(--highlight-color, #53bf9d); border-radius: 50%; animation: spin 1s linear infinite; position: absolute; top: 50%; left: 50%; margin-top: -30px; margin-left: -30px; z-index: 8; }
@keyframes spin { to { transform: rotate(360deg); } }
.search-loader { width: 24px; height: 24px; border: 3px solid rgba(255, 255, 255, 0.2); border-top-color: var(--accent-color, #e94560); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 20px auto; }
.scroll-to-top-btn { position: fixed; bottom: 25px; right: 25px; background-color: var(--accent-color, #e94560); color: var(--text-color, #e0e0e0); width: 45px; height: 45px; text-align: center; line-height: 45px; font-size: 20px; border-radius: 50%; z-index: 1000; cursor: pointer; display: none; transition: opacity 0.4s ease-in-out, background-color 0.3s; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.scroll-to-top-btn:hover { background-color: var(--highlight-color, #53bf9d); color: #fff; }
.archive-description-top { background-color: var(--secondary-bg, #16213e); padding: 25px; border-radius: 8px; font-size: 1.05em; line-height: 1.7; border: 1px solid var(--card-bg, #0f3460); }
.archive-description-top p:first-child { margin-top: 0; }
.archive-description-top p:last-child { margin-bottom: 0; }
.game-content-about, .game-content-details, .game-review-section, .game-content-faq {
    background-color: var(--secondary-bg);
    padding: 25px 30px;
    border-radius: 8px;
    font-size: 1.05em;
    line-height: 1.7;
}
.game-content-details h2, .game-content-details h3, .game-content-details h4 { color: var(--highlight-color); }
body.immersive-mode-active .site-header, body.immersive-mode-active .site-footer, body.immersive-mode-active #wpadminbar, body.immersive-mode-active .game-page-main > *:not(.game-interactive-area), body.immersive-mode-active #scrollToTopBtn { display: none !important; }
body.immersive-mode-active .game-page-main, body.immersive-mode-active .game-page-main > .game-interactive-area { display: block !important; }
body.immersive-mode-active .game-interactive-area { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; margin: 0; z-index: 9999; }
body.immersive-mode-active .game-iframe-wrapper { height: 100%; padding-bottom: 0; border-radius: 0; border: none; }
.page-editor-content h2, .page-entry h2, .archive-description-top h2 { margin-bottom: 0.5em; margin-top: 0; }
.page-editor-content h3, .page-entry h3, .archive-description-top h3 { margin-bottom: 15px; }
.page-editor-content h4, .page-entry h4, .archive-description-top h4 { margin-bottom: 0.75em; }
.page-editor-content p, .page-entry p, .archive-description-top p { margin-bottom: 1em; }
.page-editor-content ul, .page-entry ul, .archive-description-top ul { list-style-type: none; margin: 0; padding-left: 0; }
.archive-description-top ul li::before { display: none; }
.archive-description-top ul li { padding-left: 0; }
.comment-status-message { padding: 15px; margin-top: 20px; border-radius: 8px; text-align: center; font-weight: 500; opacity: 0; transform: translateY(10px); transition: opacity 0.3s ease, transform 0.3s ease; pointer-events: none; }
.comment-status-message.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.comment-status-message.success { color: #e0e0e0; background-color: var(--highlight-color); border: 1px solid #47a88a; }
.comment-status-message.error { color: #fff; background-color: var(--accent-color); border: 1px solid #d03850; }
.games-grid.grid-is-centered { justify-content: center; margin-top: 40px; }
.game-meta-container { } 
.game-categories-container { width: 100%; } 

.game-categories-container .game-categories-list {
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: 8px;
}
.game-categories-container h4, .game-popular-searches-container h4 {
    color: var(--highlight-color);
    margin-bottom: 15px;
    font-size: 1.3em;
}
.game-categories-container ul, .game-popular-searches-container ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.game-categories-container ul li a,
.game-popular-searches-container ul li a {
    display: inline-block;
    background-color: var(--secondary-bg);
    color: var(--text-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9em;
    transition: background-color 0.3s, color 0.3s;
}
.game-categories-container ul li a:hover,
.game-popular-searches-container ul li a:hover {
    background-color: var(--accent-color);
    color: #fff;
}
.tag-featured-game { max-width: 750px; margin: 0 auto; }
.tag-featured-game-link { display: flex; flex-wrap: wrap; align-items: center; gap: 30px; background-color: var(--secondary-bg); border-radius: 8px; padding: 20px; box-shadow: 0 10px 20px rgba(0,0,0,0.3); transition: background-color 0.3s ease; color: var(--text-color); }
.tag-featured-game-link:hover { background-color: var(--card-bg); }
.tag-featured-col-image { flex: 0 0 250px; }
.tag-featured-col-image img { width: 100%; height: auto; border-radius: 8px; display: block; }
.tag-featured-col-content { flex: 1; min-width: 280px; text-align: left; }
.tag-featured-col-content h3 { font-size: 2.2em; color: #fff; margin-bottom: 15px; line-height: 1.2; }
.tag-featured-col-content .tag-featured-game-short-desc {
    font-size: 0.95em;
    color: #ccc;
    margin-top: 10px;
    margin-bottom: 15px;
    line-height: 1.5;
}
.tag-featured-col-content .tag-featured-game-excerpt { font-size: 1em; color: #ccc; line-height: 1.6; margin-bottom: 30px; }
.tag-featured-col-content .play-button { display: inline-block; background-color: var(--accent-color);
    color: #fff;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
}
.tag-featured-col-content .play-button:hover { background-color: var(--highlight-color); }
.tag-featured-game .tag-featured-game-rating { font-size: 0.9em; color: #ccc; margin-bottom: 15px; }
.alignleft { float: left; margin-right: 1.5em; margin-bottom: 1em; }
.alignright { float: right; margin-left: 1.5em; margin-bottom: 1em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; margin-bottom: 1em; }
img.alignleft, img.alignright, img.aligncenter { margin-bottom: 1em; }
.game-review-section { background-color: var(--secondary-bg); padding: 25px 30px; border-radius: 8px; border-top: 3px solid var(--highlight-color); }
.game-review-section .section-title { text-align: center; margin-bottom: 25px; font-size: 2em; }
.review-content-wrapper { display: flex; flex-wrap: wrap; gap: 30px; align-items: flex-start; }
.review-pros-cons { flex: 3; display: flex; gap: 25px; }
.review-pros, .review-cons { flex: 1; min-width: 200px; }
.review-pros h4, .review-cons h4 { margin-top: 0; margin-bottom: 15px; font-size: 1.3em; display: flex; align-items: center; gap: 8px; }
.review-pros h4 { color: #2ecc71; }
.review-cons h4 { color: #e74c3c; }
.review-pros-cons ul { list-style: none; margin: 0; padding: 0; }
.review-pros-cons li { padding: 8px 0; border-bottom: 1px solid var(--card-bg); }
.review-pros-cons li:last-child { border-bottom: none; }
.review-score-container { flex: 1; text-align: center; }
.review-score-container h4 { font-size: 1.3em; margin-bottom: 15px; }
.review-score-circle { width: 120px; height: 120px; border-radius: 50%; background-color: var(--card-bg); display: flex; flex-direction: column; justify-content: center; align-items: center; margin: 0 auto; border: 4px solid var(--highlight-color); }
.review-score-value { font-size: 2.5em; font-weight: bold; color: #fff; line-height: 1; }
.review-score-max { font-size: 1em; color: #aaa; }
@media (max-width: 768px) {
    .review-content-wrapper { flex-direction: column; align-items: center; }
    .review-pros-cons { width: 100%; flex-direction: column; }
}
@media (max-width: 600px) {
    .tag-featured-game-link { flex-direction: column; flex: 0 0 100%; text-align: center; }
    .tag-featured-col-image { flex-basis: auto; max-width: 300px; margin: 0 auto; }
    .tag-featured-col-content { text-align: center; }
}

.ad-placement-single_above_title + .game-title {
    margin-top: 25px;
}
.game-title + .last-updated-date {
    margin-top: -10px;
    margin-bottom: 15px;
}
.game-content-about + .ad-placement-single_above_iframe {
    margin-top: 25px;
}
.ad-placement-single_above_iframe + .game-interactive-area {
    margin-top: 25px;
}
.game-interactive-area + .game-controls {
    margin-top: 15px;
}
.front-page-custom-block + .top-rated-games {
    margin-top: 50px !important;
}
.front-page-custom-block:last-of-type {
    margin-top: 40px;
}

.ad-placement + .games-grid,
.games-grid + .ad-placement {
    margin-top: 35px;
}

section.top-rated-games,
section.top-games {
    padding-top: 0;
}

.front-page-section + .front-page-section,
.top-rated-games + .top-games,
.featured-game-section + .top-rated-games,
body:not(.game-as-front-page) .front-page-content-area + * {
    margin-top: 50px !important;
}
.similar-games-section,
#local-comments-section + .similar-games-section {
    margin-top: 50px !important;
}

body.home.front-page .front-page-custom-block {
    margin-top: 15px;
    margin-bottom: 15px;
}

.popular-games-section {
    margin-top: 50px;
}

.game-card.game-card--homepage {
  border: 2px solid var(--highlight-color);
  box-shadow: 0 0 15px var(--highlight-color);
}

.game-card.game-card--homepage h3::after {
  content: '★';
  display: inline-block;
  margin-left: 8px;
  color: var(--star-color);
  font-size: 1.2em;
}

.igroport-exit-immersive-btn {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 2147483647;
    height: 44px;
    width: auto;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 22px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: #fff;
    align-items: center;
    padding: 0 12px 0 8px;
    gap: 8px;
}

.igroport-exit-immersive-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
    transform: scale(1.05);
}

.igroport-exit-immersive-btn .exit-btn-arrow {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.igroport-exit-immersive-btn .exit-btn-arrow svg {
    width: 100%;
    height: 100%;
    fill: #ffffff;
}

.igroport-exit-immersive-btn .exit-btn-logo {
    display: flex;
    align-items: center;
    height: 30px;
}

.igroport-exit-immersive-btn .exit-btn-logo img {
    max-height: 100%;
    width: auto;
    display: block;
}

.igroport-exit-immersive-btn .exit-btn-logo span {
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    white-space: nowrap;
}

body.immersive-mode-active .igroport-exit-immersive-btn {
    display: flex;
}

.game-iframe-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; 
    background-color: #000;
    border: 3px solid var(--secondary-bg);
    border-radius: 8px;
    overflow: hidden;
}

.game-iframe-container .game-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.game-meta-container-flex {
    display: flex;
    gap: 20px;
    align-items: stretch; 
}

.game-cover-container {
    flex-shrink: 0;
    width: 120px;
}

.game-cover-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: var(--border-radius);
}

.game-categories-container {
    flex-grow: 1; 
}

.game-fullscreen-container {
    flex-shrink: 0;
    display: flex;
}

.fullscreen-button {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: 10px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    display: flex; 
    flex-direction: column; 
    align-items: center;
    justify-content: center; 
    gap: 8px; 
    transition: all 0.2s ease-in-out;
    width: 120px; 
    height: 100%; 
    aspect-ratio: 1 / 1; 
}

.fullscreen-button:hover {
    background-color: var(--highlight-color);
    color: var(--primary-bg);
    transform: scale(1.05); 
    border-color: transparent;
}

.fullscreen-button i {
    font-size: 2em; 
    line-height: 1;
}

@media (max-width: 600px) {
    .game-meta-container-flex {
        flex-wrap: wrap; 
        gap: 15px; 
    }

    .game-categories-container {
        order: 1; 
        flex-basis: 100%; 
    }
    .game-cover-container {
        order: 2; 
    }
    .game-fullscreen-container {
        order: 3;
        margin-left: auto; 
    }
}

.main-menu .menu-icon {
    margin-right: 8px; 
    display: inline-block; 
    vertical-align: middle; 
    line-height: 1;
}

@media (max-width: 768px) {
    .main-menu ul li a {
        display: flex;
        align-items: center;
    }
}

@keyframes gameBgPanZoom {
    0% { 
        background-position: 0% 50%;
        transform: scale(1.15);
    }
    100% { 
        background-position: 100% 50%;
        transform: scale(1.3);
    }
}

.game-launch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

.game-launch-bg {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background-size: cover;
    background-position: center;
    animation: gameBgPanZoom 10s ease-in-out infinite alternate;
    transform: scale(1.15);
}

.game-launch-frost {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1;
}

.game-launch-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
    transition: opacity 0.2s ease-out;
}

.game-launch-title {
    font-size: 2.2em;
    color: #fff;
    text-shadow: 0 2px 5px rgba(0,0,0,0.7);
    margin: 0;
    line-height: 1.2;
}

@media (max-width: 600px) {
    .game-launch-title {
        font-size: 1.8em;
    }
    .game-play-button {
        padding: 12px 30px;
        font-size: 1.2em;
    }
}

.archive-description-bottom {
    margin-top: 50px;
}

.page-entry ul,
.page-editor-content ul,
.archive-description-top ul {
    list-style-type: disc;
    margin: 1em 0;
    padding-left: 40px;
}

.page-entry ol,
.page-editor-content ol,
.archive-description-top ol {
    list-style-type: decimal;
    margin: 1em 0;
    padding-left: 40px;
}

.archive-description-top ul li {
    padding-left: revert;
}

.archive-description-top ul li::before {
    display: revert;
}
