* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    overflow-x: hidden;
}

body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--primary) 28%, transparent), transparent 32%),
        radial-gradient(circle at top right, color-mix(in srgb, var(--secondary) 22%, transparent), transparent 34%),
        var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.app-shell {
    width: 100%;
    min-height: 100vh;
    padding-bottom: 96px;
}

.topbar {
    width: min(1180px, calc(100% - 28px));
    margin: 18px auto;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: calc(var(--radius) + 8px);
    background: rgba(255,255,255,.055);
    backdrop-filter: blur(22px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    position: sticky;
    top: 12px;
    z-index: 50;
    box-shadow: 0 24px 80px rgba(0,0,0,.32);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 14px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 18px 40px color-mix(in srgb, var(--primary) 35%, transparent);
}

.brand strong {
    display: block;
    font-size: 15px;
    line-height: 1.1;
}

.brand span {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    color: rgba(255,255,255,.58);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.desktop-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: rgba(255,255,255,.72);
    font-size: 14px;
    transition: .2s;
}

.desktop-nav a:hover {
    color: #fff;
    background: rgba(255,255,255,.08);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-btn,
.login-btn,
.user-pill,
.menu-toggle,
.install-pwa {
    border: 0;
    border-radius: 999px;
    padding: 11px 15px;
    color: #fff;
    background: rgba(255,255,255,.08);
    cursor: pointer;
    transition: .2s;
    position: relative;
}

.login-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    font-weight: 800;
}

.cart-btn small {
    position: absolute;
    top: -6px;
    right: -4px;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--primary);
    font-size: 11px;
    font-weight: 900;
}

.menu-toggle {
    display: none;
}

.mobile-menu {
    display: none;
    width: min(1180px, calc(100% - 28px));
    margin: -8px auto 14px;
    padding: 14px;
    border-radius: var(--radius);
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.08);
    backdrop-filter: blur(18px);
}

.mobile-menu.active {
    display: grid;
    gap: 8px;
}

.mobile-menu a {
    padding: 13px 14px;
    border-radius: 16px;
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.82);
}

.page {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
}

.section-title {
    margin: 28px 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 12px;
}

.section-title h2 {
    font-size: clamp(22px, 4vw, 38px);
}

.section-title p {
    color: rgba(255,255,255,.58);
    font-size: 14px;
}

.btn-primary {
    border: 0;
    border-radius: 999px;
    padding: 13px 18px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 18px 44px color-mix(in srgb, var(--primary) 28%, transparent);
}

.btn-soft {
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 999px;
    padding: 12px 16px;
    background: rgba(255,255,255,.07);
    color: #fff;
    cursor: pointer;
}

.card {
    border-radius: var(--radius);
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 28px 90px rgba(0,0,0,.28);
    backdrop-filter: blur(18px);
}

.form-box {
    width: min(440px, calc(100% - 28px));
    margin: 50px auto;
    padding: 24px;
    border-radius: var(--radius);
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 32px 100px rgba(0,0,0,.35);
}

.form-box h1 {
    font-size: clamp(28px, 7vw, 44px);
    margin-bottom: 8px;
}

.form-box p {
    color: rgba(255,255,255,.62);
    margin-bottom: 20px;
}

.input-group {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.input-group label {
    font-size: 13px;
    color: rgba(255,255,255,.72);
}

.input-group input,
.input-group textarea,
.input-group select {
    width: 100%;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    padding: 14px 15px;
    color: #fff;
    background: rgba(0,0,0,.22);
    outline: none;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    border-color: color-mix(in srgb, var(--primary) 70%, white);
}

#toastBox {
    position: fixed;
    right: 16px;
    bottom: 20px;
    z-index: 999;
    display: grid;
    gap: 10px;
}

.toast {
    min-width: 240px;
    max-width: 340px;
    padding: 14px 16px;
    border-radius: 18px;
    color: #fff;
    background: rgba(17,24,39,.94);
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
    animation: toastIn .25s ease forwards;
}

.toast.sucesso {
    border-color: rgba(34,197,94,.35);
}

.toast.erro {
    border-color: rgba(239,68,68,.45);
}

.toast.alerta {
    border-color: rgba(245,158,11,.45);
}

.toast.info {
    border-color: rgba(59,130,246,.45);
}

.toast.hide {
    opacity: 0;
    transform: translateY(10px);
}

