/* =====================================================
   ExcelQuest – Dashboard (Mapa de Fases)
   ===================================================== */

.dashboard-page {
    background: radial-gradient(ellipse at top, #0a1f14 0%, var(--bg) 60%);
    min-height: 100vh;
}

.dashboard-main {
    max-width: 800px;
    margin: 0 auto;
    padding: 28px 20px 60px;
}

/* ---- Hero ---- */
.dashboard-hero {
    margin-bottom: 20px;
    animation: slideDown 0.4s ease;
}

.dashboard-hero h2 {
    font-size: 1.6rem;
    margin-bottom: 4px;
}

.dashboard-hero p {
    font-size: 0.95rem;
}

/* ---- Liga Banner ---- */
.league-banner {
    background: linear-gradient(135deg, var(--card), var(--card-2));
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    animation: slideDown 0.4s ease 0.1s both;
    gap: 12px;
}

.league-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.league-icon {
    font-size: 2rem;
}

.league-name {
    font-size: 1rem;
    font-weight: 800;
}

.league-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ---- Seção de Módulos ---- */
.modules-section {
    animation: slideUp 0.4s ease 0.2s both;
}

.section-title {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 24px;
    font-weight: 700;
}

/* ---- Caminho de Módulos ---- */
.modules-path {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    position: relative;
}

/* Linha de caminho */
.modules-path::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--border);
    transform: translateX(-50%);
    z-index: 0;
    border-radius: 2px;
}

/* Grupo de módulo */
.module-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    margin-bottom: 0;
}

/* Separador de nível */
.level-separator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 16px;
    width: 100%;
}

.level-separator::before,
.level-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.level-tag {
    background: var(--card-2);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Card de módulo */
.module-node {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--card);
    border: 3px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    width: 100%;
    max-width: 480px;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    color: var(--text);
    margin: 6px 0;
}

.module-node:hover:not(.locked) {
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    color: var(--text);
}

.module-node.completed {
    border-color: var(--green);
    background: linear-gradient(135deg, var(--card), #0f2a12);
}

.module-node.active {
    border-color: var(--blue);
    background: linear-gradient(135deg, var(--card), #0a1e33);
    animation: pulse-border 2s ease infinite;
}

.module-node.locked {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

@keyframes pulse-border {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(28, 176, 246, 0);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(28, 176, 246, 0.15);
    }
}

.module-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
    position: relative;
}

.module-icon-wrap.completed {
    background: rgba(88, 204, 2, 0.2);
}

.module-icon-wrap.active {
    background: rgba(28, 176, 246, 0.2);
}

.module-icon-wrap.locked {
    background: var(--bg-2);
}

.module-check {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: var(--green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.module-info {
    flex: 1;
}

.module-func {
    font-size: 1.1rem;
    font-weight: 800;
    font-family: 'Courier New', monospace;
    margin-bottom: 2px;
}

.module-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.module-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.module-xp {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gold);
}

.module-lock {
    font-size: 1.2rem;
    opacity: 0.6;
}

/* Stars de conquista */
.module-stars {
    display: flex;
    gap: 2px;
}

.star {
    font-size: 0.9rem;
    opacity: 0.3;
}

.star.earned {
    opacity: 1;
}

/* Connector dot */
.connector-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--border);
    border: 3px solid var(--bg);
    position: relative;
    z-index: 1;
    margin: 2px 0;
}

.connector-dot.done {
    background: var(--green);
}

@media (max-width: 600px) {
    .module-node {
        padding: 14px 16px;
        gap: 12px;
    }

    .module-icon-wrap {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }

    .league-banner {
        flex-wrap: wrap;
    }
}