/* Retro Room – common layout (header, footer, left/right containers) */
/* Matches site-wide common.css for header, footer, overflow and scrollbars */

/* Prevent horizontal overflow (same as common.css) */
html {
    overflow-x: hidden;
    box-sizing: border-box;
}
*, *::before, *::after {
    box-sizing: inherit;
}

/* BASIC RESET & LAYOUT - theme.css provides variables */
body {
    font-family: 'Outfit', 'Plus Jakarta Sans', Arial, sans-serif;
    background: var(--bg-color, #0B0E14);
    color: var(--text-primary, #F8FAFC);
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    max-width: 100vw;
    transition: background-color 0.2s ease, color 0.2s ease;
}

a {
    color: var(--text-primary, #F8FAFC);
}
a:hover {
    color: var(--accent, #ffae00);
}

/* HEADER (same structure as common.css) */
header {
    background-color: #282828;
    color: white;
    padding: 20px 24px 0;
    padding-right: 20%;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

header > a {
    margin-left: auto;
    display: block;
}
header > a .logo {
    margin-left: auto;
    margin-right: 0;
}

header .logo {
    max-height: 75px;
    height: 100%;
    max-width: 100%;
}

header .logo img {
    height: 75px;
    vertical-align: middle;
}

/* MENU TOGGLE (mobile) */
.menu-toggle {
    display: none;
    position: absolute;
    left: 20px;
    top: 20px;
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* MAIN LAYOUT */
main {
    width: 100%;
    max-width: 100%;
    display: flex;
    gap: 50px;
    min-width: 0;
}

/* LEFT SIDEBAR */
.left_container {
    max-width: 350px;
    width: 100%;
    padding-top: 24px;
    min-width: 0;
}

.left_container .footer {
    margin-top: 24px;
}

/* Footer styles: common.css */

/* CENTER CONTENT */
.main_container {
    padding: 24px;
    text-align: left;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.main_container h1 {
    font-size: 2rem;
}

/* Game content wrapper – keeps game layout/centering without affecting site chrome */
.main_container .game-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 50vh;
}

/* RIGHT SIDEBAR */
.right_container {
    max-width: 350px;
    width: 100%;
    padding-top: 24px;
    min-width: 0;
}

/* SIDEBAR GAME LIST */
.game-list {
    display: grid;
    gap: 20px;
    padding: 15px;
}

.game-list h2 {
    font-size: 1.1rem;
    margin: 0 0 10px 0;
    color: var(--text-primary, #F8FAFC);
}

.game-list a {
    text-decoration: none;
    color: inherit;
}

.game {
    background-color: var(--surface-color, #161B22);
    border: 3px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 10px;
    text-align: center;
    color: var(--text-primary, #F8FAFC);
    font-size: 12px;
    margin-top: 7px;
    display: block;
}

.game:hover {
    border: 3px solid var(--accent, #ffae00);
    background-color: var(--header-footer-color, #282828);
    color: var(--accent, #ffae00);
}

/* RIGHT SIDEBAR BANNERS */
.vibe_check_bunner,
.know-me_bunner,
.bigtale_quize {
    margin: 10px 10px 20px 10px;
}

.vibe_check_bunner a,
.know-me_bunner a,
.bigtale_quize a {
    display: block;
    text-decoration: none;
    overflow: hidden;
    border-radius: 15px;
}

.vibe_check_bunner img,
.know-me_bunner img {
    width: 100%;
    max-width: 330px;
    height: auto;
    display: block;
    border-radius: 15px;
    object-fit: cover;
}

.bigtale_quize_img {
    max-width: 330px;
    width: 100%;
    height: auto;
}

.faq_right_container {
    padding: 20px 10px 10px 10px;
}

.faq_right_container h3 {
    font-size: 1rem;
    margin: 15px 0 8px 0;
    color: var(--text-primary, #F8FAFC);
}

.faq_right_container p {
    font-size: 0.9rem;
    margin: 0 0 10px 0;
    color: var(--text-secondary, #8B949E);
}

/* INDEX PAGE – arcade grid */
.arcade-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 100%;
    margin-bottom: 40px;
}
.arcade-container-bottom {
    display: grid;
    /* grid-template-columns: repeat(4, minmax(280px, 1fr)); */
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 100%;
    margin-bottom: 40px;
}

.game-card {
    background: var(--surface-color, #161B22);
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary, #F8FAFC);
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.game-card-bottom {
    background: var(--surface-color, #161B22);
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary, #F8FAFC);
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: var(--accent, #ffae00);
}

.game-card .icon {
    font-size: 3rem;
    margin-bottom: 15px;
}
.game-card-bottom .icon {
    /* font-size: 3rem; */
    margin-bottom: 15px;
}

.game-card .title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.skill-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
    background: var(--surface-color, #161B22);
    color: var(--text-secondary, #8B949E);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.game-card:hover .skill-tag {
    background: var(--accent, #ffae00);
    color: var(--text-primary, #0F172A);
}

.tagline {
    color: var(--text-secondary, #8B949E);
    margin-bottom: 24px;
    font-size: 1.1rem;
}

/* Retro Room games list (under game-content) */
.retro-room-games {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color, rgba(255,255,255,0.1));
}

.retro-room-games h2 {
    font-size: 1.25rem;
    margin: 0 0 12px 0;
    color: var(--text-primary, #F8FAFC);
}

.retro-room-games-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.retro-room-games-list a {
    display: inline-block;
    padding: 8px 14px;
    background: var(--surface-color, #161B22);
    border: 2px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 8px;
    color: var(--text-primary, #F8FAFC);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.retro-room-games-list a:hover {
    border-color: var(--accent, #ffae00);
    background: var(--header-footer-color, #282828);
    color: var(--accent, #ffae00);
}

/* Play-more block (random daily, fandom, vibe check banner) */
.play-more-quizzes {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color, rgba(255,255,255,0.1));
}

.play-more-section {
    margin-bottom: 36px;
}

.play-more-section:last-child {
    margin-bottom: 0;
}

.play-more-heading {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--text-primary, #F8FAFC);
}

.play-more-link {
    display: inline-block;
    margin-bottom: 24px;
    color: var(--text-primary, #F8FAFC);
    font-weight: 600;
    text-decoration: none;
    font-size: 1.5rem;
}

.play-more-link:hover {
    text-decoration: underline;
}

.play-more-quiz-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.play-more-quiz-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: var(--surface-color, #161B22);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-decoration: none;
    color: var(--text-primary, #F8FAFC);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
}

.play-more-quiz-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.play-more-quiz-img {
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
    height: 180px;
    width: 100%;
    max-width: 200px;
}

.play-more-quiz-title {
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}

.play-more-vibe {
    text-align: center;
}

.vibe-check-banner-link {
    display: inline-block;
    max-width: 100%;
}

.vibe-check-banner-img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.social_icons {
    color: var(--text-primary, #F8FAFC);
}

@media (max-width: 640px) {
    .play-more-quiz-grid {
        grid-template-columns: 1fr;
    }
}

/* RESPONSIVE */
@media (max-width: 1600px) {
    main {
        gap: 20px;
    }
    .left_container,
    .right_container {
        max-width: 250px;
    }
}

@media (max-width: 1000px) {
    body.menu-open {
        overflow: hidden;
    }
    main {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    header {
        padding-top: 10px;
        height: auto;
    }
    footer {
        height: auto !important;
        padding-top: 30px;
        padding-bottom: 20px;
    }
    .menu-toggle {
        display: block;
    }
    .logo {
        max-height: 60px;
    }
    .left_container {
        position: fixed;
        top: 0;
        left: -350px;
        width: 280px;
        height: 100%;
        background: var(--surface-color, #161B22);
        z-index: 1000;
        transition: 0.3s;
        box-shadow: 2px 0 10px rgba(0,0,0,0.5);
        padding-top: 60px;
    }
    .left_container.open {
        left: 0;
    }
    .right_container,
    .main_container {
        width: auto;
    }
    .right_container {
        max-width: 100%;
        margin-bottom: 20px;
    }
    .game-list h2 {
        color: #ffae00;
    }
    .left_container .game-list {
        max-height: 500px;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: #ffae00 #282828;
    }
    .social_icons {
        font-size: 30px;
    }
    .social-icon-link {
        width: 40px;
    }
}

@media (max-width: 600px) {
    .arcade-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    header {
        padding: 10px;
    }
    .logo img {
        max-height: 40px;
    }
    .sidebar_footer {
        flex-direction: column;
    }
}

/* Game modal (replaces alert) */
.game-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.game-modal-overlay.game-modal-visible {
    display: flex;
}

.game-modal-box {
    background: var(--surface-color, #161B22);
    color: var(--text-primary, #F8FAFC);
    border-radius: 12px;
    padding: 24px;
    max-width: 360px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
}

.game-modal-message {
    margin: 0 0 20px 0;
    font-size: 1.1rem;
    line-height: 1.4;
    color: var(--text-primary, #F8FAFC);
}

.game-modal-btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #F8FAFC);
    background: var(--button-bg, #282828);
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.game-modal-btn:hover {
    background: var(--accent, #ffae00);
    color: var(--text-primary, #0F172A);
}

/* Social share (same design as daily quizzes) */
.social_share_section {
    margin-top: 32px;
    margin-bottom: 32px;
    text-align: center;
}

.social_share_section h2 {
    font-size: 1.25rem;
    margin: 0 0 16px 0;
    color: var(--text-primary, #F8FAFC);
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.share-buttons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    color: var(--text-primary, #F8FAFC);
    font-size: 28px;
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 10px;
    background: var(--surface-color, #161B22);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.share-buttons a:hover {
    background: var(--header-footer-color, #282828);
    color: var(--accent, #ffae00);
}
