/* Space Theme & Global Reset */
:root {
    --bg-dark: #0b0717;
    --card-bg: rgba(18, 12, 34, 0.45);
    --border-color: rgba(147, 51, 234, 0.25);
    --border-glow: rgba(147, 51, 234, 0.4);
    
    --text-primary: #f3f0fc;
    --text-secondary: #a78bfa;
    --text-muted: #6b539c;
    
    --primary: #9333ea;
    --primary-glow: rgba(147, 51, 234, 0.5);
    --cyan: #06b6d4;
    --cyan-glow: rgba(6, 182, 212, 0.5);
    --neon-green: #10b981;
}

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

body.bootcamp-body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Ambient Background Lights */
.glow-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    z-index: 1;
    pointer-events: none;
    opacity: 0.65;
}

.sphere-1 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, var(--primary) 0%, rgba(0,0,0,0) 70%);
    top: -10%;
    left: -10%;
}

.sphere-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--cyan) 0%, rgba(0,0,0,0) 70%);
    bottom: -10%;
    right: -10%;
}

/* Glassmorphic Cards & Overlays */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 8px 32px 0 rgba(147, 51, 234, 0.15);
}

/* Gate Overlay & Login */
.gate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(11, 7, 23, 0.85);
    backdrop-filter: blur(8px);
}

.gate-overlay.active {
    display: flex;
}

.gate-card {
    width: 100%;
    max-width: 440px;
    padding: 40px 32px;
    text-align: center;
    position: relative;
    z-index: 102;
}

.gate-header {
    margin-bottom: 24px;
}

.logo-text {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 2rem;
    letter-spacing: 0.2em;
    background: linear-gradient(135deg, #fff 30%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--cyan);
    margin-top: 6px;
}

.gate-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(147, 51, 234, 0.15);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.gate-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}

.input-group input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 16px;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}

.input-group input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.15);
}

.neon-btn {
    margin-top: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    border: none;
    border-radius: 8px;
    padding: 14px;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    cursor: pointer;
    box-shadow: 0 0 15px var(--primary-glow);
    transition: all 0.2s ease;
}

.neon-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 25px var(--primary-glow);
}

.error-msg {
    color: #f87171;
    font-size: 0.8rem;
    margin-top: 10px;
    text-align: center;
}

.gate-footer {
    margin-top: 30px;
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.text-link {
    background: none;
    border: none;
    color: var(--cyan);
    cursor: pointer;
    font-size: 0.75rem;
    font-family: 'Outfit', sans-serif;
    text-decoration: underline;
}

/* Portal App Container */
.portal-container {
    display: none;
    width: 100%;
    max-width: 1300px;
    height: 90vh;
    padding: 20px;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    z-index: 10;
}

.portal-container.active {
    display: grid;
}

/* Sidebar Styling */
.sidebar {
    padding: 24px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header .badge {
    font-size: 0.6rem;
    background: var(--cyan);
    color: var(--bg-dark);
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.2);
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.user-dot {
    width: 8px;
    height: 8px;
    background: var(--neon-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--neon-green);
}

.user-email {
    font-size: 0.75rem;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-btn {
    background: none;
    border: none;
    color: #f87171;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
}

.curriculum-nav h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.module-group {
    margin-bottom: 20px;
}

.module-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.lessons-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 10px;
}

.lesson-item {
    font-size: 0.8rem;
    color: var(--text-primary);
    opacity: 0.7;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.lesson-item:hover {
    opacity: 1;
    background: rgba(255,255,255,0.05);
}

.lesson-item.active {
    opacity: 1;
    color: var(--cyan);
    font-weight: 600;
    background: rgba(6, 182, 212, 0.1);
}

/* Content Panel Styling */
.content-panel {
    padding: 40px;
    overflow-y: auto;
}

.content-view {
    display: none;
}

.content-view.active {
    display: block;
}

/* Welcome Dashboard */
.hero-block {
    margin-bottom: 40px;
}

.hero-block h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 12px;
}

.lead {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 300;
}

.setup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.card {
    padding: 24px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.card-neon:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.15);
}

.card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.getting-started h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.getting-started p {
    color: var(--text-primary);
    opacity: 0.8;
    line-height: 1.6;
}

/* Lesson Viewer Markdown Styling */
.back-link {
    background: none;
    border: none;
    color: var(--cyan);
    font-size: 0.85rem;
    cursor: pointer;
    margin-bottom: 24px;
}

#lesson-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    margin-bottom: 24px;
    color: #fff;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.markdown-body {
    line-height: 1.7;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.9);
}

.markdown-body h2 {
    font-family: 'Orbitron', sans-serif;
    margin-top: 32px;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.markdown-body h3 {
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--cyan);
}

.markdown-body p {
    margin-bottom: 16px;
}

.markdown-body pre {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.markdown-body code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
