﻿* {
    box-sizing: border-box;
}

:root {
    --bg-1: #061428;
    --bg-2: #0f3d6e;
    --panel: rgba(8, 27, 50, 0.92);
    --panel-strong: #0c2544;
    --line: rgba(255, 255, 255, 0.14);
    --text: #f8fbff;
    --muted: #b9cce0;
    --accent: #58b7ff;
    --accent-2: #19b2c6;
    --danger: #c94c4c;
    --success: #33c481;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body.infinity-page {
    min-height: 100vh;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(82, 179, 255, 0.22), transparent 28%),
        linear-gradient(180deg, var(--bg-1), var(--bg-2));
}

a {
    color: inherit;
}

.app-shell {
    width: min(1080px, 100%);
    margin: 0 auto;
    padding: 32px 18px 56px;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.app-title {
    margin: 0;
    font-size: clamp(1.8rem, 5vw, 3rem);
    line-height: 1.05;
}

.app-subtitle {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.app-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.app-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    text-decoration: none;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.16);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.app-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(88, 183, 255, 0.5);
    background: rgba(88, 183, 255, 0.14);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
}

.app-btn:active {
    transform: translateY(0);
}

.app-btn:focus-visible {
    outline: 3px solid rgba(88, 183, 255, 0.38);
    outline-offset: 2px;
}

.app-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.app-btn.primary {
    border: none;
    background: linear-gradient(135deg, #1282d6, var(--accent-2));
    box-shadow: 0 7px 18px rgba(18, 130, 214, 0.24);
}

.app-btn.danger {
    border: none;
    background: var(--danger);
}

.app-btn.success {
    border: 0;
    background: #198754;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.app-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 170px;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.app-card h2,
.app-card h3 {
    margin: 0;
    font-size: 1.18rem;
}

.app-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.shop-preview {
    font-size: 1.45rem;
    color: var(--text);
}

.app-card img {
    max-width: 100%;
    object-fit: contain;
}

.app-media {
    height: 92px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.app-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.app-notice {
    padding: 13px 15px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--line);
    color: #d9ecff;
    line-height: 1.45;
}

.app-notice.success {
    border-color: rgba(51, 196, 129, 0.45);
    background: rgba(51, 196, 129, 0.12);
}

.app-notice.error {
    border-color: rgba(201, 76, 76, 0.5);
    background: rgba(201, 76, 76, 0.14);
    color: #ffd4d4;
}

.community-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 22px;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: thin;
}

.community-nav-link {
    --nav-accent: #58b7ff;
    --nav-accent-soft: rgba(88, 183, 255, 0.2);
    position: relative;
    display: grid;
    align-content: center;
    gap: 3px;
    min-width: 142px;
    min-height: 76px;
    padding: 13px 14px 13px 18px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--nav-accent) 48%, transparent);
    border-radius: 8px;
    background:
        linear-gradient(135deg, var(--nav-accent-soft), transparent 62%),
        #092b4d;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 8px 20px rgba(0, 0, 0, 0.24);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.community-nav-link::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--nav-accent);
    box-shadow: 0 0 16px var(--nav-accent);
}

.community-nav-link::after {
    content: "";
    position: absolute;
    right: -24px;
    bottom: -36px;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--nav-accent);
    opacity: 0.1;
    pointer-events: none;
}

.community-nav-link .nav-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 900;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.32);
}

.community-nav-link small {
    overflow: hidden;
    color: #c4def3;
    font-size: 0.75rem;
    font-weight: 700;
    text-overflow: ellipsis;
}

.community-nav-link.nav-feed {
    --nav-accent: #45caff;
    --nav-accent-soft: rgba(69, 202, 255, 0.24);
}

.community-nav-link.nav-jogadores {
    --nav-accent: #33c481;
    --nav-accent-soft: rgba(51, 196, 129, 0.2);
}

.community-nav-link.nav-mensagens {
    --nav-accent: #5b8cff;
    --nav-accent-soft: rgba(91, 140, 255, 0.24);
}

