/* Main styling for the game website */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.container-full {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
}

.container-privacy {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
}

header {
    padding: 20px 0;
    background-color: #2c3e50;
    color: white;
    margin-bottom: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    flex-wrap: wrap;
}

.header-left {
    flex: 1;
    min-width: 300px;
}

.header-left h1 {
    margin: 0 0 10px 0;
    font-size: 2.5rem;
}

.header-left p {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

.header-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background-color: #ecf0f1;
    color: #2c3e50;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.highlighted-pill {
    background-color: #3498db;
    color: #fff;
}

.link-pill {
    background-color: #fff;
    border: 1px solid #3498db;
    color: #3498db;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.link-pill:hover {
    background-color: #3498db;
    color: #fff;
}

.header-right {
    flex-shrink: 0;
}

.header-utilities {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.escape-info-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.escape-info-icon {
    cursor: pointer;
    font-size: 14px;
    color: #7f8c8d;
    border: 1px solid #7f8c8d;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.escape-mode-text {
    color: #7f8c8d;
    font-style: italic;
    display: none;
    cursor: pointer;
}

@media (min-width: 768px) {
    .escape-mode-text {
        display: inline;
    }
}

.escape-info-modal {
    position: absolute;
    top: 35px;
    right: 0;
    background: white;
    border: 1px solid #dce3eb;
    padding: 14px 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1200;
    width: 300px;
    border-radius: 8px;
    display: none;
}

.escape-info-modal p {
    margin: 0 0 8px 0;
    line-height: 1.4;
    color: #2c3e50;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-container {
    position: relative;
    display: flex;
    gap: 10px;
}

.search-form input {
    padding: 10px 15px;
    border: none;
    border-radius: 25px;
    outline: none;
    font-size: 1rem;
    min-width: 200px;
}

.search-form button {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.search-form button:hover {
    background-color: #2980b9;
}

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.search-dropdown.show {
    display: block;
}

.search-result {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    outline: none;
}

.search-result:focus {
    background-color: #e9f7fe;
}

.search-result:hover,
.search-result:focus {
    background-color: #f8f9fa;
}

.search-result:last-child {
    border-bottom: none;
}

.search-result-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.search-result-content {
    flex: 1;
}

.search-result-title {
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 4px 0;
}

.search-result-category {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin: 0;
}

.no-results {
    padding: 15px;
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
}

.search-result-title strong,
.search-result-category strong {
    background-color: #fff3cd;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: bold;
    color: #856404;
}

.value-section {
    position: relative;
    padding: 40px 0 40px;
    min-height: 320px;
    border-bottom: 1px solid #1f2937;
    overflow: hidden;
    color: #f8fafc;
}

.value-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/games/banner.jpg') center center / cover no-repeat;
    z-index: 0;
}

.value-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.9));
    z-index: 0;
}

.value-section .container {
    max-width: 100%;
    padding: 0;
    width: 100%;
    position: relative;
    z-index: 1;
}

.value-header {
    max-width: 900px;
    margin: 0 auto 20px auto;
    text-align: center;
    color: #f8fafc;
    padding: 0 20px;
}

.scroll-to-games {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    margin-bottom: 12px;
    border-radius: 999px;
    border: 1px solid #3498db;
    background: #3498db;
    color: #fff;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.scroll-to-games:hover {
    background: #2980b9;
    border-color: #2980b9;
}

.scroll-icon {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    vertical-align: middle;
    position: relative;
}

.scroll-icon::before {
    content: '';
    width: 14px;
    height: 14px;
    display: block;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9L12 15L18 9' stroke='%233498db' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px 14px;
}

.value-header h2 {
    margin: 0 0 10px 0;
    font-size: 2rem;
}

.value-header p {
    margin: 0;
    color: #e4ebf5;
}

