:root {
    /* TEMA PADRÃO (GTS Network - Azul Original) */
    --pkmn-red: #dd4b39;
    --pkmn-dark-red: #b02a1b;
    --pkmn-blue: #5c7cbd;
    /* O nosso azul claro e suave de volta! */
    --pkmn-cyan: #00ffff;
    --pkmn-yellow: #ffcc00;
    --pkmn-bg: #e5ecf9;
    --pkmn-box-border: #c3d9ff;
    --pkmn-text: #333333;
    --card-bg: #ffffff;
    --border-radius: 6px;
    --success-color: #28a745;
    --dex-red: #dd4b39;
    --dex-dark-red: #b02a1b;
    --dex-screen-bg: #232323;
    --dex-panel: #dedede;
}

/* ==========================================
   TEMA POKÉMON (Ativado via Classe no Body)
   ========================================== */
body.theme-pokemon {
    --pkmn-red: #E3350D;
    --pkmn-dark-red: #CC0000;
    --pkmn-blue: #E3350D;
    --pkmn-yellow: #FFCB05;
    --pkmn-bg: #f4f4f4;
    --pkmn-box-border: #dcdcdc;
    --pkmn-text: #2a2a2a;
}

body.theme-pokemon .action-btn {
    color: #1e3c72;
}

body.theme-pokemon .action-btn:hover {
    background-color: #e6b800;
}

body.theme-pokemon .header-nav a.active {
    border-bottom-color: var(--pkmn-yellow);
    color: var(--pkmn-yellow);
}

body.theme-pokemon .header-nav a:hover {
    color: var(--pkmn-yellow);
}

body.theme-pokemon .trainer-card-header,
body.theme-pokemon .section-title {
    color: #1e3c72;
}

body.theme-pokemon .chat-header {
    background-color: #1e3c72;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--pkmn-bg);
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    color: var(--pkmn-text);
    font-size: 14px;
    line-height: 1.5;
    transition: background-image 0.5s ease-in-out;
}

a {
    color: #0000cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: var(--pkmn-red);
}

.hidden {
    display: none !important;
}

/* ==========================================
   ESCOLHA DE PLANO DE FUNDO (CONFIG)
   ========================================== */
