/* Camada visual compartilhada com o site _natsuki: vazio profundo, estrelas,
   aurora prismática e superfícies de comunidade inspiradas no Facebook clássico. */
:root {
    --natsuki-void: #01010a;
    --natsuki-deep: #070b1f;
    --natsuki-panel: rgba(9, 14, 31, 0.84);
    --natsuki-panel-strong: rgba(5, 9, 22, 0.96);
    --natsuki-line: rgba(157, 195, 255, 0.2);
    --natsuki-blue: #5f9dff;
    --natsuki-violet: #a78bfa;
    --natsuki-pink: #ff75d1;
    --natsuki-cream: #ffeeb8;
}

html, body {
    background: var(--natsuki-void) !important;
}

body {
    color: #eef3ff;
    overflow-x: hidden;
}

.theme-body::before { display: none; }

.natsuki-environment,
.natsuki-environment > * {
    pointer-events: none;
}

#sky {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: var(--natsuki-void);
}

#aurora-veil {
    position: fixed;
    inset: -10% -20% auto;
    height: 130vh;
    z-index: 1;
    opacity: .48;
    mix-blend-mode: screen;
}

#aurora-veil i {
    position: absolute;
    top: -20%;
    width: 22vw;
    min-width: 180px;
    height: 150%;
    filter: blur(58px);
    transform-origin: 50% 0;
    animation: natsuki-veil-sway 26s ease-in-out infinite alternate;
}

#aurora-veil i:nth-child(1) { left: 4%; background: linear-gradient(180deg, rgba(77,216,255,.34), transparent 72%); animation-duration: 24s; }
#aurora-veil i:nth-child(2) { left: 34%; background: linear-gradient(180deg, rgba(167,139,250,.3), transparent 70%); animation-duration: 31s; animation-delay: -6s; }
#aurora-veil i:nth-child(3) { right: 20%; background: linear-gradient(180deg, rgba(255,95,210,.26), transparent 68%); animation-duration: 28s; animation-delay: -13s; }
#aurora-veil i:nth-child(4) { right: -2%; background: linear-gradient(180deg, rgba(94,242,192,.2), transparent 66%); animation-duration: 36s; animation-delay: -20s; }

@keyframes natsuki-veil-sway {
    from { transform: translateX(-6vw) skewX(-9deg) scaleY(.9); opacity: .45; }
    to { transform: translateX(7vw) skewX(11deg) scaleY(1.15); opacity: .95; }
}

#grid-horizon {
    position: fixed;
    left: -25%;
    right: -25%;
    bottom: -2vh;
    height: 46vh;
    z-index: 1;
    opacity: .32;
    perspective: 260px;
    perspective-origin: 50% 0;
    mask-image: linear-gradient(180deg, transparent, #000 45%, #000 82%, transparent);
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 45%, #000 82%, transparent);
}

#grid-horizon::before {
    content: '';
    position: absolute;
    inset: -60% 0 -20%;
    transform: rotateX(72deg);
    transform-origin: 50% 0;
    background-image: linear-gradient(rgba(90,190,255,.3) 1px, transparent 1px), linear-gradient(90deg, rgba(140,120,255,.22) 1px, transparent 1px);
    background-size: 100% 46px, 52px 100%;
    animation: natsuki-grid-run 9s linear infinite;
}

@keyframes natsuki-grid-run { from { background-position: 0 0, 0 0; } to { background-position: 0 46px, 0 0; } }

#vignette {
    position: fixed;
    inset: 0;
    z-index: 2;
    background: radial-gradient(120% 85% at 50% 8%, transparent 42%, rgba(0,0,8,.55) 100%), repeating-linear-gradient(0deg, rgba(255,255,255,.014) 0 1px, transparent 1px 3px);
}

#cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 520px;
    height: 520px;
    margin: -260px 0 0 -260px;
    z-index: 3;
    opacity: 0;
    background: radial-gradient(circle, rgba(120,200,255,.12) 0%, rgba(167,139,250,.07) 34%, transparent 66%);
    transition: opacity .6s ease;
}

#cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    z-index: 150;
    opacity: 0;
    border-radius: 50%;
    border: 1px solid rgba(150,215,255,.7);
    box-shadow: 0 0 14px rgba(90,190,255,.5), inset 0 0 10px rgba(90,190,255,.22);
    transition: opacity .35s ease, width .28s ease, height .28s ease, margin .28s ease, border-color .28s ease, background .28s ease;
}

