@import url('https://fonts.googleapis.com/css2?family=Carter+One&display=swap');
* {
    font-family: helvetica, sans-serif;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}
body {
    background-color: rgba(0,0,0, .95);
    height: 100vh;
    margin: 0;
}

.container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 0 12px 24px;
}

/********************
* video game screen *
********************/
.game-title h1 {
/***** Flappy Bird *****/
    text-align: center;
    font-family: 'Carter One', cursive;
    color: rgb(251, 176, 37);
    font-size: 3em;
    line-height: 150%;
    letter-spacing: 4px;
    text-shadow: 2px 4px rgba(250,250,250, 1);
    margin: 0;
    position: relative;
    top: 10px;
}
.game-screen {
    /* background-color: rgb(69, 184, 194); */
    width: 300px;
    height: 500px;
    margin: 0 auto;
    position: relative;
    top: 50px;
}
    canvas {
        background-color: 
        black
        /* #00bbc4 */
        /* #d2ce89 */
        ;
        display: block;
        width: 300px;
        height: 500px;
        margin: 0 auto;
        border-radius: 10px;
    }
    .game-description {
        color: #f0f0f0;
        line-height: 2em;
        text-align: center;
    }

.ad-slot {
    width: 100%;
    max-width: 300px;
    min-height: 0;
    margin: 10px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 10px;
 
    max-height: 120px;
}

.ad-slot--home {
    margin: 8px auto 0;
    min-height: 70px;
    max-height: 70px;
 
}

.ad-slot--home:empty {
    background: transparent;
}

.ad-slot iframe,
.ad-slot img {
    max-width: 100% !important;
    height: auto !important;
    max-height: 120px !important;
}

.ad-slot--home iframe,
.ad-slot--home img {
    max-height: 70px !important;
}

.ad-slot:empty {
    display: none;
}

.ad-slot--home:empty {
    display: flex;
}

.ad-slot--popup {
    width: 100%;
    max-width: 300px;
    min-height: 0;
    margin: 0 auto;
    background: rgba(0,0,0,0.25);
    max-height: 200px;
}

.ad-popup-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0,0,0,0.75);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    height: 100vh;
    height: 100dvh;
}

.ad-popup-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.ad-popup {
    width: 100%;
    max-width: 360px;
    border-radius: 14px;
    background: rgba(20,20,20,0.98);
    box-shadow: 0 18px 50px rgba(0,0,0,0.6);
    padding: 14px;
}

.ad-popup__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.restart-countdown {
    color: #f0f0f0;
    font-size: 14px;
}

.restart-btn {
    border: 0;
    border-radius: 10px;
    padding: 10px 12px;
    background: rgb(251, 176, 37);
    color: #111;
    font-weight: 700;
    cursor: pointer;
}

.restart-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

@media (max-width: 380px) {
    .ad-popup {
        max-width: 320px;
        padding: 12px;
    }
    .ad-popup__footer {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
    }
    .restart-btn {
        width: 100%;
        padding: 10px;
    }
    .restart-countdown {
        text-align: center;
    }
}