.bg-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.bg-picker-item {
    cursor: pointer;
    border-radius: 8px;
    border: 3px solid transparent;
    transition: transform 0.2s, border-color 0.2s;
    overflow: hidden;
    height: 90px;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.bg-picker-item:hover {
    transform: scale(1.05);
    border-color: var(--pkmn-blue);
}

.bg-picker-item.active {
    border-color: var(--pkmn-red);
    box-shadow: 0 0 10px rgba(221, 75, 57, 0.5);
}

.bg-picker-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bg-picker-label {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 10px;
    text-align: center;
    padding: 4px 0;
    font-weight: bold;
}

/* ==========================================
   BOTÃO POKÉBOLA REALISTA (CSS ART)
   ========================================== */
.pokeball-btn {
    width: 24px;
    height: 24px;
    background: linear-gradient(to bottom, #f00 45%, #333 45%, #333 55%, #fff 55%);
    border: 1.5px solid #333;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.pokeball-btn:hover {
    transform: rotate(20deg) scale(1.1);
}

.pokeball-btn::before {
    content: "";
    position: absolute;
    width: 7px;
    height: 7px;
    background: #fff;
    border: 1.5px solid #333;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.pokeball-btn::after {
    content: "";
    position: absolute;
    width: 3px;
    height: 3px;
    background: #333;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
}

/* ==========================================
   BOTOES GERAIS
   ========================================== */
.action-btn,
.secondary-btn,
.logout-btn {
    padding: 8px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.action-btn {
    background-color: var(--pkmn-yellow);
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.action-btn:hover {
    background-color: #3b5998;
    transform: translateY(-1px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.15);
}

.secondary-btn {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ccc;
}

.secondary-btn:hover {
    background-color: #e9e9e9;
}

.logout-btn {
    background-color: transparent;
    border: 1px solid white;
    color: white;
    padding: 4px 10px;
    font-size: 12px;
}

.logout-btn:hover {
    background-color: white;
    color: var(--pkmn-blue);
}

.small-btn {
    padding: 4px 8px;
    font-size: 11px;
}

/* ==========================================
   ICONES DE NOTIFICAÇÃO HEADER
   ========================================== */
.icon-btn {
    background: none;
    border: none;
    font-size: 20px;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s;
}

.icon-btn:hover {
    transform: scale(1.1);
}

.notif-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--pkmn-red);
    color: white;
    font-size: 9px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 50%;
    border: 1px solid white;
}

/* ==========================================
   HEADER PRINCIPAL
   ========================================== */
.pkmn-header {
    background-color: var(--pkmn-blue);
    padding: 0 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    height: 60px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hamburger-btn,
.close-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.close-menu-btn {
    font-size: 32px;
    align-self: flex-end;
    margin-bottom: 20px;
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

/* NOVO LOGO EM IMAGEM NO HEADER COM FUNDO BRANCO E CÍRCULO */
.header-logo-img {
    height: 46px;
    width: 46px;
    background-color: #ffffff;
    border-radius: 50%;
    padding: 4px;
    object-fit: contain;
    display: block;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.header-logo-img:hover {
    transform: scale(1.05);
}

.header-nav {
    display: flex;
    gap: 15px;
    align-items: center;
}

.header-nav a {
    font-weight: bold;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    padding: 19px 5px;
    border-bottom: 4px solid transparent;
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s;
}

.header-nav a:hover {
    color: white;
}

.header-nav a.active {
    color: white;
    border-bottom: 4px solid #ffffff;
    cursor: default;
}

.trainer-email {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 500;
}

/* ==========================================
   BARRA DE PESQUISA DE TREINADORES
   ========================================== */
.header-search {
    position: relative;
    margin-left: 10px;
}

.header-search input {
    padding: 6px 12px;
    border-radius: 20px;
    border: none;
    outline: none;
    font-size: 12px;
    width: 200px;
    transition: width 0.3s;
    background: rgba(255, 255, 255, 0.9);
}

.header-search input:focus {
    width: 250px;
    background: white;
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-top: 5px;
    z-index: 1000;
    overflow: hidden;
    max-height: 300px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.search-result-item:hover {
    background: #f5f7fa;
}

/* ==========================================
   LAYOUT 3 COLUNAS - LATERAIS FIXAS
   ========================================== */
.hidden-desktop {
    display: none !important;
}

.pkmn-container {
    display: flex;
    gap: 20px;
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 10px;
    align-items: flex-start;
}

.pkmn-left {
    width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding-right: 5px;
}

.pkmn-left::-webkit-scrollbar {
    width: 4px;
}

.pkmn-left::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.pkmn-right {
    width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding-right: 5px;
}

.pkmn-right::-webkit-scrollbar {
    width: 4px;
}

.pkmn-right::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.pkmn-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

/* ==========================================
   MENU MOBILE (ATALHOS DA LIGA) NATIVO
   ========================================== */
.mobile-menu-list {
    display: flex;
    flex-direction: column;
}

.mobile-menu-list button {
    background: transparent;
    border: none;
    border-bottom: 1px solid #eee;
    padding: 15px 5px;
    text-align: left;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
}

.mobile-menu-list button:last-child {
    border-bottom: none;
}

.mobile-menu-list button:hover {
    background-color: #f9f9f9;
}

.menu-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.mobile-logout-btn {
    background-color: var(--pkmn-red);
    color: white;
    border: none;
    border-radius: 6px;
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: bold;
    margin-top: 10px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ==========================================
   FOOTER GTS NETWORK
   ========================================== */
.main-footer {
    text-align: center;
    padding: 20px 10px;
    color: #666;
    font-size: 12px;
    border-top: 1px solid var(--pkmn-box-border);
    margin-top: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
}

.main-footer strong {
    color: var(--pkmn-blue);
}

.footer-links {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.footer-links a {
    color: var(--pkmn-blue);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--pkmn-red);
    text-decoration: underline;
}

/* ==========================================
   CAIXAS PADRÃO E LATERAIS
   ========================================== */
.pkmn-box {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    padding: 20px;
    border: 1px solid var(--pkmn-box-border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.section-title {
    background-color: var(--pkmn-box-border);
    margin: -20px -20px 20px -20px;
    padding: 8px 20px;
    font-size: 15px;
    border-radius: 6px 6px 0 0;
    color: #284c9c;
    font-weight: bold;
}

.side-title {
    color: #284c9c;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 15px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--pkmn-box-border);
    padding-bottom: 5px;
}

.profile-box {
    padding: 0;
    overflow: hidden;
    text-align: center;
    border: 1px solid var(--pkmn-box-border);
    transition: transform 0.2s;
}

.profile-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.trainer-card-header {
    background-color: var(--pkmn-box-border);
    color: #284c9c;
    font-weight: bold;
    padding: 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-pic-container {
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid #eee;
}

.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 4px;
    border: 1px solid #ccc;
    padding: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.trainer-name {
    font-size: 18px;
    font-weight: bold;
    color: #284c9c;
    margin: 10px 0 5px 0;
}

.profile-info {
    color: #666;
    font-size: 12px;
    padding-bottom: 15px;
}

.stats-box {
    font-size: 13px;
    padding: 15px;
}

.prof-tip {
    background-color: #fff9e6;
    border-left: 4px solid #ffcb05;
    padding: 10px;
    margin-bottom: 15px;
    font-size: 12px;
    color: #555;
    border-radius: 0 4px 4px 0;
}

.profile-stats {
    list-style: none;
    margin-bottom: 10px;
}

.profile-stats li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
    border-bottom: 1px dashed #eee;
    padding-bottom: 6px;
}

.stat-number {
    font-weight: bold;
    color: #284c9c;
}

.profile-badges {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.badge-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: bold;
    color: #284c9c;
}

.badge-item .icons {
    font-size: 16px;
}

/* ==========================================
   FICHA DE TREINADOR POKÉMON (PERFIL)
   ========================================== */
.trainer-profile-banner {
    background: linear-gradient(135deg, var(--pkmn-red) 50%, var(--pkmn-dark-red) 50%);
    height: 120px;
    width: 100%;
    border-bottom: 4px solid #333;
    position: relative;
}

.trainer-profile-banner::after {
    content: '';
    position: absolute;
    bottom: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    background: white;
    border: 4px solid #333;
    border-radius: 50%;
    z-index: 2;
    box-shadow: inset 0 0 0 2px white, inset 0 0 0 6px #ccc;
}

.trainer-profile-content {
    padding: 0 20px 30px 20px;
    text-align: center;
    position: relative;
}

.tp-avatar-wrapper {
    margin-top: -60px;
    margin-bottom: 15px;
    position: relative;
    z-index: 3;
}

.tp-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 6px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    object-fit: cover;
    background: white;
}

.tp-name {
    font-size: 28px;
    font-weight: 900;
    color: #333;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tp-title {
    font-size: 13px;
    color: var(--pkmn-blue);
    font-weight: bold;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.tp-stats-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.tp-stat-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
    transition: transform 0.2s;
}

.tp-stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--pkmn-blue);
}

.tp-stat-icon {
    font-size: 28px;
    background: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.tp-stat-data {
    display: flex;
    flex-direction: column;
}

.tp-stat-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    font-weight: bold;
}

.tp-stat-value {
    font-size: 16px;
    font-weight: 900;
    color: #333;
}

.tp-actions-container {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.tp-actions-container button {
    padding: 12px 30px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 30px;
}

/* ==========================================
   VISUAL DA PÁGINA DE LIGA (COMUNIDADE)
   ========================================== */
.league-profile-banner {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    height: 140px;
    width: 100%;
    position: relative;
}

.league-profile-content {
    padding: 0 20px 30px 20px;
    text-align: center;
    position: relative;
}

.lp-avatar-wrapper {
    margin-top: -60px;
    margin-bottom: 20px;
    position: relative;
    z-index: 3;
}

.lp-avatar {
    width: 130px;
    height: 130px;
    border-radius: 16px;
    border: 4px solid white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    object-fit: cover;
    background: white;
}

.lp-header-info {
    margin-bottom: 20px;
}

/* ==========================================
   GRIDS LATERAIS E COMMUNITIES
   ========================================== */
.grid-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    align-items: start;
}

.grid-item {
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
    min-width: 0;
    overflow: hidden;
    position: relative;
}

.grid-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    border-radius: 4px;
    padding: 2px;
    margin-bottom: 5px;
    object-fit: cover;
    border: 1px solid #ccc;
    display: block;
}

.grid-item:hover {
    transform: translateY(-2px);
}

.grid-item span:not(.status-dot) {
    display: block;
    font-size: 10px;
    font-weight: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #0000cc;
    width: 100%;
}

/* ==========================================
   FEED E COMENTÁRIOS
   ========================================== */
.create-post-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.create-post-box textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    resize: none;
    height: 80px;
    font-size: 13px;
    outline: none;
}

.create-post-box textarea:focus {
    border-color: var(--pkmn-blue);
}

.create-post-box button {
    align-self: flex-end;
}

.feed-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
    max-height: 65vh;
    overflow-y: auto;
    padding-right: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.feed-container::-webkit-scrollbar {
    display: none;
}

.post-card {
    background: var(--card-bg);
    border: 1px solid var(--pkmn-box-border);
    border-radius: 6px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-left: 4px solid var(--pkmn-blue);
}

.post-header-area {
    display: flex;
    gap: 15px;
}

.post-author-col {
    width: 80px;
    text-align: center;
    flex-shrink: 0;
    cursor: pointer;
}

.post-author-col img {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: white;
    padding: 2px;
    object-fit: cover;
    transition: transform 0.2s;
}

.post-author-col:hover img {
    transform: scale(1.05);
    border-color: var(--pkmn-blue);
}

.post-author-col span {
    display: block;
    font-weight: bold;
    font-size: 11px;
    margin-top: 6px;
    word-wrap: break-word;
    color: #0000cc;
}

.post-content-col {
    flex: 1;
    min-width: 0;
}

.post-date {
    font-size: 11px;
    color: #888;
    margin-bottom: 10px;
    display: block;
    border-bottom: 1px dotted #ccc;
    padding-bottom: 5px;
}

.post-body {
    line-height: 1.5;
    font-size: 13px;
    color: #333;
}

.post-image {
    margin-top: 15px;
    max-height: 400px;
    width: auto;
    max-width: 100%;
    border: 1px solid #ccc;
    padding: 3px;
    background: white;
    object-fit: contain;
    display: block;
    border-radius: 6px;
}

.post-interactions {
    display: flex;
    gap: 15px;
    border-top: 1px dashed #ccc;
    padding-top: 10px;
    margin-top: 10px;
    align-items: center;
}

.interaction-btn {
    background: none;
    border: none;
    font-size: 12px;
    color: #0000cc;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
}

.interaction-btn:hover {
    text-decoration: underline;
}

.interaction-btn.liked {
    color: var(--pkmn-red);
    font-weight: bold;
}

.comments-section {
    background: #f5f7fa;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    padding: 10px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment-item {
    font-size: 12px;
    padding-bottom: 5px;
    border-bottom: 1px dotted #ccc;
}

.comment-author {
    font-weight: bold;
    color: #284c9c;
    margin-right: 5px;
}

.add-comment-box {
    display: flex;
    gap: 5px;
    margin-top: 5px;
}

.add-comment-box input {
    flex: 1;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
}

/* ==========================================
   MENSAGENS E STATUS
   ========================================== */
.notif-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.notif-item.unread {
    background-color: #f0f4ff;
    border-left: 3px solid var(--pkmn-blue);
}

.notif-content {
    flex: 1;
    font-size: 13px;
}

.notif-date {
    font-size: 10px;
    color: #888;
    display: block;
    margin-top: 4px;
}

.message-bubble {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 13px;
}

.message-bubble.sent {
    background: var(--pkmn-bg);
    border-color: var(--pkmn-box-border);
    text-align: right;
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 5px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
    border: 2px solid white;
    box-sizing: content-box;
}

.status-online {
    background-color: #28a745;
}

.status-offline {
    background-color: #888;
}

.status-container {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.status-text {
    font-size: 10px;
    font-weight: normal;
    color: rgba(255, 255, 255, 0.8);
}

/* ==========================================
   BATE-PAPO LATERAL COM NOTIFICAÇÃO
   ========================================== */
.docked-chat-item {
    display: flex;
    gap: 10px;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s;
    border: 1px solid transparent;
    position: relative;
}

.docked-chat-item:hover {
    background: #f0f0f0;
    border: 1px solid #ccc;
}

.msg-unread-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 10px;
    height: 10px;
    background-color: var(--pkmn-red);
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

.docked-avatar-box {
    position: relative;
}

.docked-avatar-box img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ccc;
}

/* ==========================================
   POKÉDEX VISUAL E BOTÕES ESPECÍFICOS
   ========================================== */
.pokedex-device {
    background-color: var(--dex-red);
    border-radius: 6px;
    padding: 20px;
    border: 1px solid var(--dex-dark-red);
    box-shadow: inset -2px -2px 10px rgba(0, 0, 0, 0.1), 2px 2px 10px rgba(0, 0, 0, 0.1);
}

.pokedex-top-bar {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--dex-dark-red);
    padding-bottom: 15px;
}

.pokedex-lens-container {
    width: 50px;
    height: 50px;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.pokedex-lens {
    width: 38px;
    height: 38px;
    background-color: #28aafa;
    border-radius: 50%;
    border: 2px solid #333;
}

.pokedex-lights {
    display: flex;
    gap: 8px;
    margin-right: 20px;
}

.light {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid #333;
}

.light.red {
    background-color: #ff0000;
}

.light.yellow {
    background-color: #ffcc00;
}

.light.green {
    background-color: #33cc33;
}

.pokedex-header-info {
    color: white;
}

.pokedex-header-info h2 {
    font-size: 16px;
    margin-bottom: 2px;
    font-weight: bold;
}

.pokedex-header-info p {
    font-size: 11px;
    color: #ffda6a;
    font-weight: bold;
}

.pokedex-controls {
    margin-bottom: 10px;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Blindagem do Botão da Pokédex (Correção Tema Escuro) */
.pokedex-add-btn {
    background-color: #232323 !important;
    color: white !important;
    border: 1px solid white !important;
    border-radius: 4px;
}

.pokedex-add-btn:hover {
    background-color: #444 !important;
}

/* Quando o Tema Pokémon estiver ativo, o botão da Pokédex fica com texto amarelo */
body.theme-pokemon .pokedex-add-btn {
    color: var(--pkmn-yellow) !important;
    border-color: var(--pkmn-yellow) !important;
}

.pokedex-screen-container {
    background-color: var(--dex-panel);
    border-radius: 4px;
    padding: 15px;
    border: 1px solid #333;
}

.pokedex-screen {
    background-color: var(--dex-screen-bg);
    border-radius: 3px;
    padding: 15px;
    min-height: 300px;
    max-height: 500px;
    overflow-y: auto;
    border: inset 2px #111;
}

/* ==========================================
   GRIDS GERAIS E MARKETPLACE
   ========================================== */
.search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.search-container input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    flex: 1;
    min-width: 140px;
}

.currency-info {
    font-size: 12px;
    color: #888;
    margin-bottom: 15px;
    text-align: center;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.tcg-card {
    background: var(--card-bg);
    border-radius: 4px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
    border: 1px solid #ccc;
    position: relative;
}

.tcg-card:hover {
    background-color: var(--pkmn-bg);
    border-color: var(--pkmn-blue);
}

.tcg-card img {
    width: 100%;
    border: 1px solid #ccc;
    padding: 2px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.tcg-card-info h3 {
    font-size: 11px;
    margin-bottom: 4px;
    color: #284c9c;
    font-weight: bold;
}

.tcg-card-info p {
    font-size: 10px;
    color: #555;
    margin-bottom: 6px;
}

.trade-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--pkmn-red);
    color: white;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: bold;
    border: 1px solid white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.deck-item {
    background: white;
    border: 1px solid var(--pkmn-box-border);
    padding: 15px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.deck-item h4 {
    color: #284c9c;
    margin-bottom: 5px;
}

/* ==========================================
   TORNEIOS CARDS E BADGES
   ========================================== */
.tournament-card {
    background: white;
    border: 1px solid var(--pkmn-box-border);
    border-left: 5px solid #284c9c;
    padding: 15px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tournament-card h3 {
    color: #284c9c;
    margin-bottom: 5px;
    font-size: 16px;
}

.tournament-card p {
    font-size: 12px;
    color: #666;
}

.badge-tag {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    color: white;
    display: inline-block;
}

.badge-aberto {
    background-color: var(--success-color);
}

.badge-andamento {
    background-color: var(--pkmn-yellow);
    color: white;
}

.badge-finalizado {
    background-color: #888;
}

.admin-shield {
    background-color: var(--pkmn-red);
    color: white;
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: bold;
    margin-top: 10px;
    display: inline-block;
}

/* ==========================================
   RANKING E MODAL GERAL
   ========================================== */
.ranking-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 400px;
}

.ranking-table th,
.ranking-table td {
    padding: 10px 15px;
    text-align: left;
    border-bottom: 1px solid #ccc;
    font-size: 13px;
}

.ranking-table th {
    background-color: var(--pkmn-box-border);
    font-weight: bold;
    color: #284c9c;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 15px;
}

.modal-content {
    background: var(--card-bg);
    width: 100%;
    max-width: 450px;
    border: 1px solid #aaa;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background-color: var(--pkmn-blue);
    color: white;
    font-weight: bold;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    font-weight: bold;
}

.modal-body {
    padding: 20px;
    font-size: 13px;
    max-height: 65vh;
    overflow-y: auto;
    color: var(--pkmn-text);
}

.modal-form-group {
    margin-bottom: 15px;
}

.modal-form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #555;
}

.modal-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
}

.modal-file-input {
    width: 100%;
    padding: 8px;
    border: 1px dashed #aaa;
    border-radius: 4px;
    font-size: 12px;
    background: #fafafa;
    cursor: pointer;
}

.modal-footer {
    padding: 12px 20px;
    background-color: #f8f9fa;
    text-align: right;
    border-top: 1px solid #ccc;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

/* ========================================================= */
/* CHAT INSTANTÂNEO E TRADE ENGINE */
/* ========================================================= */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    background: white;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
    border: 1px solid #aaa;
}

.chat-header {
    background: var(--pkmn-blue);
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    cursor: pointer;
}

.chat-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.chat-body {
    height: 300px;
    padding: 15px;
    overflow-y: auto;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-msg {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 15px;
    font-size: 13px;
    line-height: 1.4;
    word-wrap: break-word;
    border: none;
}

.chat-msg.received {
    align-self: flex-start;
    background: #e4e6eb;
    color: #333;
    border-bottom-left-radius: 2px;
}

.chat-msg.sent {
    align-self: flex-end;
    background: #d4dded;
    color: #333;
    border-bottom-right-radius: 2px;
}

.chat-footer {
    padding: 10px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-footer input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 20px;
    outline: none;
    font-size: 13px;
}

.trade-icon-btn {
    border-radius: 50%;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    background: linear-gradient(135deg, #5c7cbd, #8b5cf6);
    color: white;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.send-chat-btn {
    border-radius: 20px;
    height: 36px;
    padding: 0 15px;
    background-color: var(--pkmn-blue);
    color: white;
    border: none;
    font-weight: bold;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.trade-proposal {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    padding: 10px;
    margin-top: 5px;
    text-align: center;
    color: #856404;
    font-size: 12px;
}

.trade-proposal-cards {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.trade-proposal-card {
    width: 60px;
    text-align: center;
    font-size: 9px;
    line-height: 1.1;
    font-weight: bold;
}

.trade-proposal-card img {
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 4px;
    border: 1px solid #ccc;
}

.trade-proposal-icon {
    font-size: 20px;
}

.trade-btn-group {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: 8px;
}

/* ==========================================
   REGRAS MOBILE
   ========================================== */
@media (max-width: 900px) {
    .hidden-mobile {
        display: none !important;
    }

    .hidden-desktop {
        display: block !important;
    }

    .pkmn-container {
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        margin-top: 0;
        padding-bottom: 70px;
    }

    .pkmn-left,
    .pkmn-right {
        position: relative;
        top: 0;
        max-height: none;
        overflow-y: visible;
        display: none;
        width: 100%;
        padding: 0 10px;
    }

    .pkmn-center {
        width: 100%;
        min-width: 0;
        padding: 0;
        gap: 0;
    }

    .main-footer {
        margin-bottom: 80px;
    }

    .mobile-menu-active .pkmn-center {
        display: none !important;
    }

    .mobile-menu-active .pkmn-left,
    .mobile-menu-active .pkmn-right {
        display: flex !important;
        flex-direction: column;
        gap: 15px;
        margin-top: 15px;
    }

    .header-content {
        padding: 0 10px;
    }

    .pkmn-box {
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 15px;
    }

    .post-card {
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin-bottom: 10px;
        border-top: 1px solid #eee;
        border-bottom: 1px solid #eee;
    }

    .feed-container {
        max-height: none;
        overflow-y: visible;
        padding-right: 0;
        margin-top: 10px;
    }

    .bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        border-top: 1px solid #ccc;
        justify-content: space-around;
        align-items: center;
        padding: 8px 0;
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
        z-index: 1000;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    }

    .bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        color: #888;
        text-decoration: none;
        font-size: 10px;
        gap: 4px;
        transition: color 0.2s;
        width: 25%;
    }

    .bnav-icon {
        font-size: 22px;
    }

    .bottom-nav a.active {
        color: var(--pkmn-blue);
    }

    .bottom-nav a.active .bnav-icon {
        transform: scale(1.1);
    }

    .chat-widget {
        width: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
        border: none;
    }

    .chat-body {
        height: 50vh;
    }

    .results-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }

    .pokedex-screen {
        padding: 10px;
        display: block;
    }

    .tcg-card {
        padding: 8px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        min-width: 0;
    }

    .tcg-card img {
        max-height: 140px;
        width: 100%;
        object-fit: contain;
        margin-bottom: 5px;
    }

    .tcg-card-info h3 {
        font-size: 10px;
    }

    .tcg-card-info p {
        font-size: 9px;
        margin-bottom: 4px;
    }

    .price-tag-brl {
        font-size: 10px;
    }
}

/* ==========================================
   NOVA TELA DE LOGIN - DESIGN POKÉBOLA (ISOLADO)
   ========================================== */
.login-body-fullscreen {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #222;
    position: relative;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.pokeball-giant-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.pkb-top {
    background-color: #E3350D;
    height: 50%;
    width: 100%;
}

.pkb-bottom {
    background-color: #f4f4f4;
    height: 50%;
    width: 100%;
}

.pkb-center-stripe {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 24px;
    background-color: #222;
    transform: translateY(-50%);
}

.pkb-center-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    background-color: #f4f4f4;
    border: 24px solid #222;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
}

.pkb-center-inner {
    width: 80px;
    height: 80px;
    background-color: #fff;
    border: 6px solid #222;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.auth-container-floating {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.auth-box-modern {
    background: #ffffff;
    padding: 35px 25px;
    border-radius: 16px;
    border: 4px solid #222;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    text-align: center;
    position: relative;
}

/* NOVO LOGO EM IMAGEM NO LOGIN */
.auth-logo-img {
    width: 100%;
    max-width: 250px;
    margin: 0 auto 15px auto;
    display: block;
}

.auth-form-modern {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.auth-form-modern input {
    padding: 14px;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    outline: none;
    transition: 0.2s;
    background-color: #fafafa;
}

.auth-form-modern input:focus {
    border-color: #1a73e8;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2);
}

.auth-btn-primary {
    background-color: #FFCB05;
    color: #1e3c72;
    padding: 14px;
    font-size: 15px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid #1e3c72;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 5px;
}

.auth-btn-primary:hover {
    background-color: #ffda6a;
    transform: translateY(-2px);
    box-shadow: 0 4px 0 #1e3c72;
}

.auth-btn-primary:active {
    transform: translateY(2px);
    box-shadow: 0 0 0 #1e3c72;
}

/* ==========================================
   MELHORIAS DE LOGIN E SENHA
   ========================================== */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-wrapper input {
    width: 100%;
    padding-right: 40px !important;
}

.toggle-password {
    position: absolute;
    right: 12px;
    cursor: pointer;
    font-size: 16px;
    user-select: none;
    color: #666;
    transition: transform 0.2s;
}

.toggle-password:hover {
    transform: scale(1.2);
}

/* Hiperligações e Links Inferiores */
.auth-link-small {
    font-size: 12px;
    color: #1a73e8;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}

.auth-link-small:hover {
    color: #1e3c72;
    text-decoration: underline;
}

.toggle-auth {
    margin-top: 20px;
    font-size: 13px;
    color: #666;
}

.auth-link-highlight {
    color: #E3350D;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.auth-link-highlight:hover {
    color: #CC0000;
    text-decoration: underline;
}