body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Main game section */
section {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: var(--all-width);
    margin: 20px auto;
    padding: 0 15px;
    gap: 20px;
}

/* Game info bar */
.game-info-bar {
    width: 100%;
    background: #fff;
    padding: 15px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border-bottom: 3px solid #000;
}

.game-title {
    font-size: 20px;
    font-weight: 700;
    color: #000;
    margin: 0;
}

.game-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.game-category,
.game-size {
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

.game-category span,
.game-size span {
    font-weight: 600;
    color: #000;
}

/* Fullscreen button */
.fullscreen-btn {
    padding: 10px 20px;
    background: #000;
    color: #fff;
    border: 2px solid #000;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fullscreen-btn:hover {
    background: #fff;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.fullscreen-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Game container */
.game-container {
    width: 100%;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Fullscreen mode */
.game-container.fullscreen-mode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    margin: 0;
    box-shadow: none;
}

.game-container.fullscreen-mode .games {
    width: 100%;
    height: 100%;
}

.game-container.fullscreen-mode .games iframe {
    width: 100%;
    height: 100%;
}

.game-container.fullscreen-mode .back {
    display: flex;
}

.game-container.fullscreen-mode .exit-fullscreen {
    display: flex;
}

.games {
    width: 100%;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.games iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Back button */
.back {
    width: 40px;
    height: 40px;
    position: absolute;
    right: 10px;
    top: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    border: 2px solid #fff;
    transition: all 0.3s ease;
    z-index: 10;
}

.back:hover {
    background-color: #000;
    transform: scale(1.1);
}

.back img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

/* Exit fullscreen button */
.exit-fullscreen {
    width: 40px;
    height: 40px;
    position: absolute;
    left: 10px;
    top: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    border: 2px solid #fff;
    transition: all 0.3s ease;
    z-index: 10;
    cursor: pointer;
}

.exit-fullscreen:hover {
    background-color: #000;
    transform: scale(1.1);
}

.exit-fullscreen svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

/* Recommendations section */
.recommendations {
    width: 100%;
    background: #fff;
    padding: 25px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.recommendations h3 {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    margin: 0 0 20px 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.recommendation-item {
    display: flex;
    flex-direction: column;
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.recommendation-item:hover {
    border-color: #000;
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.recommendation-item .img-box {
    width: 100%;
    aspect-ratio: 1;
    background: #e0e0e0;
    overflow: hidden;
}

.recommendation-item .img-box::before {
    padding-top: 100%;
}

.recommendation-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recommendation-item:hover img {
    transform: scale(1.05);
}

.recommendation-title {
    padding: 12px 10px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    text-align: center;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    line-height: 1.3;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile landscape - fullscreen game */
@media only screen and (max-device-width: 768px) and (orientation: landscape) {
    header,
    footer,
    .game-info-bar,
    .recommendations,
    .social-share {
        display: none;
    }

    body {
        max-height: 100vh;
        overflow: hidden;
    }

    section {
        margin: 0;
        padding: 0;
        max-width: 100%;
        width: 100vw;
        height: 100vh;
    }

    .game-container {
        width: 100vw;
        height: 100vh;
    }

    .games {
        width: 100%;
        height: 100%;
    }

    .back {
        display: flex;
        position: fixed;
        right: 10px;
        top: 10px;
        z-index: 9999;
    }
}

/* Mobile portrait */
@media only screen and (max-device-width: 768px) and (orientation: portrait) {
    .logo > p {
        display: none;
    }

    .game-info-bar {
        padding: 12px 15px;
    }

    .game-title {
        font-size: 16px;
        width: 100%;
    }

    .game-meta {
        width: 100%;
        justify-content: space-between;
    }

    .recommendations-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }

    .recommendation-title {
        font-size: 12px;
        padding: 10px 8px;
        min-height: 45px;
    }
}

/* Desktop responsive */
@media screen and (max-width: 769px) {
    section {
        max-width: 100%;
    }

    .recommendations {
        padding: 20px 15px;
    }
}

/* Large desktop */
@media screen and (min-width: 1200px) {
    .recommendations-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}