:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --border-color: #334155;
    --text-light: #e2e8f0;
    --text-muted: #94a3b8;
    --primary-color: blueviolet;
    --primary-hover: #4338ca;
    --success-color: #22c55e;
    --error-color: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

h1 {
    display: flex;
    font-family: 'Orbitron', sans-serif;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 25px;
    font-weight: bold;
    text-shadow: 0 0 10px blueviolet, 0 0 20px blueviolet;
}

/* Swiper e Cards */
.swiper {
    width: 100%;
    height: auto;
    padding-bottom: 2.5rem;
    user-select: none;
}

.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
    height: auto;
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--text-light) !important;
    --swiper-navigation-size: 30px;
}

.card {
    background-color: var(--bg-card);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    width: 100%;
    max-width: 450px;
    min-height: 380px;
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.coin-logo {
    width: 5rem;
    height: 5rem;
    margin-right: 0.75rem;
}

.card-title {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
}

.green {
    color: #4caf50;
    text-shadow: 0 4px 20px rgba(0, 150, 0, 0.8);
}

.red {
    color: #f44336;
    text-shadow: 0 4px 20px rgba(255, 0, 0, 0.8);
}

.blue {
    color: #2196f3;
    text-shadow: 0 4px 20px rgba(0, 0, 250, 0.8);
}

.card-info {
    background-color: var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.card-info .info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-info .info-item:not(:last-child) {
    margin-bottom: 0.5rem;
}

.details-label {
    color: var(--text-muted);
}

.details-value {
    font-weight: 500;
}

.details-value.commission {
    color: var(--success-color);
}

/* Forms e Botões */
.btn {
    width: 100%;
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--primary-hover);
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.form-group {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-label {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--primary-color);
}

.form-icon {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.form-input {
    width: 100%;
    flex-grow: 1;
    background-color: var(--border-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--text-light);
}

/* --- ESTILOS ATUALIZADOS E NOVOS PARA A 'ACTIVATED VIEW' --- */

/* Linha que separa o painel da árvore */
.referral-divider {
    border-bottom: 1px solid var(--border-color);
    margin: 1rem 0;
}

/* Novo painel de dados do usuário */
.user-data-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.2);
}

/* Cada linha de dado dentro do painel */
.data-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

/* Estilo para o valor/dado na direita */
.data-item .data-value {
    text-align: right;
    font-weight: 600;
}

/* Ajuste específico para a seção de saque */
.withdraw-section {
    width: 100%;
    align-items: center;
}

.withdraw-section span {
    font-weight: bold;
}

/* Árvore Familiar */
.referrals-list h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.family-tree {
    text-align: left;
    padding-left: 10px;
}

.child-node,
.grandchild-node {
    padding-left: 20px;
    position: relative;
    margin-top: 8px;
}

.child-node::before,
.grandchild-node::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    width: 15px;
    height: 1px;
}

.grandchildren-container {
    padding-left: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    margin-left: -20px;
}

/* Spinner de Carregamento */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.footer {
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    padding: 10px 0;
    background-color: black;
    color: whitesmoke;
    margin-top:25px;
    position: relative;
    bottom: 0;
}

@media (max-width: 600px) {
    .footer {
        font-size: 0.7rem;
        padding: 8px 0;
    }
}