:root {
    --primary-navy: #0f172a;
    --accent-teal: #0fb8b3;
    --accent-glow: rgba(15, 184, 179, 0.15);
    --bg-light: #f8fafc;
    --text-slate: #64748b;
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --premium-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    --transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: #040d1a;
    color: #e2e8f0;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle 600px at 20% 30%, rgba(15, 184, 179, 0.06) 0%, transparent 70%),
        radial-gradient(circle 500px at 80% 70%, rgba(255, 159, 67, 0.04) 0%, transparent 70%);
    animation: bgBreath 10s ease-in-out infinite alternate;
}

@keyframes bgBreath {
    0% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}

/* ===== AESTHETIC AURORA BACKGROUND ===== */
.bg-aurora-wrapper {
    position: fixed;
    inset: 0;
    z-index: -2;
    background: #030d18;
    overflow: hidden;
}

.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    mix-blend-mode: screen;
    opacity: 0;
    animation: blobFloat 18s ease-in-out infinite;
}

/* Blob 1 – large teal, top-left */
.blob-1 {
    width: 700px;
    height: 700px;
    top: -200px;
    left: -150px;
    background: radial-gradient(circle, rgba(15, 184, 179, 0.75) 0%, rgba(15, 184, 179, 0.0) 70%);
    animation-duration: 20s;
    animation-delay: 0s;
}

/* Blob 2 – medium teal-green, bottom-right */
.blob-2 {
    width: 600px;
    height: 600px;
    bottom: -180px;
    right: -100px;
    background: radial-gradient(circle, rgba(6, 214, 160, 0.6) 0%, rgba(6, 214, 160, 0.0) 70%);
    animation-duration: 16s;
    animation-delay: -5s;
}

/* Blob 3 – soft blue-indigo, right-center */
.blob-3 {
    width: 500px;
    height: 500px;
    top: 30%;
    right: 5%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.5) 0%, rgba(99, 102, 241, 0.0) 70%);
    animation-duration: 22s;
    animation-delay: -8s;
}

/* Blob 4 – warm amber/orange, bottom-left */
.blob-4 {
    width: 450px;
    height: 450px;
    bottom: 10%;
    left: 8%;
    background: radial-gradient(circle, rgba(255, 159, 67, 0.42) 0%, rgba(255, 159, 67, 0.0) 70%);
    animation-duration: 14s;
    animation-delay: -3s;
}

/* Blob 5 – deep teal, center */
.blob-5 {
    width: 550px;
    height: 550px;
    top: 35%;
    left: 30%;
    background: radial-gradient(circle, rgba(15, 184, 179, 0.30) 0%, rgba(15, 184, 179, 0.0) 70%);
    animation-duration: 25s;
    animation-delay: -12s;
}

@keyframes blobFloat {
    0% {
        transform: translate(0px, 0px) scale(1);
        opacity: 0.5;
    }

    20% {
        transform: translate(30px, -40px) scale(1.08);
        opacity: 0.8;
    }

    40% {
        transform: translate(-20px, 30px) scale(0.95);
        opacity: 0.6;
    }

    60% {
        transform: translate(40px, 20px) scale(1.1);
        opacity: 0.85;
    }

    80% {
        transform: translate(-30px, -20px) scale(1.03);
        opacity: 0.65;
    }

    100% {
        transform: translate(0px, 0px) scale(1);
        opacity: 0.5;
    }
}

/* Cinematic grain texture */
.aurora-grain {
    position: absolute;
    inset: 0;
    opacity: 0.045;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    pointer-events: none;
}

/* Dark overlay so text stays readable */
.aurora-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(3, 13, 24, 0.65) 0%,
            rgba(3, 13, 24, 0.45) 40%,
            rgba(3, 13, 24, 0.55) 75%,
            rgba(3, 13, 24, 0.80) 100%);
    pointer-events: none;
}

/* Header */
.header-top {
    position: absolute;
    top: 1.5rem;
    left: 2rem;
    z-index: 20;
}

.logo-link img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(15, 184, 179, 0.3));
    transition: transform 0.3s ease;
}

.logo-link:hover img {
    transform: scale(1.05);
}

header {
    padding: 1.25rem 1rem 0.5rem;
    text-align: center;
    background: transparent;
    position: relative;
    z-index: 10;
}

.page-title {
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
    text-shadow: 0 0 40px rgba(15, 184, 179, 0.4);
}

