html {
    scroll-behavior: smooth;
}
/*
:root {
    --bg-dark: #0f172a;
    --text-primary: #f8fafc;
    --color-positive: #10b981;
    --color-negative: #ef4444;
    --color-primary: #4f46e5;
    --color-header-btn: #334155;
    --color-header-btn-hover: #475569;
}*/
:root {
    --bg-dark: #0f172a;
    --bg-soft: #1e293b;

    --text-primary: #f8fafc;
    --text-muted: #94a3b8;

    --color-positive: #10b981;
    --color-negative: #ef4444;
    --color-primary: #4f46e5;

    --color-header-btn: #334155;
    --color-header-btn-hover: #475569;

    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.06);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body e layout geral */
/*
body {
    background-color: var(--bg-dark);
    background-image: radial-gradient(at 50% 50%, #1e293b 0%, #0f172a 100%);
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}*/
body {
    background-color: var(--bg-dark);
    background-image: radial-gradient(
        at 50% 50%,
        var(--bg-soft) 0%,
        var(--bg-dark) 100%
    );
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

body.light {
    --bg-dark: #f8fafc;
    --bg-soft: #e5e7eb;

    --text-primary: #020617;
    --text-muted: #475569;

    --color-header-btn: #e5e7eb;
    --color-header-btn-hover: #cbd5f5;

    --glass-bg: rgba(2, 6, 23, 0.04);
    --glass-border: rgba(2, 6, 23, 0.08);

    background-color: var(--bg-dark);
    background-image: radial-gradient(
        at 50% 50%,
        #ffffff 0%,
        #e5e7eb 100%
    );
    color: var(--text-primary);
}

body.light .glass-header {
    background: rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid rgba(2, 6, 23, 0.06);
    backdrop-filter: blur(12px);
}

body.light .search-box input {
    background: rgba(2, 6, 23, 0.04);
    border: 1px solid rgba(2, 6, 23, 0.1);
    color: #020617;
}

body.light .search-box input::placeholder {
    color: #64748b;
}

body.light .header-action-btn {
    background: var(--color-header-btn);
    color: #020617;
}

body.light .header-action-btn:hover {
    background: var(--color-header-btn-hover);
}

body.light .bubble-node {
    background: rgba(2, 6, 23, 0.03);
    border: 1px solid rgba(2, 6, 23, 0.08);
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.12);
}

body.light #rank-table-container {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(2, 6, 23, 0.08);
}

body.light .rank-table th {
    color: #475569;
}

body.light .modal-content {
    background: #ffffff;
    border: 1px solid rgba(2, 6, 23, 0.1);
}

body.light .modal-close {
    background: rgba(2, 6, 23, 0.06);
    color: #020617;
}

body.light .modal-close:hover {
    background: rgba(2, 6, 23, 0.12);
}

body.light .modal-content {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 20px 60px rgba(2, 6, 23, 0.25);
}

body.light .chart-container {
    background: rgba(2, 6, 23, 0.04);
}

body.light .control-btn {
    background: rgba(2, 6, 23, 0.06);
    color: #020617;
}




/* ---------- HEADER ----------- */
.glass-header {
    width: 100%;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.glass-header.compact {
    padding: 8px 20px;
    backdrop-filter: blur(14px);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}


.logo-box {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    pointer-events: auto;
}

.logo-circle {
    width: 44px;
    height: 44px;
    background: #F7931A;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 22px;
}

.site-title {
    font-size: 24px;
    color: #fff;
    letter-spacing: 0.6px;
}

/* Container para Busca e Ações */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-box input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 10px 12px;
    width: 260px;
    border-radius: 10px;
    color: #fff;
    outline: none;
    transition: all .15s ease;
}

.search-box input:focus {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

/* Estilo base para botões de ação */
.action-btn {
    background: var(--color-primary);
    color: white;
    padding: 10px 14px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
    white-space: nowrap;
}

.action-btn:hover {
    background: #6366f1;
}

/* Sobrescreve a cor para os botões do HEADER */
.header-action-btn {
    background: var(--color-header-btn);
}

.header-action-btn:hover {
    background: var(--color-header-btn-hover);
}

/* ESTILO DO BOTÃO DE ALTERNÂNCIA DA CARTEIRA */
#walletToggleBtn {
    background: transparent;
    /* Fundo transparente */
    color: var(--text-primary);
    /* Cor do texto padrão */
    padding: 10px 14px;
    /* Padding igual ao action-btn */
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Borda mais suave */
    border-radius: 10px;
    /* Borda arredondada igual ao action-btn */
    cursor: pointer;
    font-weight: 600;
    /* Font-weight igual ao action-btn */
    transition: all 0.2s;
    margin: 12px auto 0;
    display: block;
    width: fit-content;
}

#walletToggleBtn:hover {
    background: rgba(255, 255, 255, 0.05);
}

#walletToggleBtn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

