/* play.css (Atualizado com layout de anúncios laterais corrigido) */
:root {
    --bg-dark: #0b021a;
    --bg-light: #1d1d2b;
    --text-primary: #f5f5fa;
    --text-secondary: #a0a0b8;
    --accent-primary: #ff3c9a;
    --accent-secondary: #00e5ff;
    --border-color: #3a3a50;
    --font-family-body: 'Poppins', sans-serif;
    --font-family-title: 'Press Start 2P', cursive;
    --glow-secondary: rgba(0, 229, 255, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@keyframes pageEnter {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pageExit {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.95); }
}

body {
    font-family: var(--font-family-body);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    opacity: 0;
    background-image: 
        radial-gradient(1px 1px at 20px 30px, white, transparent),
        radial-gradient(1px 1px at 40px 70px, white, transparent),
        radial-gradient(2px 2px at 50px 160px, #ddd, transparent);
    background-repeat: repeat;
    background-size: 200px 200px, 150px 150px, 300px 300px;
}

body.page-enter {
    animation: pageEnter 0.4s ease-out forwards;
}

body.page-exit {
    animation: pageExit 0.4s ease-in forwards;
}

.play-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.5rem;
    background-color: rgba(11, 2, 26, 0.8);
    backdrop-filter: blur(5px);
    border-bottom: 2px solid var(--accent-secondary);
    box-shadow: 0 0 15px var(--glow-secondary);
    flex-shrink: 0;
    z-index: 10;
}

.back-button {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s, text-shadow 0.3s;
    font-size: 0.9rem;
}

.back-button:hover {
    color: var(--accent-secondary);
    text-shadow: 0 0 5px var(--glow-secondary);
}

#game-title {
    font-family: var(--font-family-title);
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-primary);
    text-shadow: 0 0 8px var(--glow-secondary);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 1rem;
}

.header-spacer {
    width: 80px;
    flex-shrink: 0;
}

.play-area-wrapper {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
    align-items: center;
    justify-content: center;
}

.side-ad-container {
    width: 180px; /* Largura para anúncio 160px + padding */
    height: 100%;
    flex-shrink: 0;
    padding: 1rem 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-content {
    width: 160px;
    height: 600px; /* Dimensões padrão para Skyscraper Ads */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

main.game-container {
    flex-grow: 1;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    overflow: hidden;
    min-width: 0;
}

#game-frame-container {
    width: 100%;
    height: 100%;
    max-width: 1400px;
    background-color: #000;
    border-radius: 12px;
    box-shadow: 0 0 25px var(--glow-secondary), 0 0 10px rgba(0,0,0,0.8) inset;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--accent-secondary);
}

#game-frame {
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsividade */
@media (max-width: 1200px) {
    .side-ad-container {
        display: none; /* Esconde os anúncios laterais em telas menores */
    }
}

@media (max-width: 600px) {
    #game-title { font-size: 0.8rem; }
    .header-spacer { width: 60px; }
    main.game-container { padding: 0.5rem; }
    #game-frame-container { border-radius: 0; border-left: none; border-right: none;}
}

@media (orientation: landscape) and (max-height: 550px) {
    .play-header { display: none; }
    .side-ad-container { display: none; }
    main.game-container { padding: 0; }
    #game-frame-container { border-radius: 0; border: none; }
}