.fullscreen {
    position: absolute;
    width: 100%;
    height: 100%
}

.center {
    text-align: center
}

.centered {
    margin-left: auto;
    margin-right: auto;
    display: block;
    text-align: center
}

#play_overlay {
    display: none;
    z-index: 10
}

.middle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%)
}

.middle_vertical {
    position: absolute;
    top: 50%;
    transform: translate(0%, -50%)
}

.edge {
    margin-left: auto;
    margin-right: auto;
    width: 164px;
    height: 180px;
    background-color: #b5d9ff;
    box-shadow: 5px 1px 5px rgba(0, 0, 0, 0.25);
    transform: rotate(-5deg);
}

.box {
    width: 164px;
    height: 164px;
    background-color: #f8fbff;
    position: relative;
}

.black {
    width: 132px;
    height: 156px;
    background-color: #0a1f33;
    position: absolute;
    top: 4px;
    right: 4px;
    margin: 0 auto;
}

.cover {
    width: 128px;
    height: 128px;
    margin: 2px
}

.title {
    font-size: 14px;
    font-family: 'baloo 2', ubuntu, verdana, sans-serif
}

.author {
    font-family: 'baloo 2', ubuntu, verdana, sans-serif;
    border-spacing: 0;
    font-size: 14px;
    color: #ccc;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: absolute;
    width: 150px;
    top: 4px;
    right: 142px;
    transform-origin: right top;
    transform: rotate(-90deg)
}

.loading {
    margin-top: 20px;
    margin-bottom: 10px
}

.description {
    font-family: 'baloo 2', ubuntu, verdana, sans-serif;
    display: inline-block;
    font-size: 16px;
    line-height: 1.2em;
    width: 240px
}

.button {
    border: 2px solid #00a2ff;
    border-radius: 7px;
    color: #0a1f33;
    background-color: #f0faff;
    font-weight: 500;
    transition: all 0.2s ease;
}

.button:hover {
    background-color: #00a2ff;
    color: #fff;
    box-shadow: 0 0 8px rgba(0, 162, 255, 0.4);
}

.overlay_button {
    border: 2px solid #0a1f33;
    background-color: #00a2ff;
    color: #fff;
    border-radius: 7px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.overlay_button:hover {
    background-color: #0092e0;
    box-shadow: 0 0 10px rgba(0, 162, 255, 0.5);
}

#play_button {
    color: #0a1f33;
    background-color: #e9f5ff;
    border: 2px solid #00a2ff;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.2s ease;
}

#play_button:hover {
    background-color: #00a2ff;
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 162, 255, 0.6);
}

.emscripten_border {
    position: relative
}

#gradient {
    background-image: linear-gradient(135deg, #a1c4fd, #c2e9fb);
    position: absolute;
    top: 0;
    width: 100%;
    height: 768px
}

* {
    margin: 0;
    padding: 0
}

p,
ul,
ol,
dl {
    margin-bottom: 1em
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
dl {
    margin-left: 16px;
    margin-right: 16px
}

img {
    vertical-align: top
}

html,
body {
    font-family: 'Baloo 2', cursive;
    font-size: 18px;
    color: #bbb;
    padding: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    border: 0;
    line-height: 1.8;
    overflow: hidden;
    display: block
}

canvas {
    padding-right: 0;
    margin-left: auto;
    margin-right: auto;
    display: block;
    margin-top: auto;
    margin-bottom: auto;
    position: relative;
    width: 1024px;
    height: 768px
}

div.emscripten {
    text-align: center
}

canvas.emscripten {
    border: 0;
    background-color: #000
}

#status {
    display: inline-block;
    width: 100%;
    font-weight: 700;
    color: #787878;
    text-align: center
}

#modal_parent {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: #000;
    background-color: rgba(0, 0, 0, .4)
}

.modal_inner {
    display: none
}

#play_content {
    color: #fff;
    z-index: 10
}

#modal_content {
    position: relative;
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    box-sizing: border-box
}

.error_message {
    color: red
}

.error_text {
    color: red;
    font-family: sans-serif;
    font-size: .8em
}

#modal_close_button {
    color: #aaa;
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    line-height: 28px;
    font-weight: 700;
    transition: .2s
}

#modal_close_button:hover,
#modal_close_button:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer
}

