/* ================================================================
   CONSTELLATION PAGE – assets/css/views/constellation.css
   ================================================================ */

/* ── PAGE CONTAINER ── */
.constellation-page {
    position: fixed;
    top: 45px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0f172a;
    overflow: hidden;
    display: flex;
    z-index: 1;
}

/* ── LAYOUT (aside + main side by side) ── */
.constellation-layout {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

/* ── ASIDE ── */
.constellation-aside {
    width: 240px;
    flex-shrink: 0;
    background: rgba(15, 23, 42, 0.92);
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    flex-direction: column;
    padding: 1.75rem 1rem;
    gap: 1.5rem;
    z-index: 10;
    overflow-y: auto;
    backdrop-filter: blur(16px);
}

.cs-aside-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.cs-logo {
    width: 56px;
    height: 56px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.18) 0%, transparent 70%);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fbbf24;
    margin-bottom: 0.25rem;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.12);
}

.cs-title {
    font-size: 1.1rem;
    font-weight: 900;
    color: #f1f5f9;
    letter-spacing: -0.02em;
    margin: 0;
}

.cs-subtitle {
    font-size: 0.78rem;
    color: rgba(148, 163, 184, 0.6);
    margin: 0;
}

/* ── NAV ── */
.cs-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cs-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: rgba(148, 163, 184, 0.7);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.cs-nav-item i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.cs-nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #f1f5f9;
}

.cs-nav-item.active {
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.2);
}

/* ── ASIDE STATS ── */
.cs-aside-stats {
    margin-top: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.cs-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.cs-stat-val {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fbbf24;
}

.cs-stat-lbl {
    font-size: 0.65rem;
    color: rgba(148, 163, 184, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── MAIN CONTENT ── */
.constellation-main {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 2.5rem;
    position: relative;
    z-index: 5;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.constellation-main::-webkit-scrollbar {
    width: 6px;
}

.constellation-main::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* cs-section: full width, no max-width cap */
.cs-section {
    width: 100%;
}

.cs-section-header {
    margin-bottom: 1.75rem;
}

.cs-section-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.3rem;
}

.cs-section-title i {
    color: #fbbf24;
}

.cs-section-desc {
    color: rgba(148, 163, 184, 0.65);
    font-size: 0.9rem;
}

/* ── OVERVIEW HERO ── */
.cs-overview-hero {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.75rem;
    margin-bottom: 1.75rem;
    backdrop-filter: blur(12px);
}

/* ── LEVEL PLANET ── */
.level-planet {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #f59e0b, #92400e);
    box-shadow: 0 0 28px rgba(251, 191, 36, 0.4), inset 0 0 16px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    animation: floatPlanet 6s ease-in-out infinite;
}

@keyframes floatPlanet {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.level-number {
    font-size: 1.8rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.4);
}

.level-label {
    font-size: 0.55rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ── XP BLOCK ── */
.cs-xp-block {
    flex: 1;
}

.xp-bar-container {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.xp-bar {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    border-radius: 8px;
    transition: width 1s ease;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

.cs-xp-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: rgba(148, 163, 184, 0.6);
    margin-top: 0.4rem;
}

/* ── LEADERBOARD BTN ── */
.cs-leaderboard-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: 10px;
    color: #fbbf24;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.cs-leaderboard-btn:hover {
    background: rgba(251, 191, 36, 0.22);
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.2);
}

/* ── OVERVIEW CARDS ── */
.cs-overview-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.cs-overview-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.cs-overview-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
}

.cs-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.cs-card-icon.production-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.cs-card-icon.game-icon {
    background: rgba(167, 139, 250, 0.15);
    color: #a78bfa;
}

.cs-card-icon.odyssey-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.cs-card-info {
    flex: 1;
}

.cs-card-title {
    display: block;
    font-size: 0.85rem;
    color: rgba(148, 163, 184, 0.8);
    font-weight: 600;
    margin-bottom: 3px;
}

.cs-card-count {
    display: block;
    font-size: 0.75rem;
    color: rgba(148, 163, 184, 0.5);
}

.cs-card-count-big {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fbbf24;
    line-height: 1;
}

/* ── OVERVIEW 2-COL LAYOUT ── */
.cs-overview-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.cs-overview-left {
    flex: 1;
    min-width: 0;
}

/* ── LEVEL NAME ── */
.cs-level-name {
    font-size: 1rem;
    font-weight: 800;
    color: #fbbf24;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

/* ── LEADERBOARD PANEL (inline) ── */
.cs-leaderboard-panel {
    width: 280px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: calc(100vh - 160px);
    overflow: hidden;
}

.cs-lb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.cs-lb-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #fbbf24;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cs-lb-tabs {
    display: flex;
    gap: 4px;
}

.cs-lb-tab {
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: rgba(148, 163, 184, 0.6);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cs-lb-tab.active {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.cs-lb-loading,
.cs-lb-empty {
    text-align: center;
    padding: 1.5rem;
    color: rgba(148, 163, 184, 0.5);
    font-size: 0.8rem;
}

.cs-lb-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    max-height: calc(100vh - 260px);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

.cs-lb-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 6px 8px;
    border-radius: 8px;
    transition: background 0.15s;
}

.cs-lb-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.cs-lb-row.cs-lb-me {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.cs-lb-rank {
    width: 22px;
    flex-shrink: 0;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(148, 163, 184, 0.6);
}

.cs-lb-name {
    flex: 1;
    font-size: 0.82rem;
    color: #f1f5f9;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cs-lb-xp {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fbbf24;
    flex-shrink: 0;
}

/* ── MINI GRID ── */
.cs-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.875rem;
}

.cs-mini-constellation {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    transition: all 0.2s;
}

.cs-mini-constellation:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.12);
}

.cs-mini-header {
    display: flex;
    align-items: center;
    gap: 7px;
    color: rgba(148, 163, 184, 0.85);
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cs-mini-header i {
    color: #fbbf24;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.cs-mini-progress {
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.35rem;
}

.cs-mini-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #fbbf24);
    border-radius: 4px;
    transition: width 1s ease;
}

.cs-mini-count {
    font-size: 0.7rem;
    color: rgba(148, 163, 184, 0.5);
}

/* ── EMPTY STATE ── */
.cs-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    color: rgba(148, 163, 184, 0.5);
}