.value-marquee {
    position: relative;
    overflow: hidden;
    width: 100vw;
    margin: 20px auto 0 auto;
    border-radius: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.value-track {
    display: flex;
    gap: 12px;
    width: max-content;
    animation: value-scroll 30s linear infinite;
    padding: 4px 0;
}

.value-marquee:hover .value-track {
    animation-play-state: paused;
}

.value-card {
    flex: 0 0 260px;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.value-card h3 {
    margin: 0 0 8px 0;
    color: #2c3e50;
}

.value-card p {
    margin: 0;
    color: #2c3e50;
    line-height: 1.5;
}

@keyframes value-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.spotlight-section {
    margin: 30px 0;
    padding: 10px 0;
}

.spotlight-header {
    text-align: center;
    margin-bottom: 15px;
}

.spotlight-header h2 {
    margin: 0;
    color: #2c3e50;
}

.spotlight-header p {
    margin: 6px 0 0 0;
    color: #556575;
}

.spotlight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

.spotlight-card {
    background: #ffffff;
    border: 1px solid #e6ecf3;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05);
    line-height: 1.5;
}

.spotlight-card h3 {
    margin: 0 0 8px 0;
    color: #2c3e50;
}

.spotlight-card p {
    margin: 0;
    color: #556575;
}

.guide-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 15px;
    margin: 20px 0 10px 0;
}

.guide-card {
    background: #f9fbff;
    border: 1px solid #dbe6f3;
    border-radius: 12px;
    padding: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.guide-card h2 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.3rem;
}

.guide-card ul {
    margin: 0 0 10px 18px;
    padding: 0;
    color: #4a5666;
    line-height: 1.5;
}

.guide-card p {
    margin: 0;
    color: #4a5666;
}

/* AdSense placeholder styling */
.ad-container {
    width: 100%;
    background-color: #ecf0f1;
    border: 1px dashed #bdc3c7;
    padding: 15px 0;
    text-align: center;
    margin: 20px 0;
    border-radius: 5px;
    box-sizing: border-box;
}

.ad-placeholder {
    color: #7f8c8d;
    font-style: italic;
    display: block;
    width: 100%;
    text-align: center;
    margin: 0 auto;
}

/* Ad Card Styling */
.ad-card {
    width: 100%;
    height: auto;
    aspect-ratio: 3/2;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ecf0f1;
    border: 2px dashed #bdc3c7;
    box-shadow: none;
    cursor: default;
    border-radius: 10px;
    transition: none;
    box-sizing: border-box;
}

.ad-card:hover {
    transform: none;
    box-shadow: none;
}

.ad-card .ad-slot {
    width: 100%;
    height: 100%;
    min-height: 150px;
}

/* Ensure ad cards don't have the game card hover effect */
.game-card.ad-card:hover {
    transform: none;
    box-shadow: none;
}

.game-card.ad-card:hover .game-card-content {
    display: none;
}

/* Fullscreen ad overlay styling */
#fullscreen-ad-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Prevent background scrolling when modal is open */
.no-scroll {
    overflow: hidden;
    height: 100vh;
}

/* Ad content styling for transparency */
.ad-content {
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    min-width: 300px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

#close-ad-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 18px;
    cursor: pointer;
    z-index: 10001;
}

#close-ad-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Loader styles */
.loader {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    position: relative;
    margin: 20px auto;
    box-sizing: border-box;
    aspect-ratio: 1/1;
}

.loader::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    width: 50px;
    height: 50px;
    border: 4px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-sizing: border-box;
    aspect-ratio: 1/1;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#fullscreen-ad-overlay h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: white;
}

#fullscreen-ad-overlay p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #ecf0f1;
}



.ad-placeholder-fullscreen {
    background-color: #333;
    width: 100%;
    height: 100%;
    min-width: 250px;
    min-height: 150px;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    box-sizing: border-box;
}

/* Footer styling */
.site-footer {
    background-color: #2c3e50;
    color: white;
    margin-top: 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    flex-wrap: wrap;
}

.footer-left p {
    margin: 0;
    font-size: 0.9rem;
}

.footer-right a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-right a:hover {
    text-decoration: underline;
}

/* Game grid layout */
.game-grid {
    display: grid;
    grid-template-columns: repeat(4, 300px);
    justify-content: center;
    gap: 25px;
    margin: 20px 0;
}

.game-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    width: 300px;
    height: 200px;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.game-card img,