.page-subtitle {
    font-size: 1.1rem;
    color: rgba(148, 163, 184, 0.9);
    font-weight: 500;
    max-width: 600px;
    margin: 0 auto;
}

/* Level Controls */
.level-controls-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(4, 13, 26, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0.5rem 2rem;
    border-bottom: 1px solid rgba(15, 184, 179, 0.12);
}

.level-controls-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 0.5rem;
}

.level-controls {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    padding: 0;
    flex: 1;
    margin: 0 0.5rem;
    width: 100%;
}

.btn-book-sticky {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #0fb8b3, #0d9e9a);
    color: #ffffff;
    padding: 0.7rem 1.6rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px rgba(15, 184, 179, 0.35),
        0 4px 15px rgba(15, 184, 179, 0.2);
    letter-spacing: 0.3px;
}

.btn-book-sticky:hover {
    background: linear-gradient(135deg, #13d4ce, #0fb8b3);
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 0 30px rgba(15, 184, 179, 0.5),
        0 8px 25px rgba(15, 184, 179, 0.3);
}

.btn-back-sticky {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(148, 163, 184, 0.9);
    padding: 0.7rem 1.4rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-back-sticky:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(15, 184, 179, 0.4);
    color: #ffffff;
    transform: translateX(-3px);
}

.level-tab {
    position: relative;
    padding: 0.7rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: rgba(148, 163, 184, 0.9);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.level-tab:hover {
    background: rgba(15, 184, 179, 0.1);
    border-color: var(--accent-teal);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(15, 184, 179, 0.2);
}

.level-tab.active {
    background: rgba(15, 184, 179, 0.15);
    border-color: var(--accent-teal);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(15, 184, 179, 0.3), inset 0 0 12px rgba(15, 184, 179, 0.08);
}

.tab-dot {
    width: 8px;
    height: 8px;
    background: #cbd5e1;
    border-radius: 50%;
    transition: var(--transition);
}

.level-tab.active .tab-dot {
    background: var(--accent-teal);
    box-shadow: 0 0 10px var(--accent-teal);
    transform: scale(1.2);
}

/* Roadmap Area */
.roadmap-viewport {
    width: 100%;
    min-height: 600px;
    height: 100vh;
    overflow: visible;
    position: relative;
    background: transparent;
    margin-top: -40px;
}

.roadmap-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 60px;
}

/* SVG Line Art */
.connectors-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.connector-line {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 2;
    stroke-dasharray: 6 4;
    transition: stroke 0.4s ease, stroke-width 0.4s ease;
    opacity: 0.6;
}

.connector-line.active {
    stroke: var(--accent-teal);
    stroke-width: 3;
    stroke-dasharray: none;
    opacity: 1;
}

/* Center Hub */
.center-hub {
    width: 240px;
    height: 240px;
    position: relative;
    z-index: 20;
    transition: var(--transition);
}

.hub-pulse-rings {
    position: absolute;
    inset: -20px;
    pointer-events: none;
}

.pulse-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid var(--accent-teal);
    animation: hubPulse 4s infinite linear;
    opacity: 0;
}

.ring-2 {
    animation-delay: 2s;
}

@keyframes hubPulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

.hub-content {
    width: 100%;
    height: 100%;
    background: rgba(4, 13, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    border: 2px solid var(--accent-teal);
    box-shadow: 0 0 60px rgba(15, 184, 179, 0.25), inset 0 0 30px rgba(15, 184, 179, 0.06);
}

.hub-level-name {
    font-size: 1.8rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 5px;
}

.hub-level-number {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--accent-teal);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 8px;
}

.hub-subtitle {
    font-size: 0.75rem;
    color: rgba(148, 163, 184, 0.85);
    line-height: 1.4;
    max-width: 150px;
}

/* Module Nodes */
.module-card {
    position: absolute;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 16px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 320px;
    box-sizing: border-box;
    height: auto;
    min-height: 70px;
    overflow: visible;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 10;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(20px);
    animation: nodePop 0.6s forwards;
}

@keyframes nodePop {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.module-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--accent-teal);
    box-shadow: 0 25px 50px rgba(15, 184, 179, 0.12);
}

.module-card.selected {
    border-color: var(--accent-teal);
    background: rgba(4, 13, 26, 0.95);
    box-shadow: 0 0 0 3px rgba(15, 184, 179, 0.25), 0 20px 40px rgba(15, 184, 179, 0.2);
}

