.app-shell { min-height: calc(100vh - 120px); width: 100%; }
.hero {
    margin: clamp(16px, 3vw, 34px) 0 clamp(14px, 2.5vw, 28px);
    display: flex;
    justify-content: center;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
    text-align: center;
}
.hero > div { max-width: 900px; }
.hero h1 { font-size: clamp(2rem, 4.7vw, 3.6rem); line-height: 1; margin-bottom: 10px; }
.hero p { color: #d8d7ff; max-width: 760px; margin-left: auto; margin-right: auto; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 14px 0 20px; }
.toolbar input, .toolbar select, .form input, .form textarea, .form select {
    width: 100%; padding: 12px 14px; border-radius: 6px; border: 1px solid rgba(255,255,255,.2);
    background: #3f3a72; color: #fff; font-size: 15px; line-height: 1.2;
}
.toolbar select, .form select { color-scheme: dark; cursor: pointer; }
.toolbar select option, .form select option {
    background: #201a46;
    color: #fff;
    font-size: 15px;
}
.toolbar select option:checked, .form select option:checked {
    background: #2563eb;
    color: #fff;
}
.toolbar input[type="checkbox"], .form input[type="checkbox"] { width: auto; min-width: 0; }
.toolbar label { display: inline-flex; align-items: center; gap: 8px; }
.toolbar input { min-width: min(320px, 100%); flex: 1 1 320px; }
.toolbar select { width: auto; min-width: 160px; flex: 0 1 190px; }
.password-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}
.password-field input { min-width: 0; }
.password-toggle {
    min-height: 44px;
    padding: 0 12px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,.22);
    background: rgba(255,255,255,.12);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}
.hp-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.btn, .form button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 16px; border: 0; border-radius: 6px; background: linear-gradient(45deg,#ff00ff,#00ffff);
    color: #080a18; font-weight: 800; text-decoration: none; cursor: pointer;
}
.btn.secondary { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.2); }
.form .password-toggle,
.inline-form .password-toggle {
    min-height: 44px;
    padding: 0 12px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,.22);
    background: rgba(255,255,255,.12);
    color: #fff;
    font-weight: 800;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 8px; overflow: hidden; }
.card-body { padding: 14px; }
.card h2, .card h3 { font-size: 1.05rem; margin-bottom: 7px; }
.card-title-link { color: inherit; text-decoration: none; }
.card-title-link:hover { color: #22d3ee; }
.card-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.card-description-full {
    margin-top: 10px;
    padding: 10px;
    border-radius: 6px;
    background: rgba(0,0,0,.22);
    border: 1px solid rgba(255,255,255,.12);
}
.card-description-full p { margin: 0; color: #f4f4ff; }
.muted { color: #c7c4e8; }
.category-link {
    color: #a5f3fc;
    text-decoration: none;
    font-weight: 800;
}
.category-link:hover, .category-link:focus {
    color: #22d3ee;
    text-decoration: underline;
}
.thumb { aspect-ratio: 16/9; width: 100%; object-fit: cover; background: rgba(0,0,0,.25); display: block; }
.thumb-link { display: block; color: inherit; text-decoration: none; }
.thumb-link:hover .thumb { filter: brightness(1.1); }
.form { max-width: 760px; display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 700; }
.alert { padding: 12px 14px; border-radius: 6px; margin: 12px 0; }
.alert.error { background: rgba(255,60,90,.18); border: 1px solid rgba(255,60,90,.5); }
.alert.success { background: rgba(60,255,150,.15); border: 1px solid rgba(60,255,150,.45); }
.profile-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; margin: 18px 0; }
.avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: #132033; border: 2px solid rgba(255,255,255,.18); }
.verified-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 9px; background: rgba(34,211,238,.16); border: 1px solid rgba(34,211,238,.45); color: #a5f3fc; font-size: .85rem; font-weight: 800; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-action { display: inline-flex; margin: 0; }
.admin-games-list {
    display: grid;
    gap: 12px;
}
.admin-game-card {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    gap: 14px;
    padding: 12px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 8px;
}
.admin-game-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}
.admin-game-thumb {
    width: 72px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    margin: 0;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,.2);
    background: rgba(0,0,0,.25);
}
.admin-path {
    overflow-wrap: anywhere;
    word-break: break-word;
}
.check-row {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 10px !important;
}
.admin-nav {
    position: sticky;
    top: 94px;
    z-index: 900;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px;
    margin: 0 0 16px;
    background: rgba(8, 10, 28, .9);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}