body.has-pointer #cursor-glow,
body.has-pointer #cursor-ring { opacity: 1; }
body.cursor-hot #cursor-ring { width: 58px; height: 58px; margin: -29px 0 0 -29px; border-color: rgba(255,120,210,.85); background: rgba(255,95,210,.07); }

#scroll-progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 170; background: rgba(120,180,255,.09); }
#scroll-progress span { display: block; width: 0; height: 100%; background: linear-gradient(115deg, #4dd8ff, #a78bfa 38%, #ff5fd2 72%, #ffd479); box-shadow: 0 0 16px rgba(120,200,255,.9); transition: width .1s linear; }

.topbar,
.main-content,
.hero-shell,
.page-shell,
.landing-shell,
.theme-guest > .flash { position: relative; z-index: 5; }

.topbar {
    z-index: 100 !important;
    grid-template-columns: minmax(150px, .85fr) minmax(0, 2.1fr) minmax(220px, auto) !important;
    border-color: rgba(157,195,255,.28) !important;
    background: linear-gradient(115deg, rgba(8,13,30,.95), rgba(8,15,35,.84) 55%, rgba(28,12,42,.85)) !important;
    box-shadow: 0 18px 54px rgba(0,0,0,.48), 0 0 0 1px rgba(167,139,250,.06) inset !important;
}

.topbar-nav-compact { min-width: 0; flex-wrap: nowrap; justify-content: flex-start; gap: 4px; overflow: visible; padding-bottom: 0; scrollbar-width: none; }
.topbar-nav-compact::-webkit-scrollbar { display: none; }
.topbar-nav-compact .nav-pill { flex: 0 0 auto; white-space: nowrap; }
.topbar-user { min-width: 0; position: relative; }
.topbar-user-stack { min-width: 0; display: flex; align-items: center; gap: 8px; justify-items: initial; }
.topbar-profile-link { min-width: 0; max-width: 250px; }
.topbar-user-info { min-width: 0; }
.topbar-username { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-notification { position: relative !important; inset: auto !important; flex: 0 0 42px; }

.main-content { min-width: 0; }
.page-shell, .hero-shell { width: min(1220px, calc(100% - 24px)); }
.content-card, .stat-card, .metric-card, .feed-card, .image-card, .plan-card, .combat-card, .grid-card,
.composer-card, .feed-post, .composer-modal-card {
    background: linear-gradient(145deg, rgba(10,16,35,.86), rgba(5,9,22,.9)) !important;
    border-color: rgba(157,195,255,.18) !important;
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(0,0,0,.32), 0 0 0 1px rgba(255,255,255,.02) inset;
}

.button, .button-outline, .button-danger, .action-btn, .btn-post, .nav-pill, .menu-trigger, .composer-notify {
    min-height: 38px;
    border-radius: 8px;
    transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

/* Navegação compacta inspirada nas abas do Facebook antigo, adaptada ao tema estelar. */
.topbar-nav .nav-pill,
.topbar-nav .menu-trigger {
    min-height: 34px;
    padding-inline: 9px;
    border-radius: 6px;
    border-color: rgba(139, 181, 245, .3);
    background: linear-gradient(180deg, rgba(49, 83, 145, .72), rgba(25, 43, 84, .8));
    color: #eaf2ff;
    font-size: .78rem;
    box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 3px 10px rgba(0,0,0,.2);
}
.topbar-nav .nav-pill:hover,
.topbar-nav .nav-pill:focus-visible,
.topbar-nav .menu-trigger:hover,
.topbar-nav .menu-trigger:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(167, 211, 255, .62);
    background: linear-gradient(180deg, rgba(78, 127, 203, .88), rgba(37, 66, 125, .92));
    box-shadow: 0 4px 12px rgba(33, 88, 173, .28), 0 1px 0 rgba(255,255,255,.16) inset;
}
.topbar-nav .nav-pill:active,
.topbar-nav .menu-trigger:active { transform: translateY(0) scale(.98); }

.button {
    background: linear-gradient(180deg, #5e91cf, #355d9d) !important;
    color: #ffffff !important;
    font-weight: 800;
    border-color: rgba(174, 211, 255, .44) !important;
    box-shadow: 0 1px 0 rgba(255,255,255,.22) inset, 0 6px 16px rgba(24, 65, 130, .3);
}

.button-outline, .action-btn {
    border-color: rgba(157,195,255,.32) !important;
    background: rgba(17,26,55,.62) !important;
    color: #e8efff !important;
}

.button-danger { background: rgba(255,95,125,.16) !important; border-color: rgba(255,122,156,.42) !important; }
.button:hover, .button-outline:hover, .button-danger:hover, .action-btn:hover, .nav-pill:hover, .menu-trigger:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.24); }
.button:active, .button-outline:active, .button-danger:active, .action-btn:active { transform: translateY(0) scale(.97); }
.button[aria-busy='true'], .button.is-loading { cursor: progress; opacity: .72; }
.button[aria-busy='true']::after, .button.is-loading::after { content: ''; width: 14px; height: 14px; margin-left: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: natsuki-spin .65s linear infinite; }
@keyframes natsuki-spin { to { transform: rotate(360deg); } }