.game-card picture {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

/* Add specific styling for picture element to ensure proper display */
.game-card picture {
    display: block;
}

.game-card-content {
    padding: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: rgba(0, 0, 0, 0.64);
    border-radius: 0 0 10px 10px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.game-card:hover .game-card-content {
    opacity: 1;
    transform: translateY(0);
}

.game-card h3 {
    margin: 0 0 2px 0;
    font-size: 1.2rem;
    color: white;
}

.game-card p {
    margin: 0;
    color: #ecf0f1;
    font-size: 0.8rem;
}

/* Learning page styles */
.learning-page {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.learning-title {
    text-align: center;
    color: #2c3e50;
    margin-top: 0;
    font-size: 2.5rem;
}

.learning-article {
    line-height: 1.6;
    color: #333;
}

.learning-article h2 {
    color: #2c3e50;
    margin-top: 30px;
}

.learning-article h3 {
    color: #3498db;
    margin-top: 25px;
}

.learning-article p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.learning-article ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.learning-article li {
    margin-bottom: 8px;
}

.article-image {
    text-align: center;
    margin: 20px 0;
}

.article-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Vertical ad container styling */
.vertical-ad-container {
    width: 160px;
    height: 600px;
    min-width: 120px;
    min-height: 240px;
    background-color: #ecf0f1;
    border: 1px dashed #bdc3c7;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px;
    box-sizing: border-box;
}

.vertical-ad-placeholder {
    color: #7f8c8d;
    font-style: italic;
    text-align: center;
    padding: 10px;
    max-width: 100%;
    box-sizing: border-box;
}

/* Game page with vertical ads layout */
.game-page-with-ads {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
    margin: 0 auto;
}

.main-content {
    flex: 1;
    min-width: 300px;
    width: 100%;
    max-width: none;
}

.back-button {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    margin-bottom: 20px;
    transition: background-color 0.3s ease;
}

.fullscreen-button {
    display: block;
    background-color: #27ae60;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    margin: 10px auto;
    transition: background-color 0.3s ease;
    cursor: pointer;
    width: fit-content;
    border: none;
}

.fullscreen-button:hover {
    background-color: #219653;
}

.back-button:hover {
    background-color: #2980b9;
}

.game-title {
    text-align: center;
    color: #1f2937;
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 2rem;
    letter-spacing: 0.02em;
}

.game-desc {
    text-align: center;
    margin: 0 0 10px 0;
    color: #334155;
}

.game-brief {
    background: #ffffff;
    border: 1px solid #e5e9f0;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 12px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.05);
    line-height: 1.5;
    color: #1f2937;
}

.game-brief p {
    margin: 0 0 8px 0;
}

.game-brief ul {
    margin: 0 0 6px 18px;
    padding: 0;
}

.game-brief li {
    margin-bottom: 4px;
}

.game-hero-section {
    position: relative;
    overflow: hidden;
    width: 100vw;
    margin: -20px 0 16px 0;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    background-image: var(--game-hero, none);
    background-size: contain;
    background-position: center;
    background-repeat: repeat;
}

.game-hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0.85));
    z-index: 0;
}

.game-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 20px 20px 20px;
    color: #f8fafc;
}

.game-hero-text {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    text-align: center;
}

.game-hero-text .game-title {
    color: #f8fafc;
    margin-bottom: 4px;
}

.game-hero-text .game-desc {
    color: #e2e8f0;
    max-width: 820px;
    margin-bottom: 6px;
}

.game-highlight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    width: 100%;
    margin-top: 6px;
}

.highlight-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    padding: 10px 12px;
    color: #1f2937;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.highlight-card h4 {
    margin: 0 0 6px 0;
    font-size: 1rem;
    color: #0f172a;
}

.highlight-card p {
    margin: 0;
    font-size: 0.95rem;
    color: #334155;
}

.game-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    aspect-ratio: 800 / 450;
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-iframe {
    width: 100%;
    height: 100%;
    border: none;
    position: absolute;
    top: 0;
    left: 0;
    aspect-ratio: 800 / 450;
}

/* Responsive design */
@media (min-width: 768px) {
    .escape-mode-text {
        display: inline !important;
    }
}

@media (min-width: 1201px) {
    .game-grid {
        grid-template-columns: repeat(4, 300px);
        justify-content: center;
        gap: 10px;
    }
}