.community-nav-link.nav-perfil {
    --nav-accent: #a78bfa;
    --nav-accent-soft: rgba(167, 139, 250, 0.22);
}

.community-nav-link.nav-notificacoes {
    --nav-accent: #ff6b7a;
    --nav-accent-soft: rgba(255, 107, 122, 0.2);
}

.nav-count {
    display: inline-grid;
    place-items: center;
    min-width: 21px;
    height: 21px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e5484d;
    color: #fff;
    font-size: 0.7rem;
}

.community-nav-link:hover,
.community-nav-link.active {
    transform: translateY(-2px);
    border-color: var(--nav-accent);
    color: #fff;
    filter: brightness(1.12);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 10px 25px rgba(0, 0, 0, 0.28),
        0 0 18px var(--nav-accent-soft);
}

.community-nav-link.active::before {
    width: 7px;
}

.community-nav-link.active {
    background:
        linear-gradient(135deg, var(--nav-accent-soft), transparent 72%),
        #104a78;
}

.identity-line {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.player-identity {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

a.player-identity:hover .identity-name {
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.4);
    text-underline-offset: 3px;
}

.identity-name {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    min-width: 0;
    line-height: 1.35;
}

.muted {
    color: var(--muted);
}

.compact-card {
    min-height: auto;
    margin-bottom: 16px;
    padding: 14px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, 220px) auto;
    gap: 10px;
    align-items: center;
}

.filter-bar input,
.filter-bar select {
    height: 50px;
    border-color: rgba(158, 216, 255, 0.22);
    background-color: #071e38;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.22);
}

.filter-bar input::placeholder {
    color: #91aac1;
}

.filter-bar input:focus,
.filter-bar select:focus {
    outline: 3px solid rgba(88, 183, 255, 0.16);
    border-color: #58b7ff;
}

.filter-bar select {
    cursor: pointer;
}

.filter-bar .app-btn {
    min-height: 50px;
    padding-inline: 22px;
}

.filter-bar input,
.filter-bar select,
.message-composer textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #0a2340;
    color: #fff;
    font: inherit;
}

.people-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.person-card {
    min-height: 0;
}

.card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}

.card-actions form {
    margin: 0;
}

.messages-layout {
    display: grid;
    grid-template-columns: minmax(230px, 320px) minmax(0, 1fr);
    gap: 16px;
    min-height: 620px;
}

.conversation-list,
.message-panel {
    min-height: 0;
}

.conversation-list {
    align-content: start;
    max-height: 680px;
    overflow-y: auto;
}

.conversation-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
}

.conversation-item:hover,
.conversation-item.active {
    border-color: var(--line);
    background: rgba(88, 183, 255, 0.14);
}

.conversation-item span,
.conversation-item strong,
.conversation-item small {
    min-width: 0;
}

.conversation-item > span {
    display: block;
}

.conversation-item strong {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    line-height: 1.3;
}

.conversation-item small {
    margin-top: 3px;
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-panel {
    display: grid;
    grid-template-rows: auto minmax(300px, 1fr) auto;
    max-height: 680px;
}

.message-heading {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.message-stream {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 14px 3px;
    overflow-y: auto;
}

.message-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 88%;
}

.message-row.mine {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-row .profile-avatar {
    margin-bottom: 2px;
}

.message-bubble {
    width: fit-content;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
}

.message-bubble.mine {
    background: rgba(18, 130, 214, 0.28);
    border-color: rgba(88, 183, 255, 0.34);
}

.message-author {
    margin-bottom: 4px;
    font-size: 0.82rem;
    line-height: 1.2;
}

.message-bubble p {
    margin: 0;
    color: #fff;
    overflow-wrap: anywhere;
}

.message-bubble time {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.74rem;
}

.message-composer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.message-composer textarea {
    min-height: 52px;
    max-height: 140px;
    resize: vertical;
}

.empty-state {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    min-height: 220px;
    text-align: center;
}

.xp-progress {
    display: grid;
    gap: 7px;
}

.xp-progress-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 800;
}

.xp-bar {
    height: 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25);
}