/* ── FADE IN ── */
.fade-in {
    animation: csFadeIn 0.35s ease;
}

@keyframes csFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── CONSTELLATION CARDS (production/game sections) ── */
.tiered-trophy-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.constellation-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.constellation-card:hover {
    border-color: rgba(255, 255, 255, 0.14);
}

.path-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 10;
}



.path-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fbbf24;
    flex-shrink: 0;
}

.path-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0;
}

.path-meta {
    font-size: 0.75rem;
    color: rgba(148, 163, 184, 0.6);
}

/* ── REALM (star chart area) ── */
.path-realm-container {
    position: relative;
    height: 200px;
    margin: 0 auto;
    width: 100%;
    overflow: visible;
    /* Prevent clipping */
}

.stars-connection-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.realm-nodes {
    position: absolute;
    inset: 0;
}

/* ── STAR NODE ── */
.realm-node {
    transform: translate(-50%, -50%);
}

.node-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
}

.node-dot {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(30, 41, 59, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: rgba(148, 163, 184, 0.6);
    transition: all 0.2s;
    cursor: default;
    position: relative;
}

.realm-node.unlocked .node-dot {
    background: rgba(251, 191, 36, 0.15);
    border-color: #fbbf24;
    color: #fbbf24;
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.35);
}

.realm-node.current .node-dot,
.realm-node.next .node-dot {
    border-color: rgba(96, 165, 250, 0.7);
    color: #60a5fa;
    animation: pulseStar 2s ease-in-out infinite;
}

@keyframes pulseStar {

    0%,
    100% {
        box-shadow: 0 0 8px rgba(96, 165, 250, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(96, 165, 250, 0.6);
    }
}

.node-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: rgba(148, 163, 184, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    max-width: 120px;
    line-height: 1.2;
    white-space: normal;
    z-index: 10;
    position: relative;
}

.realm-node.unlocked .node-label {
    color: rgba(251, 191, 36, 0.85);
}

/* ── STAR HOVER TOOLTIP ── */
.node-wrapper:hover .node-dot {
    transform: scale(1.15);
}

.node-wrapper::after {
    content: attr(data-desc);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f1f5f9;
    font-size: 0.82rem;
    padding: 8px 14px;
    border-radius: 10px;
    white-space: normal;
    max-width: 300px;
    min-width: 160px;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 100;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    line-height: 1.5;
}

.node-wrapper:hover::after {
    opacity: 1;
}


/* ── FOOTER ── */
.path-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.5rem 1.25rem;
    margin-top: 0.5rem;
    gap: 1rem;
}

.path-footer.success {
    color: #fbbf24;
}

.next-challenge {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    font-size: 0.8rem;
    color: rgba(148, 163, 184, 0.7);
    overflow: hidden;
}

.next-challenge .label {
    color: rgba(148, 163, 184, 0.5);
    flex-shrink: 0;
}

.next-challenge .value {
    color: #f1f5f9;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xp-reward {
    font-size: 0.8rem;
    font-weight: 700;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    padding: 3px 10px;
    border-radius: 8px;
    flex-shrink: 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
    .tiered-trophy-container {
        grid-template-columns: 1fr;
    }

    .constellation-main {
        padding: 1.25rem;
    }
}