.install-pwa {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 100;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    font-weight: 900;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 760px) {
    .topbar {
        top: 8px;
        width: calc(100% - 18px);
        margin: 9px auto;
        padding: 10px;
    }

    .brand strong {
        font-size: 13px;
    }

    .brand span {
        display: none;
    }

    .desktop-nav {
        display: none;
    }

    .cart-btn {
        font-size: 0;
        width: 42px;
        height: 42px;
        padding: 0;
    }

    .cart-btn::before {
        content: "🛒";
        font-size: 17px;
    }

    .user-pill,
    .login-btn {
        padding: 11px 13px;
        font-size: 13px;
    }

    .menu-toggle {
        display: grid;
        place-items: center;
        width: 42px;
        height: 42px;
        padding: 0;
    }

    .page {
        width: calc(100% - 18px);
    }

    #toastBox {
        left: 10px;
        right: 10px;
        bottom: 12px;
    }

    .toast {
        width: 100%;
        max-width: none;
    }
}
.hero-lobby {
    min-height: 520px;
    position: relative;
    overflow: hidden;
    border-radius: calc(var(--radius) + 14px);
    background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.025));
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 40px 120px rgba(0,0,0,.38);
    display: flex;
    align-items: end;
    padding: clamp(24px, 5vw, 46px);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0,0,0,.82), rgba(0,0,0,.38), rgba(0,0,0,.72)),
        linear-gradient(0deg, rgba(0,0,0,.82), transparent 55%);
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .72;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(680px, 100%);
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(255,255,255,.1);
    color: rgba(255,255,255,.78);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .8px;
    text-transform: uppercase;
}

.hero-content h1 {
    font-size: clamp(38px, 8vw, 76px);
    line-height: .94;
    letter-spacing: -2px;
    max-width: 780px;
}

.hero-content p {
    margin-top: 18px;
    color: rgba(255,255,255,.68);
    line-height: 1.7;
    font-size: clamp(15px, 2vw, 18px);
    max-width: 620px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.hero-featured-card {
    position: absolute;
    right: 28px;
    bottom: 28px;
    z-index: 3;
    width: min(280px, calc(100% - 56px));
    padding: 18px;
    border-radius: var(--radius);
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.12);
    backdrop-filter: blur(18px);
    box-shadow: 0 28px 80px rgba(0,0,0,.34);
}

.hero-featured-card span {
    display: block;
    color: rgba(255,255,255,.58);
    font-size: 12px;
    margin-bottom: 8px;
}

.hero-featured-card strong {
    display: block;
    font-size: 20px;
    line-height: 1.1;
}

.hero-featured-card small {
    display: block;
    margin-top: 10px;
    font-size: 18px;
    color: var(--primary);
    font-weight: 900;
}

.search-console {
    margin: 22px 0;
    padding: 14px;
    border-radius: var(--radius);
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(255,255,255,.08);
    display: grid;
    grid-template-columns: 1fr minmax(260px, 420px);
    gap: 14px;
    align-items: center;
}

.search-console strong {
    display: block;
    font-size: 18px;
}

.search-console span {
    display: block;
    margin-top: 4px;
    color: rgba(255,255,255,.56);
    font-size: 13px;
}

.search-console input {
    width: 100%;
    border: 1px solid rgba(255,255,255,.08);
    outline: none;
    border-radius: 999px;
    padding: 15px 18px;
    color: #fff;
    background: rgba(0,0,0,.24);
}

.category-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 6px 0 18px;
    scrollbar-width: none;
}

.category-strip::-webkit-scrollbar {
    display: none;
}

.category-chip {
    flex: 0 0 auto;
    padding: 11px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.08);
    color: rgba(255,255,255,.75);
    font-size: 14px;
    transition: .2s;
}

.category-chip.active,
.category-chip:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.banner-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 4px 0 18px;
    scrollbar-width: none;
}

.banner-carousel::-webkit-scrollbar {
    display: none;
}

.promo-banner {
    min-width: min(620px, 88vw);
    height: 220px;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 28px 90px rgba(0,0,0,.28);
}

.promo-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.promo-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,.78), transparent 70%);
}

.promo-banner div {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 2;
}

.promo-banner span {
    display: block;
    color: rgba(255,255,255,.62);
    font-size: 13px;
}

.promo-banner strong {
    display: block;
    margin-top: 4px;
    font-size: 24px;
}

.game-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 18px;
    scrollbar-width: none;
}

.game-row::-webkit-scrollbar {
    display: none;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.search-results {
    margin: 16px 0 26px;
    padding: 16px;
    border-radius: var(--radius);
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
}

.game-card {
    flex: 0 0 230px;
    min-width: 0;
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 28px 70px rgba(0,0,0,.24);
    transition: .22s;
}

.game-card:hover {
    transform: translateY(-8px) scale(1.015);
    border-color: color-mix(in srgb, var(--primary) 45%, transparent);
}

.game-cover {
    height: 290px;
    display: block;
    position: relative;
    overflow: hidden;
    background: rgba(0,0,0,.2);
}

.game-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .3s;
}

.game-card:hover .game-cover img {
    transform: scale(1.05);
}

.game-cover-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 80px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    background: rgba(0,0,0,.54);
    backdrop-filter: blur(12px);
}