/* Keep ALL text fully readable on selected card */
.module-card.selected .module-title {
    color: #ffffff;
}

.module-card.selected .module-label {
    color: #0fb8b3;
}

.module-card.selected .module-icon-badge {
    background: var(--accent-teal);
    color: #ffffff;
}

.module-icon-badge {
    width: 44px;
    height: 44px;
    background: var(--primary-navy);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    font-size: 1.1rem;
    transition: var(--transition);
}

.module-card:hover .module-icon-badge {
    background: var(--accent-teal);
    transform: rotate(10deg);
}

.module-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    overflow: visible;
}

.module-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1.2px;
    color: var(--accent-teal);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: visible;
}

.module-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #f8fafc;
    white-space: normal;
    overflow: visible;
    line-height: 1.4;
    word-break: normal;
    overflow-wrap: break-word;
    display: block;
}

.module-card.long-title .module-title {
    font-size: 0.78rem;
    line-height: 1.3;
}

/* Left Aligned Logic */
.module-card.left-aligned {
    flex-direction: row-reverse;
    text-align: right;
}

.module-card.left-aligned .module-content {
    align-items: flex-end;
}

/* Detail Panel */
.detail-panel {
    position: fixed;
    top: 50%;
    right: 2.5rem;
    transform: translateY(-50%) translateX(120%);
    width: 440px;
    max-height: 85vh;
    background: rgba(10, 20, 40, 0.9);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(15, 184, 179, 0.2);
    border-radius: 32px;
    box-shadow: -20px 40px 100px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(15, 184, 179, 0.1), inset 0 0 40px rgba(15, 184, 179, 0.03);
    z-index: 1000;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.detail-panel.active {
    transform: translateY(-50%) translateX(0);
}

.detail-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-size: 1.2rem;
    color: rgba(148, 163, 184, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.detail-close:hover {
    background: var(--primary-navy);
    color: #fff;
    transform: rotate(90deg);
}

.detail-scroll {
    padding: 4rem 3rem;
    overflow-y: auto;
}

.detail-header {
    margin-bottom: 3rem;
}

.detail-icon-box {
    width: 64px;
    height: 64px;
    background: var(--accent-teal);
    color: #ffffff;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 20px var(--accent-glow);
}

.detail-topic {
    font-size: 2rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.25;
    letter-spacing: -0.5px;
}

.detail-section {
    margin-bottom: 2.5rem;
    animation: fadeIn 0.5s ease backwards;
}

.detail-section:nth-child(1) {
    animation-delay: 0.1s;
}

.detail-section:nth-child(2) {
    animation-delay: 0.2s;
}

.detail-section:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detail-section label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-teal);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.85rem;
}

.detail-section p {
    font-size: 1.05rem;
    color: rgba(203, 213, 225, 0.9);
    line-height: 1.8;
}

/* Bottom Area */
.bottom-area {
    text-align: center;
    padding: 2rem 1rem 4rem;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.btn-book {
    background: var(--primary-navy);
    color: #ffffff;
    padding: 1.4rem 4rem;
    border-radius: 100px;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 15px 30px rgba(15, 23, 42, 0.15);
}

.btn-book:hover {
    background: var(--accent-teal);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(15, 184, 179, 0.25);
}

.back-link a {
    color: rgba(148, 163, 184, 0.8);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.back-link a:hover {
    color: var(--accent-teal);
}

/* Animations */
@keyframes drawIn {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Mobile Responsive */
@media (max-width: 1200px) {
    .detail-panel {
        width: 360px;
    }
}

@media (max-width: 991px) {
    .roadmap-viewport {
        height: auto;
        min-height: 1200px;
    }

    .roadmap-container {
        flex-direction: column;
        padding: 10rem 1rem;
        gap: 200px;
    }

    .center-hub {
        order: -1;
    }

    .module-card {
        position: relative !important;
        left: 0 !important;
        top: 0 !important;
        margin: 20px auto;
        width: 90%;
        max-width: 400px;
    }

    .connectors-svg {
        display: none;
    }

    .detail-panel {
        width: 100%;
        height: 60vh;
        right: 0;
        bottom: 0;
        top: auto;
        transform: translateY(100%);
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    .detail-panel.active {
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .level-controls-inner {
        flex-direction: column;
        gap: 1.5rem;
    }

    .level-controls {
        flex-wrap: wrap;
        margin: 0;
    }

    .level-tab {
        flex: 1 1 45%;
    }
}