.admin-nav .active {
    background: linear-gradient(45deg,#ff00ff,#00ffff);
    color: #080a18;
}
.inline-form { display: grid; gap: 8px; min-width: 0; width: 100%; }
.inline-form input:not([type="checkbox"]),
.inline-form textarea,
.inline-form select {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,.2);
    background: #3f3a72;
    color: #fff;
}
.inline-form textarea { min-height: 74px; }
.admin-game-edit {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.admin-game-edit textarea,
.admin-game-edit input[name="thumbnail"],
.admin-game-edit input[name="game_path"],
.admin-game-edit .admin-actions {
    grid-column: 1 / -1;
}
.admin-stat-fields label {
    flex: 1 1 110px;
    min-width: 0;
}
.admin-stat-fields input {
    margin-top: 4px;
}
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: rgba(255,255,255,.06); border-radius: 8px; overflow: hidden; }
th, td { padding: 12px; border-bottom: 1px solid rgba(255,255,255,.12); text-align: left; vertical-align: top; }
.game-frame { width: 100%; height: min(78vh, 760px); border: 0; background: #000; border-radius: 8px; }
.play-page { display: grid; gap: 22px; }
.play-details {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: end;
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 8px; padding: 18px;
}
.play-details h1 { font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.05; margin-bottom: 10px; }
.game-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; color: #d8d7ff; }
.game-meta span { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); border-radius: 6px; padding: 6px 9px; }
.play-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.play-stage {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    background: #050816;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,.35);
}
body.play-lock { overflow-x: hidden; }
.play-stage-bar {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 10px 12px; background: rgba(255,255,255,.08); border-bottom: 1px solid rgba(255,255,255,.12);
}
.play-stage-bar > div { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.compact { padding: 8px 11px; font-size: .9rem; }
.game-frame-large {
    height: calc(100vh - 150px);
    min-height: 720px;
    max-height: none;
    border-radius: 0;
    display: block;
}
.game-frame:focus { outline: 3px solid rgba(34,211,238,.6); outline-offset: -3px; }
.game-frame-tall { height: min(1200px, calc(100vh - 80px)); }
.missing-game-frame {
    display: grid;
    place-content: center;
    gap: 10px;
    padding: 24px;
    text-align: center;
    color: #fff;
}
.missing-game-frame code {
    overflow-wrap: anywhere;
    color: #a5f3fc;
}
.play-lower-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.info-panel { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 8px; padding: 18px; }
.info-panel h2 { margin-bottom: 10px; }
.description-panel { scroll-margin-top: 110px; }
.description-panel-highlight {
    animation: descriptionPanelPulse 1.2s ease;
}
@keyframes descriptionPanelPulse {
    0%, 100% { box-shadow: 0 0 0 rgba(34,211,238,0); }
    35% { box-shadow: 0 0 0 3px rgba(34,211,238,.45), 0 18px 55px rgba(34,211,238,.18); }
}
.content-page {
    max-width: 940px;
    margin: 0 auto;
    display: grid;
    gap: 18px;
}
.content-panel {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 8px;
    padding: clamp(16px, 3vw, 26px);
}
.content-panel h2 { margin: 0 0 10px; color: #22d3ee; }
.content-panel h3 { margin: 16px 0 8px; color: #fff; }
.content-panel p, .content-panel li { color: #d8d7ff; }
.content-panel ul { padding-left: 20px; }
.blog-card time { display: block; margin-bottom: 8px; color: #c7c4e8; font-size: .9rem; }
.rating-stats { display: flex; gap: 14px; flex-wrap: wrap; margin: 14px 0; color: #d8d7ff; }
@media (max-width: 900px) {
    .play-details, .play-lower-grid { grid-template-columns: 1fr; }
    .play-actions { justify-content: flex-start; }
    .game-frame-large { height: calc(100vh - 130px); min-height: 620px; }
}
@media (min-width: 1100px) {
    .grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}
@media (min-width: 1400px) {
    .grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}
@media (max-width: 700px) {
    .app-shell { min-height: calc(100vh - 96px); }
    .hero {
        margin: 12px 0 16px;
        text-align: left;
        justify-content: flex-start;
        gap: 12px;
    }
    .hero h1 { font-size: clamp(2rem, 12vw, 3rem); margin-bottom: 8px; }
    .hero p { margin-left: 0; margin-right: 0; }
    .toolbar {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        margin: 12px 0 16px;
    }
    .toolbar input, .toolbar select, .toolbar .btn, .toolbar button {
        width: 100%;
        min-width: 0;
        max-width: none;
    }
    .grid { grid-template-columns: 1fr; gap: 12px; }
    .card-body { padding: 12px; }
    .card h2, .card h3 { font-size: 1rem; }
    .card-actions .btn { flex: 1 1 130px; min-width: 0; }
    .admin-nav {
        position: static;
        display: grid;
        grid-template-columns: 1fr;
    }
    .admin-nav .btn { width: 100%; }
    .admin-game-card,
    .admin-game-edit {
        grid-template-columns: 1fr;
    }
    .admin-game-summary {
        grid-template-columns: auto minmax(0, 1fr);
    }
    .profile-summary { grid-template-columns: 1fr; text-align: center; }
    .avatar { margin: 0 auto; }
}
@media (max-width: 600px) {
    .play-stage { width: 100%; margin-left: 0; border-radius: 0; }
    .game-frame-large { height: calc(100vh - 110px); min-height: 520px; }
}
.site-footer {
    border-top: 1px solid rgba(255,255,255,.12);
    color: #d8d7ff;
    background: rgba(5, 8, 22, .42);
    margin-top: clamp(28px, 5vw, 56px);
}
.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(160px, .8fr) minmax(160px, .8fr);
    gap: clamp(18px, 4vw, 44px);
    align-items: start;
    padding-top: clamp(24px, 4vw, 42px);
    padding-bottom: 18px;
}
.footer-logo { display: inline-flex; margin-bottom: 12px; }
.footer-logo img { width: min(260px, 72vw); height: auto; display: block; }
.footer-brand p { max-width: 560px; margin: 0; color: #c7c4e8; }
.site-footer h2 {
    font-size: 1rem;
    margin: 0 0 10px;
    color: #22d3ee;
}
.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}
.site-footer a {
    color: #fff;
    text-decoration: none;
}
.site-footer a:hover, .site-footer a:focus {
    color: #22d3ee;
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 14px;
    padding-bottom: 18px;
    font-size: .92rem;
    color: #c7c4e8;
}
.cookie-consent {
    position: fixed;
    left: clamp(12px, 3vw, 28px);
    right: clamp(12px, 3vw, 28px);
    bottom: clamp(12px, 3vw, 28px);
    z-index: 2000;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    background: rgba(10, 12, 30, .96);
    border: 1px solid rgba(34,211,238,.36);
    border-radius: 8px;
    box-shadow: 0 20px 70px rgba(0,0,0,.5);
}
.cookie-consent[hidden] { display: none; }
.cookie-consent p { margin: 4px 0 0; color: #d8d7ff; }
.cookie-consent a { color: #22d3ee; }
.cookie-consent-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.scroll-top {
    position: fixed;
    right: clamp(12px, 3vw, 28px);
    bottom: clamp(88px, 12vw, 118px);
    z-index: 1900;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    background: linear-gradient(45deg,#ff00ff,#00ffff);
    color: #080a18;
    font-weight: 900;
    padding: 10px 13px;
    cursor: pointer;
    box-shadow: 0 16px 45px rgba(0,0,0,.35);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease;
}
.scroll-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
@media (max-width: 700px) {
    .footer-grid { grid-template-columns: 1fr; gap: 18px; }
    .footer-logo img { width: min(230px, 82vw); }
    .footer-bottom { display: grid; }
    .cookie-consent {
        grid-template-columns: 1fr;
        left: 10px;
        right: 10px;
        bottom: 10px;
    }
    .cookie-consent-actions { display: grid; grid-template-columns: 1fr; }
    .cookie-consent-actions .btn { width: 100%; }
    .scroll-top { bottom: 126px; right: 12px; }
}