/* --------- BUBBLE CONTAINER ---------- */
#bubble-container {
    margin-top: 40px;
    width: 100%;
    min-height: calc(100vh - 80px);
    position: relative;
    display: block;
}

/* Bolhas D3 */
.bubble-node {
    position: absolute;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: grab;
    will-change: transform;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
    transition: border-color .18s, box-shadow .18s;
    pointer-events: auto;
}

.bubble-node:hover {
    z-index: 9999;
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.bubble-node.positive {
    box-shadow: 0 0 35px rgba(16,185,129,.25);
}

.bubble-node.negative {
    box-shadow: 0 0 35px rgba(239,68,68,.25);
}

.b-symbol {
    font-weight: 800;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.b-change {
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.b-price {
    opacity: 0.85;
    font-weight: 500;
    font-size: 0.85em;
}

.b-img {
    width: 26%;
    height: 26%;
    object-fit: contain;
    margin-bottom: 4%;
    pointer-events: none;
    border-radius: 50%;
}

/* ------- RANKING (compacto - estilo A) ------- */
#rank-table-container {
    width: 100%;
    max-width: 1200px;
    margin: 24px auto;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.7);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.rank-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: #e6eef8;
}

.rank-table th,
.rank-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.rank-table th {
    color: #94a3b8;
    font-weight: 600;
    font-size: 12px;
    position: sticky;
    top: 0;
    background: transparent;
}

.rank-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
}

.coin-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

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

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

/* Estilos de modal (mantidos) */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 12000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 900px;
    padding: 22px 22px 20px;

    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);

    border-radius: 16px;
    border: 1px solid var(--glass-border);

    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.coin-info h2 {
    font-size: 1.6rem;
    margin: 0;
    font-weight: 700;
}

.coin-price {
    margin-top: 4px;
    font-size: 0.95rem;
    color: var(--text-muted);
}
.chart-controls {
    display: flex;
    gap: 8px;
}

.control-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background .2s ease, transform .15s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.14);
}

.control-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}
.price-change-bar {
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        var(--color-positive),
        var(--color-primary)
    );
    margin-bottom: 16px;
}
.chart-container {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid var(--glass-border);
    margin-bottom: 16px;
}
.action-btn {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

.action-primary {
    background: var(--color-primary);
    color: #fff;
    border: none;
}

.action-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.35);
}

/*
.modal-content {
    background: #0f172a;
    width: 92%;
    max-width: 900px;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
}
*/

.modal-content-sm {
    max-width: 500px;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 16px;

    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    border: none;

    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);

    font-size: 20px;
    line-height: 1;
    cursor: pointer;

    backdrop-filter: blur(6px);
    transition: background .2s ease, transform .15s ease, opacity .15s ease;
}
.modal-close:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: scale(1.05);
}

.modal-close:active {
    transform: scale(0.95);
    opacity: .85;
}

@media (max-width: 640px) {
    .modal-close {
        width: 40px;
        height: 40px;
        font-size: 22px;
        top: 12px;
        right: 12px;
    }
}
@media (max-width: 640px) {
    .modal-content {
        padding: 18px;
        border-radius: 14px;
    }

    .coin-info h2 {
        font-size: 1.4rem;
    }
}




.chart-container {
    height: 320px;
    width: 100%;
    margin-top: 12px;
}

.price-change-bar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 12px;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* Estilo para o controle de gráfico */
.chart-controls {
    display: flex;
    align-items: center;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s;
}

/* O único botão ativo (Linha) */
.control-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

/* --- INÍCIO CORREÇÃO TIPOGRAFIA MINHA CARTEIRA --- */
.wallet-list {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Cada item da carteira */
.wallet-list-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 12px 14px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    transition: 0.25s;
}

.wallet-list-item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.18);
}

.wallet-list-item:last-child {
    border-bottom: none;
}

/* Ícone da moeda */
.wallet-list-item .coin-icon {
    width: 22px;
    height: 22px;
    margin-right: 10px;
}

.wallet-info {
    display: flex;
    align-items: center;
    gap: 10px;
    /* Espaçamento entre o ícone e o texto */
    font-size: 1.05rem;
    /* Aumenta um pouco a fonte principal */
    font-weight: 500;
}

.wallet-list-item .change-percentage {
    font-size: 0.9rem;
    /* Tamanho da fonte do percentual */
    font-weight: 600;
    margin-left: 12px;
}

.wallet-remove-btn {
    background: var(--color-negative);
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
}

/* --- FIM CORREÇÃO TIPOGRAFIA MINHA CARTEIRA --- */

/* Estilos para o formulário de Comunidade */
.community-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* Espaçamento entre os campos */
}

.community-form textarea,
.community-form input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
    outline: none;
    transition: border-color 0.2s;
}

.community-form textarea:focus,
.community-form input:focus {
    border-color: var(--color-primary);
}

.community-form button[type="submit"] {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
}

