:root {
    --bg: #06060f;
    --panel: #120c2acc;
    --border: #b487ff66;
    --text: #e8f4ff;
    --muted: #c3b0df;
    --accent: #b487ff;
    --accent-2: #dfb8ff;
    --shadow: 0 24px 40px #00000066;
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Space Grotesk", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
    overflow-x: hidden;
}

h1,
h2 {
    margin: 0;
    line-height: 1.15;
}

.page {
    min-height: 100%;
    width: 100%;
    margin: 0;
    padding: clamp(14px, 2vw, 26px) clamp(10px, 1.5vw, 18px);
    display: flex;
    align-items: stretch;
    gap: clamp(12px, 1.8vw, 24px);
}

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.center {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    justify-items: center;
    gap: 14px;
}

.title {
    font-size: clamp(2rem, 6vw, 3.25rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    background: linear-gradient(90deg, #8e6cff, #c474ff 70%, #e2a2ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tag {
    margin: 0;
    color: var(--muted);
    text-align: center;
    font-size: clamp(0.78rem, 1.2vw, 0.98rem);
}

.frame-shell {
    height: 80vh;
    aspect-ratio: 13 / 9;
    width: min(100%, calc(80vh * 13 / 9));
    border-radius: var(--radius);
    overflow: hidden;
    background: #050d17;
}

iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #000;
}

.play-button {
    display: none;
    width: min(100%, 360px);
    padding: 16px 22px;
    line-height: 1;
    border-radius: 999px;
    border: 1px solid #d9c2ff99;
    background: linear-gradient(135deg, #7a4be0 0%, #b06dff 100%);
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 800;
    text-align: center;
}

@media (max-aspect-ratio: 4/3) {
    .play-button {
        display: grid;
        place-items: center;
    }
}

.store {
    flex: 0 0 clamp(190px, 21vw, 260px);
    min-height: 80vh;
    padding: 16px;
    display: grid;
    align-content: center;
    gap: 14px;
}

.store h2 {
    text-transform: uppercase;
    font-size: clamp(0.95rem, 1.3vw, 1.1rem);
    letter-spacing: 0.12em;
    color: var(--accent-2);
}

.store-item {
    width: 100%;
}

.store-badge-link,
.store-badge-disabled {
    display: block;
    width: 100%;
    border-radius: 12px;
    border: 1px solid #c9a0ff66;
    background: #140d2b;
    padding: 8px;
}

.store-badge {
    display: block;
    width: 100%;
    height: auto;
}

.store-badge-disabled {
    position: relative;
}

.store-badge-disabled .store-badge {
    filter: grayscale(1);
    opacity: 0.55;
}

.coming-soon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 80%;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #f0e6ff;
    background: #5f3f99;
    border: 1px solid #e4d5ff;
    box-shadow: 0 4px 14px #00000055;
    border-radius: 999px;
    padding: 5px 10px;
    width: max-content;
}

.play-page {
    display: block;
    height: 100dvh;
    overflow: hidden;
}

.game-wrap {
    position: relative;
    height: 100%;
    min-height: 0;
    background: #06060f;
    padding-top: 86px;
    overflow: hidden;
}

.close-button {
    position: absolute;
    top: 0.5em;
    left: 0.5em;
    z-index: 10;
    width: 1.8em;
    height: 1.8em;
    display: flex;
    place-items: center;
    justify-content: center;
    border-radius: 15%;
    border: 1px solid #aa88ff;
    background: #1a1040;
    color: #aa88ff;
    text-decoration: none;
    font-size: 1.7rem;
    line-height: 0;
    padding: 0;
}

.play-page .game-wrap iframe {
    width: 100%;
    height: calc(100% - 86px);
}

@media (max-aspect-ratio: 4/3) {
    .page {
        display: grid;
        grid-template-columns: 1fr;
        width: min(100%, 760px);
    }

    .panel,
    .center {
        width: 100%;
    }

    .store {
        min-height: auto;
    }

    .center {
        order: 1;
        padding: 24px 18px;
    }

    .store {
        order: 2;
    }

    .frame-shell {
        display: none;
    }

    .play-button {
        display: grid;
        place-items: center;
    }
}