.auth-help-link {
    justify-self: start;
    color: #9de9ff;
    font-size: .86rem;
    text-decoration: underline;
    text-decoration-color: rgba(157,233,255,.35);
    text-underline-offset: 3px;
}
.auth-help-link:hover { color: #ffeeb8; }

.menu-group.is-open .submenu-panel { z-index: 190; }
.notification-count { border-color: #080d1d !important; background: linear-gradient(135deg, #ff75d1, #ff5e80) !important; }
.notification-item { background: rgba(7,13,30,.72) !important; border-color: rgba(157,195,255,.2) !important; }
.notification-item.unread { border-color: rgba(255,212,121,.54) !important; box-shadow: 0 0 0 1px rgba(255,212,121,.2) inset, 0 0 20px rgba(255,95,210,.08); }

@media (max-width: 1180px) and (min-width: 1025px) {
    .topbar { grid-template-columns: 150px minmax(0, 1fr) minmax(200px, auto) !important; }
    .topbar-profile-link { max-width: 210px; }
    .topbar-tags-meta { display: none; }
}

@media (max-width: 1024px) {
    .topbar { grid-template-columns: minmax(130px, 1fr) auto !important; }
    .topbar-user-stack { display: grid; gap: 4px; justify-items: end; }
    .topbar-profile-link { max-width: min(250px, 48vw); }
    .topbar-nav { z-index: 160 !important; background: linear-gradient(180deg, rgba(4,8,22,.98), rgba(10,9,27,.98)) !important; box-shadow: 16px 0 44px rgba(0,0,0,.35); overflow-x: hidden; overflow-y: auto; }
    .topbar-nav .menu-group:hover .submenu-panel { display: none; }
    .topbar-nav .menu-group.is-open .submenu-panel { position: static; display: grid; min-width: 0; margin-top: 6px; box-shadow: none; background: rgba(23,17,45,.72); }
    .mobile-menu-handle { z-index: 180 !important; }
}

@media (max-width: 760px) {
    .topbar { margin: 6px 6px 0; }
    .topbar-user { gap: 4px; }
    .topbar-profile-link { max-width: 56vw; padding: 5px 6px; }
    .topbar-notification { flex-basis: 34px; width: 34px !important; height: 34px !important; }
    .page-shell, .hero-shell { width: min(100% - 16px, 680px); }
    .main-content { padding-inline: 8px; }
    .hero-actions, .button-row, .inline-actions, .post-actions { align-items: stretch; }
    .hero-actions > *, .button-row > *, .inline-actions > * { max-width: 100%; }
    .notification-item { align-items: flex-start; flex-direction: column; }
    #aurora-veil { opacity: .3; }
    #grid-horizon { opacity: .2; }
    #cursor-glow, #cursor-ring { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    #aurora-veil i, #grid-horizon::before, .arcane-hero-card { animation: none !important; }
    .button, .button-outline, .button-danger, .action-btn { transition: none; }
}

/* Dashboard em duas colunas: atalhos laterais no espírito do Orkut clássico. */
.topbar {
    border-radius: 9px !important;
    padding: 6px 10px !important;
    background: linear-gradient(180deg, rgba(25, 58, 108, .99), rgba(9, 23, 52, .99)) !important;
    box-shadow: 0 9px 22px rgba(0, 0, 0, .36), 0 1px 0 rgba(178, 214, 255, .2) inset !important;
}

.home-layout-grid {
    display: grid;
    grid-template-columns: minmax(210px, 232px) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.home-left-column,
.home-main-column {
    min-width: 0;
    display: grid;
    gap: 12px;
}

.home-left-column {
    position: sticky;
    top: 104px;
    align-self: start;
}

.home-sidebar-shortcuts {
    overflow: hidden;
    border: 1px solid rgba(132, 174, 233, .28);
    border-radius: 8px;
    background: rgba(6, 14, 31, .96);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .24);
}

.home-sidebar-shortcuts .home-shortcuts-toggle {
    border: 0;
    border-bottom: 1px solid rgba(157, 195, 255, .2);
    border-radius: 0;
    background: linear-gradient(180deg, rgba(61, 105, 164, .78), rgba(28, 57, 104, .9));
    color: #f0f6ff;
    font-size: .74rem;
    letter-spacing: .06em;
    padding: 9px 10px;
}

.home-sidebar-shortcuts .home-shortcuts-inline {
    margin-top: 0;
    padding: 8px 6px 10px;
    background: rgba(12, 27, 50, .86);
}

.home-sidebar-shortcuts .home-shortcut-sections {
    gap: 10px;
}

.home-sidebar-shortcuts .home-shortcut-section {
    gap: 3px;
}

.home-sidebar-shortcuts .home-shortcut-section-title {
    padding: 3px 8px 4px;
    border-bottom: 1px solid rgba(157, 195, 255, .15);
    color: #8fb8e8;
    font-family: 'Manrope', sans-serif;
    font-size: .68rem;
    letter-spacing: .1em;
}

.home-sidebar-shortcuts .home-menu-grid-vertical {
    grid-template-columns: 1fr;
    gap: 2px;
}

.home-sidebar-shortcuts .home-menu-tile-compact {
    grid-template-columns: 28px minmax(0, 1fr);
    justify-items: initial;
    text-align: left;
    min-height: 34px;
    padding: 5px 8px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
}

.home-sidebar-shortcuts .home-menu-tile-compact:hover,
.home-sidebar-shortcuts .home-menu-tile-compact:focus-visible {
    border-color: rgba(142, 191, 249, .34);
    background: linear-gradient(90deg, rgba(61, 119, 190, .34), rgba(55, 79, 137, .16));
    transform: translateX(2px);
}

.home-sidebar-shortcuts .home-menu-tile-compact strong {
    color: #dbeaff;
    font-size: .78rem;
    font-weight: 600;
}

.home-sidebar-shortcuts .home-menu-emoji {
    width: 26px;
    height: 26px;
    font-size: .98rem;
}

.home-account-collapse .home-shortcuts-toggle {
    border-radius: 7px;
    padding: 9px 12px;
}

@media (max-width: 1024px) {
    .home-layout-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .home-left-column {
        position: static;
    }

    .home-sidebar-shortcuts {
        order: 1;
    }

    .home-main-column {
        order: 2;
    }
}

@media (max-width: 680px) {
    .home-layout-grid {
        gap: 8px;
    }

    .home-sidebar-shortcuts .home-menu-tile-compact {
        min-height: 38px;
        padding-block: 6px;
    }
}

/* Galeria de jogos: composição compacta e responsiva */
.games-gallery-shell {
    max-width: 1120px;
}

.games-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 14px;
    padding: 18px 20px;
    border: 1px solid rgba(157, 195, 255, .2);
    border-radius: 12px;
    background: linear-gradient(120deg, rgba(14, 30, 60, .94), rgba(16, 14, 40, .9));
}

.games-page-header h1 {
    margin: 4px 0 8px;
}

.games-page-header > div:first-child > p:last-child {
    max-width: 64ch;
    margin: 0;
    color: #b9c9e7;
}

.games-summary {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.games-summary div {
    min-width: 88px;
    padding: 8px 10px;
    text-align: center;
    border: 1px solid rgba(157, 195, 255, .22);
    border-radius: 8px;
    background: rgba(4, 10, 24, .58);
}

.games-summary strong {
    display: block;
    color: #f4d692;
    font-size: 1.18rem;
}

.games-summary span {
    display: block;
    color: #9eb7dc;
    font-size: .68rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.games-catalog-panel {
    padding: 16px;
    border: 1px solid rgba(157, 195, 255, .2);
    border-radius: 12px;
    background: rgba(5, 10, 23, .78);
}

.games-catalog-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.games-catalog-heading .eyebrow {
    margin: 0 0 2px;
}

.games-catalog-heading h2 {
    margin: 0;
    font-size: 1.25rem;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.community-shell .game-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 315px;
    overflow: hidden;
    border: 1px solid rgba(126, 165, 228, .25);
    border-radius: 10px;
    background: linear-gradient(160deg, rgba(12, 25, 49, .94), rgba(6, 12, 27, .98));
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.community-shell .game-card:hover {
    transform: translateY(-3px);
    border-color: rgba(160, 207, 255, .55);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .28);
}

.game-card-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 72px;
    padding: 12px;
    border-bottom: 1px solid rgba(157, 195, 255, .16);
    background: linear-gradient(115deg, rgba(64, 121, 194, .38), rgba(110, 71, 166, .28));
}

.game-card--snake .game-card-banner {
    background: linear-gradient(115deg, rgba(45, 157, 129, .34), rgba(31, 88, 164, .35));
}

.game-card--natcity .game-card-banner {
    background: linear-gradient(115deg, rgba(180, 135, 50, .32), rgba(58, 92, 151, .3));
}

.game-card--steroid .game-card-banner {
    background: linear-gradient(115deg, rgba(132, 79, 191, .34), rgba(45, 65, 153, .34));
}

.game-card--memoria-lunar .game-card-banner {
    background: linear-gradient(115deg, rgba(62, 118, 177, .38), rgba(98, 63, 160, .34));
}

.game-card--astro-rush .game-card-banner {
    background: linear-gradient(115deg, rgba(182, 113, 46, .38), rgba(76, 69, 170, .34));
}

.game-card--duelo-farol .game-card-banner {
    background: linear-gradient(115deg, rgba(42, 143, 143, .38), rgba(75, 73, 177, .34));
}

.game-card-icon {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 10px;
    background: rgba(1, 8, 20, .45);
    font-size: 1.55rem;
}

.game-card-statuses {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.game-status,
.game-mode {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border: 1px solid rgba(180, 210, 255, .25);
    border-radius: 999px;
    color: #dceaff;
    background: rgba(8, 16, 35, .45);
    font-size: .68rem;
    line-height: 1;
}

.game-status--active {
    border-color: rgba(102, 224, 162, .42);
    color: #baf7d6;
    background: rgba(24, 123, 77, .28);
}

.game-status--maintenance {
    border-color: rgba(255, 192, 93, .42);
    color: #ffd99b;
    background: rgba(141, 94, 20, .28);
}

.game-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
}

.game-card-body h3 {
    margin: 0;
    font-size: 1.2rem;
}

.game-card-subtitle {
    margin: 0;
    color: #9eb9df;
    font-size: .82rem;
}

.game-card-description {
    display: -webkit-box;
    overflow: hidden;
    margin: 2px 0 0;
    color: #d0def6;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: auto;
    padding-top: 8px;
}

.game-tags span {
    color: #9fd4ff;
    font-size: .68rem;
}

.game-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 56px;
    padding: 10px 14px;
    border-top: 1px solid rgba(157, 195, 255, .12);
    background: rgba(2, 8, 19, .3);
}

.game-availability {
    color: #f2cd7b;
    font-size: .7rem;
    line-height: 1.25;
}

.game-availability--ready {
    color: #a9f0c7;
}

.game-play-btn {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 0 10px;
}

.game-play-btn.is-disabled {
    cursor: not-allowed;
    opacity: .52;
    pointer-events: none;
}

.games-empty-state {
    display: grid;
    place-items: center;
    gap: 6px;
    min-height: 220px;
    padding: 24px;
    text-align: center;
    border: 1px dashed rgba(157, 195, 255, .25);
    border-radius: 10px;
    background: rgba(6, 13, 29, .55);
}

.games-empty-icon {
    font-size: 2rem;
}

.games-empty-state strong {
    color: #eaf2ff;
}

.games-empty-state p {
    max-width: 48ch;
    margin: 0;
    color: #9eb7dc;
}

@media (max-width: 920px) {
    .games-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .games-page-header {
        align-items: stretch;
        flex-direction: column;
        padding: 14px;
    }

    .games-summary {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .games-summary div {
        min-width: 0;
    }

    .games-catalog-panel {
        padding: 12px;
    }

    .games-catalog-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .games-catalog-heading .action-btn {
        width: 100%;
    }

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

    .community-shell .game-card {
        min-height: 0;
    }
}
