/* ============================================
   LESSONS HEADER
   ============================================ */

.lessons-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 40px 20px;
}

.lessons-header h2 {
    font-size: 42px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.lessons-header p {
    font-size: 16px;
    color: #a0a0a0;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ============================================
   LESSONS PATHWAY
   ============================================ */

.lessons-container {
    position: relative;
    max-width: 700px;
    margin: 60px auto 0;
}

.center-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 102, 204, 0.3) 0%, rgba(0, 102, 204, 0.1) 100%);
    top: 0;
    z-index: 1;
}

.lessons-path {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 80px;
    padding: 40px 0;
    z-index: 2;
}

.lesson-item {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    animation: slideInUp 0.6s ease-out;
}

.lesson-item.left-offset {
    flex-direction: row-reverse;
    padding-right: 52%;
}

.lesson-item.right-offset {
    padding-left: 52%;
}

/* ============================================
   LESSON NODE
   ============================================ */

.lesson-node {
    position: relative;
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.lesson-node.active {
    animation: nodePulse 2.5s ease-in-out infinite;
}

.node-orbital {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid #00ccff;
    border-radius: 50%;
    animation: orbitRotate 4s linear infinite;
    opacity: 0.85;
    box-shadow: 0 0 12px rgba(0, 204, 255, 0.4);
}

.play-btn {
    width: 70px;
    height: 70px;
    background: #0066cc;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    transition: all 0.3s ease;
}

.play-btn:hover {
    background: #0080ff;
    transform: scale(1.1);
}

.play-btn:active {
    transform: scale(0.95);
}

.lesson-info {
    flex: 1;
    padding-top: 8px;
}

.lesson-item.left-offset .lesson-info {
    text-align: right;
}

.lesson-info h3 {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.lesson-info p {
    font-size: 14px;
    color: #a0a0a0;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.lesson-status {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(0, 204, 255, 0.15);
    color: #00ccff;
    text-transform: uppercase;
}

.lesson-status.locked {
    background: rgba(100, 100, 100, 0.2);
    color: #999999;
}

/* ============================================
   LESSON CONTENT PAGE
   ============================================ */

.lesson-page {
    display: none !important;
    justify-content: flex-start !important;
    padding: 0 !important;
    background: #0a0e27 !important;
    min-height: 100vh !important;
}

.lesson-page.active {
    display: flex !important;
}

.lesson-content-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 40px;
    animation: slideInUp 0.5s ease-out;
}

.back-btn {
    background: none;
    border: none;
    color: #00ccff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    padding: 0;
    transition: all 0.3s ease;
    text-transform: none;
    margin-top: 0;
}

.back-btn:hover {
    color: #ffffff;
    transform: translateX(-4px);
}

.lesson-content-container h2 {
    font-size: 40px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 40px;
    margin-top: 0;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* ============================================
   LESSON BODY SECTIONS
   ============================================ */

.lesson-body {
    margin-bottom: 40px;
}

.lesson-section {
    margin-bottom: 40px;
}

.lesson-section h3 {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
    margin-top: 0;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.lesson-section p {
    font-size: 15px;
    color: #c0c0c0;
    line-height: 1.8;
    margin: 0 0 16px 0;
    margin-left: 100px;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.lesson-section strong {
    color: #00ccff;
    font-weight: 700;
}

/* ============================================
   FORMULA CARDS
   ============================================ */

.formula-card {
    background: rgba(0, 102, 204, 0.1);
    border-left: 3px solid #0066cc;
    padding: 16px 20px;
    border-radius: 6px;
    margin: 12px 0;
    display: inline-block;
    min-width: 280px;
}

.formula-card code {
    display: block;
    color: #00ccff;
    font-family: monospace;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.formula-card p {
    font-size: 12px;
    color: #a0a0a0;
    margin: 0;
}

/* ============================================
   MINI SIMULATIONS
   ============================================ */

.mini-sim {
    background: #1a2a4a;
    border: 1px solid rgba(0, 102, 204, 0.2);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.mini-sim canvas {
    width: 100%;
    height: auto;
    background: #2b5b9b;
    border-radius: 6px;
    margin-bottom: 16px;
    display: block;
}

.sim-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.control-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #c0c0c0;
}

.control-row label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-weight: 500;
}

.control-row input[type="range"] {
    flex: 0.5;
    height: 4px;
    background: #3a5a8a;
    border-radius: 2px;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.control-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #0066cc;
    cursor: pointer;
}

.control-row input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #0066cc;
    cursor: pointer;
    border: none;
}

.control-row span {
    min-width: 40px;
    text-align: right;
    color: #00ccff;
    font-weight: 600;
}

.control-row button {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0;
}

.control-row button:hover {
    background: #0080ff;
}

.sim-stats {
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 6px;
    display: flex;
    gap: 20px;
    font-size: 12px;
    color: #d0d0d0;
}

.sim-stats div {
    flex: 1;
}

.sim-stats strong {
    color: #00ccff;
    font-weight: 700;
}

/* ============================================
   LESSON FOOTER
   ============================================ */

.lesson-footer {
    display: flex;
    gap: 20px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(0, 204, 255, 0.1);
    justify-content: center;
    flex-wrap: wrap;
}

.lesson-footer .btn {
    min-width: 180px;
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

@keyframes nodePulse {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(0, 204, 255, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(0, 204, 255, 0.8));
    }
}

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

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .lesson-item.left-offset,
    .lesson-item.right-offset {
        padding-left: 0;
        padding-right: 0;
        flex-direction: row;
    }
}

@media (max-width: 768px) {
    .lessons-header h2 {
        font-size: 32px;
    }

    .lesson-content-container h2 {
        font-size: 28px;
    }

    .lessons-container {
        max-width: 100%;
        padding: 0 20px;
    }

    .lesson-item {
        gap: 20px;
    }

    .lesson-node {
        width: 75px;
        height: 75px;
    }

    .play-btn {
        width: 60px;
        height: 60px;
        font-size: 20px;
    }

    .lesson-content-container {
        padding: 40px 20px;
    }

    .lesson-footer {
        flex-direction: column;
    }

    .lesson-footer .btn {
        width: 100%;
    }

    .formula-card {
        min-width: 100%;
    }

    .sim-stats {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .lessons-header h2 {
        font-size: 24px;
    }

    .lessons-header p {
        font-size: 14px;
    }

    .lesson-section h3 {
        font-size: 18px;
    }

    .control-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .control-row label {
        width: 100%;
    }

    .control-row input[type="range"] {
        width: 100%;
    }

    .control-row button {
        width: 100%;
    }
}


#lessons-home {
    display: none !important;
}

#lessons-home.active {
    display: flex !important;
}