.badge-top {
    top: 48px;
    background: color-mix(in srgb, var(--primary) 55%, black);
}

.game-info {
    padding: 14px;
}

.game-info span {
    display: block;
    color: rgba(255,255,255,.54);
    font-size: 12px;
    margin-bottom: 6px;
}

.game-info h3 {
    min-height: 42px;
    font-size: 16px;
    line-height: 1.25;
}

.game-info strong {
    display: block;
    margin-top: 10px;
    color: var(--primary);
    font-size: 18px;
}

.game-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 14px;
}

.btn-mini {
    border: 0;
    border-radius: 14px;
    padding: 10px;
    text-align: center;
    color: #fff;
    background: rgba(255,255,255,.08);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
}

.btn-mini:first-child {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.empty-state {
    grid-column: 1 / -1;
    padding: 24px;
    border-radius: var(--radius);
    text-align: center;
    color: rgba(255,255,255,.62);
    background: rgba(255,255,255,.05);
}

@media (max-width: 760px) {
    .hero-lobby {
        min-height: 540px;
        padding: 24px;
        align-items: center;
    }

    .hero-content h1 {
        letter-spacing: -1px;
    }

    .hero-featured-card {
        position: relative;
        right: auto;
        bottom: auto;
        margin-top: 26px;
        width: 100%;
    }

    .search-console {
        grid-template-columns: 1fr;
    }

    .promo-banner {
        height: 180px;
        min-width: 86vw;
    }

    .game-card {
        flex-basis: 190px;
    }

    .game-cover {
        height: 240px;
    }

    .game-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .game-grid .game-card {
        flex: initial;
    }

    .game-info {
        padding: 11px;
    }

    .game-info h3 {
        font-size: 14px;
        min-height: 38px;
    }

    .game-actions {
        grid-template-columns: 1fr;
    }
}

.admin-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px;
    background: rgba(0,0,0,.34);
    border-right: 1px solid rgba(255,255,255,.08);
    backdrop-filter: blur(18px);
}

.admin-logo {
    display: block;
    margin-bottom: 24px;
    padding: 16px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    font-weight: 900;
    text-align: center;
}

.admin-sidebar nav {
    display: grid;
    gap: 8px;
}

.admin-sidebar nav a {
    padding: 13px 14px;
    border-radius: 16px;
    color: rgba(255,255,255,.72);
    background: rgba(255,255,255,.045);
    transition: .2s;
}

.admin-sidebar nav a:hover {
    color: #fff;
    background: rgba(255,255,255,.09);
}

.admin-main {
    padding: 26px;
    min-width: 0;
}

.admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.admin-head span {
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .8px;
}

.admin-head h1 {
    margin-top: 6px;
    font-size: clamp(32px, 6vw, 58px);
    line-height: .95;
}

.admin-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.admin-card {
    padding: 20px;
    border-radius: var(--radius);
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 24px 80px rgba(0,0,0,.24);
}

.admin-card span {
    display: block;
    color: rgba(255,255,255,.58);
    font-size: 13px;
    margin-bottom: 10px;
}

.admin-card strong {
    font-size: 30px;
}

.admin-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.admin-filter input {
    width: 100%;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 999px;
    padding: 14px 16px;
    background: rgba(0,0,0,.24);
    color: #fff;
    outline: none;
}

.admin-table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.045);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.admin-table th {
    color: rgba(255,255,255,.58);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .7px;
}

.admin-game-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-game-cell img {
    width: 52px;
    height: 68px;
    border-radius: 12px;
    object-fit: cover;
}

.admin-game-cell strong {
    display: block;
}

.admin-game-cell small {
    display: block;
    margin-top: 4px;
    color: rgba(255,255,255,.52);
}

.admin-form {
    padding: 22px;
    border-radius: var(--radius);
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.08);
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.admin-form-grid .full {
    grid-column: 1 / -1;
}

.admin-form small {
    display: block;
    margin-top: 6px;
    color: rgba(255,255,255,.5);
}

.admin-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.admin-checks label {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    color: rgba(255,255,255,.78);
}

.admin-checks select {
    margin-left: 8px;
    border: 0;
    border-radius: 12px;
    padding: 8px;
    color: #fff;
    background: rgba(0,0,0,.35);
}

@media (max-width: 900px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: relative;
        height: auto;
        padding: 12px;
        border-right: 0;
        border-bottom: 1px solid rgba(255,255,255,.08);
    }

    .admin-sidebar nav {
        display: flex;
        overflow-x: auto;
        gap: 8px;
    }

    .admin-sidebar nav a {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .admin-main {
        padding: 14px;
    }

    .admin-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-form-grid {
        grid-template-columns: 1fr;
    }

    .admin-filter {
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .admin-cards {
        grid-template-columns: 1fr;
    }
}