/* ------- FOOTER ------- */
.site-footer {
    width: 100%;
    padding: 18px 12px;
    margin-top: 30px;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
    background: transparent;
}

/* Responsive */
@media (max-width: 800px) {

    /* 1. Ajustes do Cabeçalho para Mobile (Evitando quebras inesperadas) */
    .glass-header {
        padding: 10px;
    }

    .header-content {
        flex-wrap: wrap;
    }

    .logo-box {
        width: auto;
        /* Deixa o logo no tamanho natural */
    }

    .site-title {
        font-size: 20px;
    }

    .logo-circle {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .header-actions {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        width: 100%;
        /* Força a ocupar a largura total para os botões e busca */
        margin-top: 8px;
        order: 2;
        /* Coloca as ações logo abaixo do logo */
    }

    .search-box {
        order: 3;
        width: 100%;
        margin-top: 8px;
    }

    .search-box input {
        width: 100%;
        padding: 8px 10px;
        font-size: 0.9rem;
    }

    .action-btn {
        padding: 8px 10px;
        font-size: 0.9rem;
    }

    /* Remove o flex-grow para evitar que os botões se esmaguem ou cresçam demais */
    .header-actions>.action-btn {
        flex-grow: 1;
        /* Permite que os botões se expandam um pouco */
        min-width: 80px;
    }
}


@media (max-width: 540px) {

    .wallet-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 14px;
    }

    .wallet-remove-btn {
        width: 100%;
        text-align: center;
        padding: 10px;
        font-size: 14px;
    }

    .wallet-list-item span {
        font-size: 15px;
    }
}


/* Mobile refinado */
@media (max-width: 480px) {
    .site-title {
        font-size: 18px;
    }

    .action-btn {
        font-size: 0.85rem;
        padding: 8px;
    }

    #walletToggleBtn {
        font-size: 0.9rem;
    }

    .modal-content {
        padding: 14px;
    }

    .chart-container {
        height: 260px;
    }
}

/* Tablets */
@media (min-width: 481px) and (max-width: 1024px) {
    .header-content {
        padding: 0 10px;
    }

    .search-box input {
        width: 200px;
    }
}


.skeleton {
    position: relative;
    overflow: hidden;
    background: rgba(255,255,255,.06);
    border-radius: 12px;
}

.skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,.15),
        transparent
    );
    animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}


/* SECTION HERO */
/* ================= HERO ================= */

.hero {
    position: relative;
    padding: 130px 20px 90px;
    background:
        radial-gradient(at top left, rgba(79,70,229,.25), transparent 50%),
        radial-gradient(at bottom right, rgba(16,185,129,.22), transparent 50%),
        #020617;
    overflow: hidden;
}

.hero.market-up {
    background:
        radial-gradient(at top left, rgba(16,185,129,.28), transparent 55%),
        radial-gradient(at bottom right, rgba(79,70,229,.22), transparent 55%),
        #020617;
}

.hero.market-down {
    background:
        radial-gradient(at top left, rgba(239,68,68,.28), transparent 55%),
        radial-gradient(at bottom right, rgba(79,70,229,.22), transparent 55%),
        #020617;
}

.hero-content {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

/* Texto */
.hero-text h2 {
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 18px;
}

.hero-text h2 span {
    color: #22c55e;
}

.hero-text p {
    max-width: 720px;
    margin: 0 auto 40px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #94a3b8;
}

/* CTA */
.hero-cta {
    margin-bottom: 40px;
}

.cta-primary {
    padding: 14px 36px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    color: #020617;
    background: linear-gradient(135deg, #22c55e, #4ade80);
    box-shadow: 0 10px 30px rgba(34,197,94,.35);
    transition: transform .25s ease, box-shadow .25s ease;
}

.cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(34,197,94,.5);
}

.cta-primary:active {
    transform: scale(0.96);
}

/* Features */
.hero-features {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e5e7eb;
    font-size: .95rem;
}

/* Glows */
.hero-glow {
    position: absolute;
    width: 420px;
    height: 420px;
    filter: blur(140px);
    opacity: .5;
}

.hero-glow-left {
    top: -120px;
    left: -120px;
    background: #4f46e5;
}

.hero-glow-right {
    bottom: -120px;
    right: -120px;
    background: #22c55e;
}

/* Partículas */
.hero-particles::before,
.hero-particles::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(255,255,255,.12) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: moveParticles 40s linear infinite;
    opacity: .15;
}

.hero-particles::after {
    animation-duration: 80s;
    opacity: .08;
}

@keyframes moveParticles {
    from { transform: translateY(0); }
    to { transform: translateY(-300px); }
}

/* Fade up */
.fade-up {
    animation: fadeUp .8s ease-out both;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .hero {
        padding: 100px 20px 70px;
    }

    .hero-features {
        gap: 20px;
    }
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(
        to bottom,
        transparent,
        var(--bg-dark)
    );
    z-index: 2;
}

/* END SECTION HERO */