@media (max-width: 900px) {
    .constellation-aside {
        width: 200px;
    }

    .cs-overview-cards {
        grid-template-columns: 1fr;
    }

    .constellation-main {
        padding: 1.25rem;
    }
}

@media (max-width: 640px) {
    .constellation-aside {
        display: none;
    }

    .constellation-main {
        padding: 1rem;
    }
}

/* ── LEVEL NAME ROW (name + info btn) ── */
.cs-level-name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.cs-info-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(148, 163, 184, 0.7);
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    flex-shrink: 0;
}

.cs-info-btn:hover {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

/* ── LEVEL INFO MODAL ── */
.cs-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-modal {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 440px;
    max-width: calc(100vw - 2rem);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.cs-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    font-weight: 700;
    font-size: 0.95rem;
    color: #fbbf24;
}

.cs-modal-close {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: rgba(148, 163, 184, 0.7);
    font-size: 1rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.cs-modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.cs-modal-body {
    overflow-y: auto;
    padding: 1rem 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cs-modal-desc {
    font-size: 0.82rem;
    color: rgba(148, 163, 184, 0.6);
    line-height: 1.5;
}

.cs-level-table {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cs-level-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.cs-level-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.cs-level-row.cs-level-passed {
    opacity: 0.5;
}

.cs-level-row.cs-level-current {
    background: rgba(96, 165, 250, 0.08);
    border-color: rgba(96, 165, 250, 0.25);
}

.cs-lr-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
    font-weight: 800;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cs-level-current .cs-lr-badge {
    background: rgba(96, 165, 250, 0.2);
    border-color: rgba(96, 165, 250, 0.4);
    color: #60a5fa;
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.3);
}

.cs-level-passed .cs-lr-badge {
    opacity: 0.6;
    border: none;
    box-shadow: none;
}

/* ── MODAL BADGE THEMES ── */
.cs-lr-badge.lvl-1 {
    background: radial-gradient(circle at 35% 35%, #f8fafc, #94a3b8);
    color: #0f172a;
    border: none;
    box-shadow: 0 0 10px rgba(248, 250, 252, 0.3);
}

.cs-lr-badge.lvl-2 {
    background: radial-gradient(circle at 35% 35%, #f472b6, #7e22ce);
    color: #fff;
    border: none;
    box-shadow: 0 0 10px rgba(244, 114, 182, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.cs-lr-badge.lvl-3 {
    background: radial-gradient(circle at 35% 35%, #a8a29e, #44403c);
    color: #fff;
    border: none;
    box-shadow: 0 0 10px rgba(168, 162, 158, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.cs-lr-badge.lvl-4 {
    background: radial-gradient(circle at 25% 25%, #67e8f9, #0891b2);
    color: #fff;
    border: none;
    box-shadow: 0 0 10px rgba(103, 232, 249, 0.5);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.cs-lr-badge.lvl-5 {
    background: radial-gradient(circle at 35% 35%, #f97316, #9a3412);
    color: #fff;
    border: none;
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.cs-lr-badge.lvl-6 {
    background: radial-gradient(circle at 35% 35%, #fde047, #b45309);
    color: #fff;
    border: none;
    box-shadow: 0 0 10px rgba(253, 224, 71, 0.6);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.cs-lr-badge.lvl-7 {
    background: radial-gradient(circle at 35% 35%, #fb7185, #be123c, #4c0519);
    color: #fff;
    border: none;
    box-shadow: 0 0 10px rgba(251, 113, 133, 0.7);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.cs-lr-badge.lvl-8 {
    background: radial-gradient(circle at 50% 50%, #000000 30%, #1e1b4b 70%, #312e81);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(49, 46, 129, 0.8);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.cs-lr-badge.lvl-9 {
    background: radial-gradient(circle at 35% 35%, #3b82f6, #1d4ed8, #1e3a8a);
    color: #fff;
    border: none;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.cs-lr-badge.lvl-10 {
    background: conic-gradient(from 0deg at 50% 50%, #c026d3, #2563eb, #06b6d4, #c026d3);
    color: #fff;
    border: none;
    box-shadow: 0 0 10px rgba(192, 38, 211, 0.7);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Dim locked badges so themes are less bright but still visible */
.cs-level-row:not(.cs-level-current):not(.cs-level-passed) .cs-lr-badge {
    opacity: 0.25;
}

.cs-lr-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.cs-lr-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #f1f5f9;
}

.cs-lr-xp {
    font-size: 0.75rem;
    color: rgba(148, 163, 184, 0.5);
}

.cs-lr-status {
    font-size: 1rem;
    flex-shrink: 0;
}

/* ── 10 COSMIC LEVEL THEMES ── */

/* 1. Étoile Filante (Blanc/Gris clair) */
.level-planet.lvl-theme-1 {
    background: radial-gradient(circle at 35% 35%, #f8fafc, #94a3b8);
    box-shadow: 0 0 20px rgba(248, 250, 252, 0.3), inset 0 0 10px rgba(0, 0, 0, 0.2);
}

/* 2. Nébuleuse (Rose/Violet pastel) */
.level-planet.lvl-theme-2 {
    background: radial-gradient(circle at 35% 35%, #f472b6, #7e22ce);
    box-shadow: 0 0 25px rgba(244, 114, 182, 0.4), inset 0 0 12px rgba(0, 0, 0, 0.3);
}

/* 3. Astéroïde (Gris foncé/Marron) */
.level-planet.lvl-theme-3 {
    background: radial-gradient(circle at 35% 35%, #a8a29e, #44403c);
    box-shadow: 0 0 20px rgba(168, 162, 158, 0.2), inset 0 0 16px rgba(0, 0, 0, 0.4);
    /* Irregular shape illusion */
    border-radius: 46% 54% 50% 50% / 48% 52% 48% 52%;
}

/* 4. Comète (Bleu cyan glacé) */
.level-planet.lvl-theme-4 {
    background: radial-gradient(circle at 25% 25%, #67e8f9, #0891b2);
    box-shadow: 0 0 30px rgba(103, 232, 249, 0.5), inset 0 0 15px rgba(0, 0, 0, 0.3);
}

/* 5. Planète (Orange/Terre cuite - l'existant) */
.level-planet.lvl-theme-5 {
    background: radial-gradient(circle at 35% 35%, #f97316, #9a3412);
    box-shadow: 0 0 35px rgba(249, 115, 22, 0.4), inset 0 0 16px rgba(0, 0, 0, 0.3);
}

/* 6. Système Solaire (Jaune/Or flamboyant) */
.level-planet.lvl-theme-6 {
    background: radial-gradient(circle at 35% 35%, #fde047, #b45309);
    box-shadow: 0 0 45px rgba(253, 224, 71, 0.6), inset 0 0 20px rgba(0, 0, 0, 0.2);
}

/* 7. Supernova (Rouge/Orange explosif) */
.level-planet.lvl-theme-7 {
    background: radial-gradient(circle at 35% 35%, #fb7185, #be123c, #4c0519);
    box-shadow: 0 0 55px rgba(251, 113, 133, 0.7), inset 0 0 20px rgba(0, 0, 0, 0.4);
    animation: floatPlanet 4s ease-in-out infinite, pulseSupernova 3s ease-in-out infinite alternate;
}

@keyframes pulseSupernova {
    from {
        filter: brightness(1) drop-shadow(0 0 0 rgba(251, 113, 133, 0));
    }

    to {
        filter: brightness(1.2) drop-shadow(0 0 15px rgba(251, 113, 133, 0.5));
    }
}

/* 8. Trou Noir (Noir profond avec halo violet sombre) */
.level-planet.lvl-theme-8 {
    background: radial-gradient(circle at 50% 50%, #000000 30%, #1e1b4b 70%, #312e81);
    box-shadow: 0 0 40px rgba(49, 46, 129, 0.8), inset 0 0 30px rgba(0, 0, 0, 0.9);
    animation: floatPlanet 8s ease-in-out infinite;
}

/* 9. Constellation (Bleu profond étoilé) */
.level-planet.lvl-theme-9 {
    background: radial-gradient(circle at 35% 35%, #3b82f6, #1d4ed8, #1e3a8a);
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.6), inset 0 0 15px rgba(0, 0, 0, 0.5);
}

/* 10. Galaxie (Magique Multi-couleurs cosmos) */
.level-planet.lvl-theme-10 {
    background: conic-gradient(from 0deg at 50% 50%, #c026d3, #2563eb, #06b6d4, #c026d3);
    box-shadow: 0 0 60px rgba(192, 38, 211, 0.7), inset 0 0 20px rgba(0, 0, 0, 0.5);
    animation: rotateGalaxy 10s linear infinite, floatPlanet 6s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.level-planet.lvl-theme-10 .level-number,
.level-planet.lvl-theme-10 .level-label {
    /* Stop inner rotation so text stays upright */
    animation: counterRotateGalaxy 10s linear infinite;
    position: relative;
    z-index: 2;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.level-planet.lvl-theme-10::after {
    /* Inner dark circle to make text readable */
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.8), rgba(0, 0, 0, 0.4));
    z-index: 1;
}

@keyframes rotateGalaxy {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes counterRotateGalaxy {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(-360deg);
    }
}