@media (min-width: 993px) and (max-width: 1200px) {
    .game-grid {
        grid-template-columns: repeat(3, 300px);
        justify-content: center;
        gap: 10px;
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    .game-grid {
        grid-template-columns: repeat(2, 300px);
        justify-content: center;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
        max-width: 100%;
    }

    header h1 {
        font-size: 2rem;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .header-left {
        min-width: unset;
    }

    .search-form {
        justify-content: center;
    }

    .search-form input {
        min-width: 150px;
    }

    .search-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        border-radius: 5px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        z-index: 100;
        max-height: 200px;
        overflow-y: auto;
        display: none;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 20px;
    }

    .footer-left p,
    .footer-right a {
        font-size: 0.85rem;
    }

    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        justify-content: center;
        gap: 8px;
    }

    .game-card {
        width: 100%;
        height: auto;
        aspect-ratio: 3/2;
    }

    .ad-card {
        width: 100%;
        height: auto;
        aspect-ratio: 3/2;
    }

    .game-container {
        width: 100%;
        height: auto;
        aspect-ratio: 800 / 450;
        margin: 20px auto;
    }

    /* Adjust vertical ads for smaller screens */
    .vertical-ad-container {
        width: 120px;
        height: 500px;
        min-width: 100px;
        min-height: 200px;
        display: none;
    }

    .game-page-with-ads {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .game-grid {
        grid-template-columns: 1fr;
        justify-content: center;
        gap: 8px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .game-container {
        aspect-ratio: 800 / 450;
    }

    .fullscreen-button {
        display: block;
        margin: 10px auto;
        width: fit-content;
    }
}

/* Game Guide Section Styling */
.game-guide-section {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
    line-height: 1.6;
}

.game-guide-section h2 {
    color: #2c3e50;
    font-size: 2.2rem;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

.game-guide-section h3 {
    color: #34495e;
    font-size: 1.8rem;
    margin: 40px 0 20px 0;
    padding-left: 15px;
    border-left: 4px solid #3498db;
}

.game-guide-section h4 {
    color: #2c3e50;
    font-size: 1.4rem;
    margin: 25px 0 15px 0;
}

.guide-intro {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 5px solid #3498db;
}

.guide-intro p {
    font-size: 1.1rem;
    margin: 0;
    color: #495057;
}

.strategy-section,
.advanced-section,
.tips-section,
.variants-section,
.benefits-section,
.learning-path {
    margin: 40px 0;
}

.technique-grid,
.tips-grid,
.variant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.technique-card,
.tip-card,
.variant-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.technique-card:hover,
.tip-card:hover,
.variant-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.technique-card h4,
.tip-card h4,
.variant-card h4 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

.technique-card p,
.tip-card p,
.variant-card p {
    margin: 0;
    color: #495057;
    line-height: 1.5;
}

.technique-card strong,
.variant-card strong {
    color: #3498db;
}

.advanced-technique {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #e74c3c;
}

.advanced-technique h4 {
    color: #e74c3c;
    margin: 0 0 10px 0;
}

.advanced-technique p {
    margin: 5px 0;
    color: #495057;
}

.benefits-list {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding-left: 0;
}

.benefits-list li {
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
    color: #495057;
}

.benefits-list li:last-child {
    border-bottom: none;
}

.benefits-list strong {
    color: #2c3e50;
    display: inline-block;
    min-width: 180px;
}

.progression-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.step {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.step h4 {
    margin: 0 0 15px 0;
    font-size: 1.3rem;
}

.step p {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .game-guide-section {
        padding: 0 15px;
        margin: 20px auto;
    }

    .game-guide-section h2 {
        font-size: 1.8rem;
    }

    .game-guide-section h3 {
        font-size: 1.5rem;
        margin: 30px 0 15px 0;
    }

    .technique-grid,
    .tips-grid,
    .variant-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .progression-steps {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .benefits-list {
        padding: 20px;
    }

    .benefits-list strong {
        display: block;
        margin-bottom: 5px;
        min-width: auto;
    }
}

/* Chess Guide Section Styling */
.pieces-section,
.openings-section,
.endgame-section,
.improvement-section,
.history-section {
    margin: 40px 0;
}

.pieces-grid,
.principle-grid,
.tactic-grid,
.opening-grid,
.endgame-grid,
.improvement-tips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.piece-card,
.principle-card,
.tactic-card,
.opening-card,
.endgame-card,
.improvement-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.piece-card:hover,
.principle-card:hover,
.tactic-card:hover,
.opening-card:hover,
.endgame-card:hover,
.improvement-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.piece-card h5,
.principle-card h4,
.tactic-card h4,
.opening-card h4,
.endgame-card h4,
.improvement-card h4 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

.piece-card p,
.principle-card p,
.tactic-card p,
.opening-card p,
.endgame-card p,
.improvement-card p {
    margin: 0;
    color: #495057;
    line-height: 1.5;
}

.tactic-card strong,
.opening-card strong {
    color: #3498db;
}

.timeline {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 25px 0;
}

.timeline-item {
    margin-bottom: 20px;
    padding-left: 20px;
    border-left: 3px solid #3498db;
    position: relative;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 0;
    width: 12px;
    height: 12px;
    background: #3498db;
    border-radius: 50%;
}

.timeline-item h4 {
    color: #2c3e50;
    margin: 0 0 8px 0;
    font-size: 1.1rem;
}

.timeline-item p {
    margin: 0;
    color: #495057;
    line-height: 1.5;
}

@media (max-width: 768px) {

    .pieces-grid,
    .principle-grid,
    .tactic-grid,
    .opening-grid,
    .endgame-grid,
    .improvement-tips {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .timeline {
        padding: 20px;
    }

    .timeline-item {
        padding-left: 15px;
    }
}

/* Tetris Guide Section Styling */
.tetrominoes-section,
.scoring-section,
.techniques-section,
.patterns-section,
.history-section {
    margin: 40px 0;
}

.tetrominoes-grid,
.scoring-grid,
.strategy-grid,
.technique-grid,
.pattern-grid,
.variant-grid,
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.tetromino-card,
.scoring-card,
.strategy-card,
.technique-card,
.pattern-card,
.variant-card,
.tip-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tetromino-card:hover,
.scoring-card:hover,
.strategy-card:hover,
.technique-card:hover,
.pattern-card:hover,
.variant-card:hover,
.tip-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.tetromino-shape {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin: 0 auto 15px auto;
    border-radius: 4px;
}

.i-shape {
    background: linear-gradient(45deg, #00f5ff, #00d4ff);
    color: white;
}

.o-shape {
    background: linear-gradient(45deg, #ffff00, #ffd700);
    color: black;
}

.t-shape {
    background: linear-gradient(45deg, #800080, #a000a0);
    color: white;
}

.s-shape {
    background: linear-gradient(45deg, #00ff00, #00d400);
    color: black;
}

.z-shape {
    background: linear-gradient(45deg, #ff0000, #d40000);
    color: white;
}

.j-shape {
    background: linear-gradient(45deg, #0000ff, #0000d4);
    color: white;
}

.l-shape {
    background: linear-gradient(45deg, #ff8000, #d47000);
    color: white;
}

.tetromino-card h5,
.scoring-card h4,
.strategy-card h4,
.technique-card h4,
.pattern-card h4,
.variant-card h4,
.tip-card h4 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    text-align: center;
}

.tetromino-card p,
.scoring-card p,
.strategy-card p,
.technique-card p,
.pattern-card p,
.variant-card p,
.tip-card p {
    margin: 0;
    color: #495057;
    line-height: 1.5;
}

.scoring-card .score {
    font-size: 1.4rem;
    font-weight: bold;
    color: #3498db;
    text-align: center;
    margin-top: 10px;
}

.bonus-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
    border-left: 4px solid #3498db;
}

.bonus-info h4 {
    color: #2c3e50;
    margin: 0 0 15px 0;
}

.bonus-info ul {
    margin: 0;
    padding-left: 20px;
}

.bonus-info li {
    margin-bottom: 8px;
    color: #495057;
}

.bonus-info strong {
    color: #3498db;
}

.history-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.fact-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.fact-card h4 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 1.1rem;
}

.fact-card p {
    margin: 0;
    color: #495057;
    line-height: 1.5;
}

@media (max-width: 768px) {

    .tetrominoes-grid,
    .scoring-grid,
    .strategy-grid,
    .technique-grid,
    .pattern-grid,
    .variant-grid,
    .tips-grid,
    .history-facts {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .tetromino-shape {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .bonus-info {
        padding: 15px;
    }
}

/* Pac-Man Guide Section Styling */
.characters-grid,
.strategy-grid,
.phases-grid,
.technique-grid,
.pattern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.character-card,
.strategy-card,
.phase-card,
.technique-card,
.pattern-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.character-card:hover,
.strategy-card:hover,
.phase-card:hover,
.technique-card:hover,
.pattern-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.character-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin: 0 auto 15px auto;
    border-radius: 50%;
}

.pacman {
    background: linear-gradient(45deg, #ffff00, #ffd700);
    color: black;
}

.blinky {
    background: linear-gradient(45deg, #ff0000, #d40000);
    color: white;
}

.pinky {
    background: linear-gradient(45deg, #ff69b4, #d4499a);
    color: white;
}

.inky {
    background: linear-gradient(45deg, #00ffff, #00d4d4);
    color: black;
}

.clyde {
    background: linear-gradient(45deg, #ffa500, #d48600);
    color: white;
}

.power {
    background: linear-gradient(45deg, #ffffff, #e0e0e0);
    color: #ff0000;
    border: 2px solid #ff0000;
}

.character-card h5,
.strategy-card h4,
.phase-card h4,
.technique-card h4,
.pattern-card h4 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    text-align: center;
}

.character-card p,
.strategy-card p,
.phase-card p,
.technique-card p,
.pattern-card p {
    margin: 0;
    color: #495057;
    line-height: 1.5;
}

.phase-note {
    background: #fff3cd;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #ffc107;
}

.phase-note p {
    margin: 0;
    color: #856404;
    font-weight: 500;
}

/* Battleship Guide Section Styling */
.ships-grid,
.placement-grid,
.targeting-grid,
.advanced-grid,
.mistakes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.ship-card,
.placement-card,
.targeting-card,
.advanced-card,
.mistake-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ship-card:hover,
.placement-card:hover,
.targeting-card:hover,
.advanced-card:hover,
.mistake-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.ship-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    margin: 0 auto 15px auto;
    border-radius: 4px;
}

.carrier {
    background: linear-gradient(45deg, #8b0000, #a00000);
    color: white;
}

.battleship {
    background: linear-gradient(45deg, #2f4f4f, #3a5a5a);
    color: white;
}

.cruiser {
    background: linear-gradient(45deg, #556b2f, #6b7f3f);
    color: white;
}

.submarine {
    background: linear-gradient(45deg, #191970, #252580);
    color: white;
}

.destroyer {
    background: linear-gradient(45deg, #8b4513, #a0551a);
    color: white;
}

.hit {
    background: linear-gradient(45deg, #ff0000, #d40000);
    color: white;
}

.ship-card h5,
.placement-card h4,
.targeting-card h4,
.advanced-card h4,
.mistake-card h4 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

.ship-card p,
.placement-card p,
.targeting-card p,
.advanced-card p,
.mistake-card p {
    margin: 0;
    color: #495057;
    line-height: 1.5;
}

.placement-card strong,
.targeting-card strong,
.advanced-card strong {
    color: #3498db;
}

@media (max-width: 768px) {

    .characters-grid,
    .strategy-grid,
    .phases-grid,
    .technique-grid,
    .pattern-grid,
    .ships-grid,
    .placement-grid,
    .targeting-grid,
    .advanced-grid,
    .mistakes-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .character-icon,
    .ship-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .phase-note {
        padding: 12px;
    }
}

/* Minesweeper Guide Section Styling */
.interface-grid,
.difficulty-grid,
.technique-grid,
.mistakes-grid,
.speed-tips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.interface-card,
.difficulty-card,
.technique-card,
.mistake-card,
.speed-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.interface-card:hover,
.difficulty-card:hover,
.technique-card:hover,
.mistake-card:hover,
.speed-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.interface-card h5,
.difficulty-card h4,
.technique-card h4,
.mistake-card h4,
.speed-card h4 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    text-align: center;
}

.interface-card p,
.difficulty-card p,
.technique-card p,
.mistake-card p,
.speed-card p {
    margin: 0;
    color: #495057;
    line-height: 1.5;
}

.difficulty-card .score {
    font-size: 1.4rem;
    font-weight: bold;
    color: #3498db;
    text-align: center;
    margin-top: 10px;
}

/* Snake Guide Section Styling */
.controls-grid,
.strategy-grid,
.pattern-grid,
.variant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.control-card,
.strategy-card,
.pattern-card,
.variant-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.control-card:hover,
.strategy-card:hover,
.pattern-card:hover,
.variant-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.control-card h5,
.strategy-card h4,
.pattern-card h4,
.variant-card h4 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    text-align: center;
}

.control-card p,
.strategy-card p,
.pattern-card p,
.variant-card p {
    margin: 0;
    color: #495057;
    line-height: 1.5;
}

.strategy-card strong,
.pattern-card strong,
.variant-card strong {
    color: #3498db;
}

/* Match-3 Guide Section Styling */
.mechanics-grid,
.special-grid,
.level-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.mechanic-card,
.special-card,
.level-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mechanic-card:hover,
.special-card:hover,
.level-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.mechanic-card h5,
.special-card h4,
.level-card h4 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

.mechanic-card p,
.special-card p,
.level-card p {
    margin: 0;
    color: #495057;
    line-height: 1.5;
}

.special-card strong,
.level-card strong {
    color: #3498db;
}

@media (max-width: 768px) {

    .interface-grid,
    .difficulty-grid,
    .technique-grid,
    .mistakes-grid,
    .speed-tips,
    .controls-grid,
    .strategy-grid,
    .pattern-grid,
    .variant-grid,
    .mechanics-grid,
    .special-grid,
    .level-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}