:root {
    --bg: #071225;
    --panel: #ffffff;
    --text: #101828;
    --muted: #667085;
    --line: #e4e7ec;
    --blue: #1388ff;
    --cyan: #00c2ff;
    --pink: #ff3d8b;
    --orange: #ff9f1c;
    --green: #21c45d;
    --danger: #d92d20;
    --success: #16803c;
    --shadow: 0 18px 45px rgba(3, 10, 28, .18);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 4%, rgba(0, 194, 255, .22), transparent 24%),
        radial-gradient(circle at 92% 2%, rgba(255, 61, 139, .16), transparent 24%),
        linear-gradient(180deg, #dff4ff 0, #eef8ff 320px, #f7fbff 321px);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px clamp(18px, 5vw, 58px);
    color: #18355f;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #18355f;
    font-size: 31px;
    font-weight: 900;
    letter-spacing: .2px;
    text-decoration: none;
    text-shadow: none;
}

.brand span {
    color: var(--pink);
}

.site-header nav {
    display: flex;
    gap: 12px;
    font-weight: 800;
}

.site-header nav a {
    padding: 9px 13px;
    border: 1px solid rgba(19, 136, 255, .20);
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    text-decoration: none;
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    padding: 26px 16px 36px;
    color: #39506f;
    font-size: 14px;
    font-weight: 800;
}

.site-footer a {
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--blue);
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0 56px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 26px;
    align-items: center;
    min-height: 255px;
    color: #18355f;
}

.hero h1,
.play-header h1 {
    margin: 0 0 12px;
    font-size: clamp(24px, 3.4vw, 38px);
    line-height: 1;
}

.hero p,
.play-header p {
    max-width: 680px;
    color: #45617f;
    font-size: 18px;
}

.eyebrow,
.game-tag {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: #fff;
    color: #0f5fc4;
    box-shadow: 0 6px 16px rgba(19, 136, 255, .13);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .6px;
    text-transform: uppercase;
}

.hero-panel {
    position: relative;
    min-height: 205px;
    border: 3px solid rgba(255, 255, 255, .78);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(19, 136, 255, .88), rgba(255, 61, 139, .86)),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, .20) 0 10px, transparent 10px 20px);
    box-shadow: 0 18px 42px rgba(19, 136, 255, .18);
    overflow: hidden;
}

.hero-score {
    position: absolute;
    right: 24px;
    bottom: 22px;
    padding: 10px 15px;
    border-radius: 12px;
    background: #fff;
    color: #0f5fc4;
    font-size: 34px;
    font-weight: 900;
}

.hero-orbit {
    position: absolute;
    border-radius: 50%;
}

.hero-orbit.one {
    width: 92px;
    height: 92px;
    left: 32px;
    top: 30px;
    background: #21c45d;
    box-shadow: 18px 18px 0 #ffe14d;
}

.hero-orbit.two {
    width: 62px;
    height: 62px;
    right: 56px;
    top: 38px;
    background: #ff9f1c;
    box-shadow: -13px 22px 0 #00c2ff;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
    gap: 22px;
    margin-top: 18px;
}

.game-card,
.empty,
.admin-panel,
.table-wrap {
    background: var(--panel);
    border: 1px solid rgba(16, 24, 40, .08);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(16, 24, 40, .08);
}

.game-card {
    overflow: hidden;
    transition: transform .16s ease, box-shadow .16s ease;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px rgba(16, 24, 40, .16);
}

.thumb {
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 10;
    background:
        linear-gradient(135deg, rgba(0, 194, 255, .95), rgba(255, 61, 139, .95)),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, .2) 0 9px, transparent 9px 18px);
    color: #fff;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fallback-thumb {
    max-width: 85%;
    font-size: 28px;
    line-height: 1.05;
    text-shadow: 0 3px 0 rgba(0, 0, 0, .22);
}

.game-info {
    padding: 16px;
}

.game-info h2 {
    margin: 10px 0 8px;
    font-size: 22px;
    line-height: 1.15;
}

.game-info p,
.empty p,
.hint {
    color: var(--muted);
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 17px;
    color: var(--muted);
    font-size: 14px;
}

.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 17px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--pink), var(--orange));
    color: #fff;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 9px 20px rgba(255, 61, 139, .25);
}

.button:hover,
button:hover {
    filter: brightness(.96);
}

.button.secondary {
    background: #eaf2ff;
    color: #0f3f7a;
    box-shadow: none;
}

.button.danger {
    background: var(--danger);
}

.empty {
    padding: 30px;
    text-align: center;
}

.seo-section {
    margin-top: 34px;
    padding: 24px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(16, 24, 40, .08);
}

.seo-section h2 {
    margin: 0 0 8px;
    font-size: 26px;
}

.seo-section p {
    max-width: 880px;
    margin: 0;
    color: var(--muted);
}

.play-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    color: #18355f;
}

.description {
    max-width: 860px;
    color: #405875;
    font-size: 17px;
}

.description a {
    color: #0f5fc4;
    font-weight: 900;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.play-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    min-width: 220px;
}

.fullscreen-button {
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 9px 20px rgba(19, 136, 255, .22);
    white-space: nowrap;
}

.google-play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
}

.google-play-button img {
    display: block;
    width: auto;
    height: 56px;
    max-width: 220px;
}

.game-frame-wrap {
    overflow: hidden;
    background: #0f2749;
    border: 4px solid #fff;
    border-radius: 12px;
    aspect-ratio: 16 / 9;
    box-shadow: var(--shadow);
}

.game-frame {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.admin-layout {
    max-width: 960px;
}

.legal-page {
    max-width: 920px;
}

.legal-card {
    background: #fff;
    border: 1px solid rgba(16, 24, 40, .08);
    border-radius: 8px;
    box-shadow: 0 14px 32px rgba(16, 24, 40, .10);
    padding: clamp(22px, 4vw, 38px);
}

.legal-card h1 {
    margin-top: 0;
    font-size: clamp(32px, 5vw, 48px);
}

.legal-card h2 {
    margin: 28px 0 8px;
    font-size: 22px;
}

.legal-card p {
    color: #43536b;
}

.admin-layout h1 {
    color: #18355f;
}

.admin-panel {
    padding: 24px;
}

.admin-panel h1 {
    color: var(--text);
}

.brand-login {
    color: var(--blue);
}

.form-grid {
    display: grid;
    gap: 16px;
}

.field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 900;
}

input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 1px dashed #98a2b3;
    border-radius: 8px;
    background: #f8fbff;
}

textarea {
    min-height: 130px;
    resize: vertical;
}

.hint {
    margin: 6px 0 0;
    font-size: 14px;
}

.alert {
    padding: 12px 14px;
    margin-bottom: 16px;
    border-radius: 8px;
    font-weight: 800;
}

.alert.error {
    background: #fff0ee;
    color: var(--danger);
}

.alert.success {
    background: #ecfdf3;
    color: var(--success);
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 13px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

tr:last-child td {
    border-bottom: 0;
}

.status {
    font-weight: 900;
}

@media (max-width: 760px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        min-height: 150px;
    }

    .hero h1,
    .play-header h1 {
        font-size: 34px;
    }

    .play-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .play-actions {
        justify-content: flex-start;
        min-width: 0;
        width: 100%;
    }
}
