/* Override game.css overflow restrictions for guide pages */
body {
    overflow: auto !important;
}

.main-content-container {
    overflow: auto !important;
    padding-top: 60px !important; /* Account for fixed top menu height */
}

.main-content {
    overflow: auto !important;
}

/* Guide container - main wrapper */
.guide-container {
    max-width: 1200px;
    margin: 0 auto 60px auto;
    padding: 20px;
}

/* Game information section */
.guide-game-info {
    background-color: var(--secondary-color);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

/* Button section - horizontal layout */
.guide-game-info--button {
    display: flex;
    gap: 24px;
    align-items: center;
}

/* Game screenshot in header */
.guide-header__image-wrap {
    flex-shrink: 0;
    max-width: 200px;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--color-dark);
}

.guide-header__image {
    width: 100%;
    height: auto;
    display: block;
}

/* Content area - game info and button */
.guide-header__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    min-width: 0;
}

/* Button wrapper - positioned on desktop */
.guide-header__button-wrap {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* Hide mobile button on desktop */
.guide-header__button-wrap--mobile {
    display: none;
}

/* Show desktop button on desktop */
.guide-header__button-wrap--desktop {
    display: flex;
}

/* Game title in header */
.guide-header__title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    line-height: 1.2;
}

/* Categories in header */
.guide-header__categories {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.guide-header__category {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--color-light);
    color: var(--text-color);
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.guide-header__category:hover {
    background-color: var(--highlight-color);
    color: var(--color-dark);
}

.guide-header__separator {
    color: var(--text-color);
    opacity: 0.5;
    margin: 0 4px;
}

/* Rating in header */
.guide-header__rating {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: var(--color-dark);
    border-radius: 8px;
    align-self: flex-start;
}

.guide-header__rating-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--highlight-color);
}

.guide-header__rating-text {
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.8;
}

.guide-game-info h4 {
    color: var(--highlight-color);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    margin-top: 20px;
}

.guide-game-info h4:first-of-type {
    margin-top: 0;
}

.guide-game-info .game-info-section {
    margin-bottom: 24px;
}

.guide-game-info .game-info-section:last-child {
    margin-bottom: 0;
}

/* Play button */
.guide-play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    background-color: var(--highlight-color);
    color: var(--color-dark);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    align-self: flex-start;
    margin-top: 4px;
}

.guide-play-button:hover {
    background-color: var(--text-color);
    color: var(--color-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(247, 181, 56, 0.3);
}

.guide-play-button i {
    font-size: 12px;
}

.guide-game-info h4 {
    color: var(--highlight-color);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    margin-top: 20px;
}

.guide-game-info h4:first-of-type {
    margin-top: 0;
}

.guide-game-info .game-info-section {
    margin-bottom: 24px;
}

.guide-game-info .game-info-section:last-child {
    margin-bottom: 0;
}

/* Guide content section */
.guide-content {
    background-color: var(--secondary-color);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 60px;
}

.guide-content h2 {
    color: var(--highlight-color);
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
}

/* YouTube embed container - responsive */
.guide-video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}

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

/* HTML content styling */
.guide-html-content {
    color: var(--text-color);
    line-height: 1.6;
}

.guide-html-content h1,
.guide-html-content h2,
.guide-html-content h3 {
    color: var(--highlight-color);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.guide-html-content h1 {
    font-size: 28px;
}

.guide-html-content h2 {
    font-size: 24px;
}

.guide-html-content h3 {
    font-size: 20px;
}

.guide-html-content p {
    margin-bottom: 1em;
}

.guide-html-content ul,
.guide-html-content ol {
    margin-left: 20px;
    margin-bottom: 1em;
}

.guide-html-content li {
    margin-bottom: 0.5em;
}

.guide-html-content a {
    color: var(--highlight-color);
    text-decoration: none;
}

.guide-html-content a:hover {
    text-decoration: underline;
}

.guide-html-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1em 0;
}

/* Error message styling */
.guide-error-message {
    background-color: var(--color-dark);
    border: 1px solid var(--color-light);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.guide-error-message p {
    color: var(--text-color);
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .guide-container {
        padding: 10px;
    }

    .guide-game-info {
        padding: 20px;
        margin-bottom: 20px;
    }

    /* Stack layout on mobile */
    .guide-game-info--button {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    .guide-header__image-wrap {
        max-width: 150px;
    }

    .guide-header__content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
    }

    .guide-header__title {
        font-size: 22px;
        order: 1;
    }

    .guide-header__button-wrap--mobile {
        display: flex;
        order: 2;
        margin-left: 0;
    }

    .guide-header__button-wrap--desktop {
        display: none;
    }

    .guide-header__categories {
        justify-content: center;
        order: 3;
    }

    .guide-header__category {
        font-size: 12px;
        padding: 3px 10px;
    }

    .guide-header__rating {
        padding: 6px 12px;
    }

    .guide-header__rating-value {
        font-size: 18px;
    }

    .guide-header__rating-text {
        font-size: 12px;
    }

    .guide-play-button {
        padding: 10px 24px;
        font-size: 14px;
    }

    .guide-content {
        padding: 20px;
    }

    .guide-content h2 {
        font-size: 20px;
    }

    .guide-html-content h1 {
        font-size: 24px;
    }

    .guide-html-content h2 {
        font-size: 20px;
    }

    .guide-html-content h3 {
        font-size: 18px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .guide-container {
        width: 95%;
        padding: 15px;
    }

    .guide-game-info {
        padding: 25px;
    }

    .guide-game-info--button {
        gap: 20px;
    }

    .guide-header__title {
        font-size: 24px;
    }

    .guide-content {
        padding: 25px;
    }
}