a:link {
    color: #00b9fe;
    text-decoration: none;
    transition: .2s
}

a:visited {
    color: #00b9fe
}

a:hover,
a:active {
    opacity: .5
}

.link_image_button {
    margin-right: 10px
}

.playstore075 {
    width: 153px;
    height: 45px
}

.appstore075 {
    width: 135px;
    height: 45px
}

#progress_or_play {
    margin-top: 10px
}

#terms_p {
    font-family: sans-serif;
    color: #141414;
    font-size: .7em;
    margin-bottom: 0
}

#terms_p a {
    color: #f0f0f0
}

.deeplink_message {
    font-size: 1em;
    color: #f0f0f0;
    line-height: 1.1em;
    font-size: 20px
}

.menu {
    color: #f0f0f0
}

.level_button {
    border: 2px solid #008ae6;
    border-radius: 1em;
    color: #ffffff;
    background-color: #4facfe;
    line-height: 1em;
    height: 2.5em;
    width: 5em;
    justify-self: center;
    position: relative;
    padding-top: 0.6em;
    transition: all 0.25s ease;
}

.level_button:hover {
    background-color: #00f2fe;
    border-color: #00cfff;
    box-shadow: 0 0 10px rgba(0, 162, 255, 0.4);
    cursor: pointer;
}

.grid_element_center {
    justify-self: center
}

.level_button_name {
    font-size: .6em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.level_button_number {
    font-size: 1.2em
}

.level_checkmark {
    position: absolute;
    right: 0;
    top: 0;
    margin: 0;
    padding: 0;
    text-align: right;
    font-size: 1.2em;
    line-height: 1.2em
}

.level_button a {
    color: #f0f0f0;
    opacity: 1
}

.menu_items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px
}

.menu_header {
    font-size: 3em;
    margin-top: 40px
}

#webview_content {
    display: none;
    background-color: transparent;
    position: absolute;
    top: 0;
    width: 100%;
    height: 768px
}

.webview {
    width: 100%;
    height: 100%;
    background: 0 0;
    margin: 0;
    border: 0;
    overflow: hidden
}

.level {
    font-size: 14px;
    font-family: 'baloo 2', ubuntu, verdana, sans-serif;
    color: #fff;
    margin-top: 6px;
}

/* Ad Modal Styles */
.ad-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 20000;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    padding: 15px;
    padding-top: 40px;
    box-sizing: border-box;
    overflow-y: auto;
}

.ad-modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 700px;
    gap: 12px;
}

.ad-title {
    color: white;
    margin-bottom: 4px;
    font-family: 'Baloo 2', cursive;
    text-align: center;
    padding: 0 10px;
    font-size: clamp(1.1rem, 3vw, 1.5rem);
}

.ad-container {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 12px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    box-sizing: border-box;
    min-height: 0;
}

.ad-slot {
    background: transparent;
    width: 300px;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    overflow: visible;
    flex-shrink: 0;
    position: relative;
}

.ad-slot iframe {
    border: none;
    display: block;
}

.ad-timer {
    color: white;
    margin-top: 6px;
    font-size: 18px;
    font-weight: bold;
    font-family: 'Baloo 2', cursive;
    text-align: center;
}

.ad-close-btn {
    display: none;
    margin-top: 6px;
    padding: 12px 35px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #00a2ff, #0080e0);
    color: #fff;
    font-family: 'Baloo 2', cursive;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 162, 255, 0.3);
}

.ad-close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 162, 255, 0.5);
}

/* Mobile Ad Styles */
@media (max-width: 700px) {
    .ad-modal {
        padding: 10px;
        padding-top: 30px;
        justify-content: flex-start;
    }

    .ad-container {
        padding: 10px;
        gap: 10px;
    }

    .ad-slot {
        width: 100%;
        max-width: 300px;
        height: auto;
        aspect-ratio: 300/250;
    }
}

/* Native Banner Container */
.native-banner-container {
    width: 100%;
    max-width: 700px;
    min-height: 150px;
    margin: 5px auto;
    padding: 4px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.native-banner-container iframe {
    border: none;
    display: block;
    width: 100%;
    height: 150px;
}

/* Progress Bar */
.ad-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 5px;
}

.ad-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00a2ff, #0080e0);
    border-radius: 2px;
    transition: width 1s linear;
}