.xp-bar-fill {
    display: block;
    height: 100%;
    width: var(--xp, 0%);
    border-radius: inherit;
    background: linear-gradient(90deg, #58b7ff, #33c481, #ffd76b);
    box-shadow: 0 0 16px rgba(88, 183, 255, 0.45);
    transition: width 0.75s ease;
}

.xp-toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 3000;
    width: min(360px, calc(100vw - 36px));
    padding: 15px;
    border-radius: 14px;
    background: rgba(8, 27, 50, 0.96);
    border: 1px solid rgba(88, 183, 255, 0.5);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38), 0 0 24px rgba(88, 183, 255, 0.25);
    animation: xpToastIn 0.35s ease, xpToastOut 0.35s ease 4.4s forwards;
}

.xp-toast strong {
    display: block;
    margin-bottom: 5px;
    color: #ffffff;
    font-size: 1.05rem;
}

.xp-toast p {
    margin: 0 0 10px;
    color: var(--muted);
}

.xp-toast.level-up {
    border-color: rgba(255, 215, 107, 0.78);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38), 0 0 32px rgba(255, 215, 107, 0.32);
}

@keyframes xpToastIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes xpToastOut {
    to { opacity: 0; transform: translateY(12px) scale(0.98); pointer-events: none; }
}

.profile-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border: 2px solid rgba(158, 216, 255, 0.78);
    background: linear-gradient(135deg, #1282d6, #19b2c6);
    color: white;
    font-weight: 950;
    box-shadow: 0 0 0 3px rgba(88, 183, 255, 0.1), 0 8px 18px rgba(0, 0, 0, 0.24);
    vertical-align: middle;
}

.profile-avatar.small {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
}

.profile-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.nome-jogador-estilizado {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    font-weight: 900;
    color: #f8fbff;
}

.nome-animado {
    animation: infinityNameGlow 1.35s ease-in-out infinite alternate;
}

.nome-animacao-pulso {
    animation: infinityNamePulse 1s ease-in-out infinite;
}

.nome-animacao-rainbow {
    font-weight: 950;
    color: transparent;
    background-image: linear-gradient(90deg, #ff3b6b, #ff9f43, #ffe66d, #33d17a, #45caff, #a78bfa, #ff3b6b);
    background-size: 320% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: saturate(1.18) brightness(1.12);
    animation: infinityNameRainbow 2.4s linear infinite;
}

.conversation-item .nome-animacao-rainbow,
.message-author .nome-animacao-rainbow,
.rank-item .nome-animacao-rainbow,
.ranking-row .nome-animacao-rainbow {
    display: inline-block;
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
    background-image: linear-gradient(90deg, #ff3b6b, #ff9f43, #ffe66d, #33d17a, #45caff, #a78bfa, #ff3b6b) !important;
    background-size: 320% 100% !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    animation: infinityNameRainbow 2.4s linear infinite !important;
}

.nome-animacao-fogo {
    animation: infinityNameFire 1.1s ease-in-out infinite alternate;
}

.nome-animacao-neon {
    animation: infinityNameNeon 1.4s ease-in-out infinite alternate;
}

.perfil-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    padding: 2px 7px;
    margin-left: 5px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: linear-gradient(135deg, #ffd76b, #7dd3fc);
    color: #061428;
    font-size: 0.72em;
    font-weight: 900;
    vertical-align: middle;
}

.owner-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 21px;
    padding: 2px 8px;
    margin-left: 5px;
    border-radius: 6px;
    background: linear-gradient(135deg, #ff3b6b, #ffd76b);
    color: #16040a;
    font-size: 0.72em;
    font-weight: 950;
    letter-spacing: 0;
    box-shadow: 0 0 14px rgba(255, 77, 109, 0.38);
    vertical-align: middle;
}

.verify-badge {
    position: relative;
    display: inline-flex;
    width: 19px;
    height: 19px;
    margin-left: 5px;
    border-radius: 50%;
    background: #1da1f2;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.14), 0 3px 10px rgba(29, 161, 242, 0.35);
    vertical-align: middle;
}

.profile-avatar.hero-avatar {
    width: 112px;
    height: 112px;
    font-size: 2.2rem;
    border-width: 3px;
    box-shadow: 0 0 0 5px rgba(88, 183, 255, 0.12), 0 18px 35px rgba(0, 0, 0, 0.3);
}

.verify-badge::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 4px;
    width: 7px;
    height: 4px;
    border-left: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(-45deg);
}

@keyframes infinityNameGlow {
    from {
        text-shadow: 0 0 4px rgba(88, 183, 255, 0.35);
    }

    to {
        text-shadow: 0 0 14px rgba(255, 215, 107, 0.95);
    }
}

@keyframes infinityNamePulse {
    50% {
        transform: scale(1.06);
        text-shadow: 0 0 12px rgba(88, 183, 255, 0.9);
    }
}

@keyframes infinityNameRainbow {
    from { background-position: 0% 50%; }
    to { background-position: 320% 50%; }
}

@keyframes infinityNameFire {
    from { text-shadow: 0 0 5px rgba(255, 77, 109, 0.65), 0 0 10px rgba(255, 215, 107, 0.35); }
    to { text-shadow: 0 0 16px rgba(255, 77, 109, 1), 0 0 24px rgba(255, 215, 107, 0.85); }
}

@keyframes infinityNameNeon {
    from { text-shadow: 0 0 4px rgba(25, 178, 198, 0.7); }
    to { text-shadow: 0 0 18px rgba(25, 178, 198, 1), 0 0 28px rgba(88, 183, 255, 0.8); }
}

.app-footer {
    margin-top: 34px;
    color: var(--muted);
    text-align: center;
}

.pwa-install-button {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 2500;
    min-height: 46px;
    padding: 11px 17px;
    border: 1px solid rgba(125, 211, 252, 0.5);
    border-radius: 8px;
    background: #0b6fae;
    color: #fff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.pwa-install-button:hover {
    background: #1187cf;
    transform: translateY(-2px);
}

.pwa-dialog {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: none;
    place-items: center;
    padding: 18px;
    background: rgba(2, 10, 20, 0.78);
}

.pwa-dialog.visible {
    display: grid;
}

.pwa-dialog-panel {
    position: relative;
    width: min(460px, 100%);
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #0c2544;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.46);
}

.pwa-dialog-panel h2 {
    margin: 0 38px 10px 0;
}

.pwa-dialog-panel p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.pwa-dialog-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
}

.push-settings-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.push-status {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
}

.push-status.success {
    border-color: rgba(51, 196, 129, 0.48);
    background: rgba(51, 196, 129, 0.12);
    color: #b9f5d5;
}

.push-status.error {
    border-color: rgba(229, 72, 77, 0.52);
    background: rgba(229, 72, 77, 0.12);
    color: #ffd0d2;
}

.legal-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
    color: var(--muted);
    font-size: 0.92rem;
}

.legal-links a {
    color: #9ed8ff;
    text-decoration: none;
    font-weight: 800;
}

.legal-links a:hover {
    text-decoration: underline;
}

@media (max-width: 680px) {
    .app-shell {
        padding: 18px 12px 40px;
    }

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

    .app-actions,
    .app-btn {
        width: 100%;
    }

    .app-card {
        padding: 14px;
        border-radius: 8px;
    }

    .community-nav {
        display: flex;
        margin-left: -12px;
        margin-right: -12px;
        padding: 2px 12px 8px;
    }

    .filter-bar {
        grid-template-columns: 1fr;
    }

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

    .card-actions,
    .card-actions form,
    .card-actions .app-btn {
        width: 100%;
    }

    .messages-layout {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .conversation-list {
        max-height: 260px;
    }

    .message-panel {
        min-height: 560px;
        max-height: none;
    }

    .message-composer {
        grid-template-columns: 1fr;
    }

    .message-bubble {
        max-width: 100%;
    }

    .message-row {
        max-width: 94%;
    }

    .pwa-install-button {
        right: 12px;
        bottom: 12px;
    }

    .push-settings-actions,
    .push-settings-actions .app-btn {
        width: 100%;
    }
}


