/* Soseeks Academy-style shell for Gen AI Bootcamp pages (matches learn-fastapi / learn-python topbar & gate).
   Does not reset global buttons — safe to use with Bootstrap. */

:root {
    --bg: #030014;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border: rgba(99, 102, 241, 0.12);
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --primary: #6366f1;
    --primary-light: #818cf8;
    --accent: #c471ed;
    --error: #ef4444;
    --success: #10b981;
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-code: 'Fira Code', monospace;
    --radius: 16px;
    --topbar-h: 60px;
}

.bc-body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
}

/* ---------- Top bar (same pattern as learn-fastapi.html) ---------- */
#topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
    background: rgba(3, 0, 20, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    gap: 12px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

a.topbar-logo {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 800;
    background: linear-gradient(135deg, #4a6cf7, #c471ed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

a.topbar-logo:hover {
    filter: brightness(1.08);
}

.topbar-sep {
    color: var(--text-dim);
    font-weight: 200;
}

.topbar-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.topbar-center {
    flex: 1;
    min-width: 0;
    text-align: center;
}

.topbar-step-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

a.topbar-link {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

a.topbar-link:hover {
    color: var(--text);
    background: rgba(99, 102, 241, 0.1);
}

.bc-btn-signout {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.bc-btn-signout:hover {
    border-color: rgba(99, 102, 241, 0.35);
    color: var(--text);
}

.bc-main {
    padding-top: calc(var(--topbar-h) + 24px);
    padding-bottom: 4rem;
    min-height: 100vh;
}

/* ---------- Access gate (learn-python gate look) ---------- */
#gate {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 32px 16px;
}

.gate-particles {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 30%, rgba(196, 113, 237, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(6, 182, 212, 0.05) 0%, transparent 50%);
    animation: bcGateFloat 8s ease-in-out infinite alternate;
}

@keyframes bcGateFloat {
    0% {
        transform: scale(1) translate(0, 0);
    }
    100% {
        transform: scale(1.05) translate(-10px, 10px);
    }
}

.gate-card {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 48px 40px;
    width: 420px;
    max-width: 92vw;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(20px);
}

.gate-glow {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
}

a.gate-logo {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #4a6cf7, #7b5ea7, #c471ed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    display: inline-block;
    text-decoration: none;
}

a.gate-logo:hover {
    filter: brightness(1.08);
}

.gate-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.gate-title span {
    color: var(--primary-light);
}

.gate-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 28px;
}

.gate-input-group {
    display: flex;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.gate-input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
}

.gate-input-group input {
    flex: 1;
    padding: 14px 18px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text);
    font-size: 0.95rem;
    letter-spacing: 1px;
}

.gate-input-group input::placeholder {
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

#unlockBtn {
    padding: 14px 18px;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

#unlockBtn:hover {
    background: #4f46e5;
}

#codeError {
    color: var(--error);
    font-size: 0.85rem;
    text-align: center;
}

#codeError:not(:empty) {
    margin-top: 12px;
    min-height: 1.25rem;
}

#codeError:empty {
    display: none;
}

.gate-card.shake {
    animation: bcShakeCard 0.5s;
}

@keyframes bcShakeCard {
    0%,
    100% {
        transform: translateX(0);
    }
    20% {
        transform: translateX(-12px);
    }
    40% {
        transform: translateX(12px);
    }
    60% {
        transform: translateX(-8px);
    }
    80% {
        transform: translateX(8px);
    }
}

.gate-hint {
    color: var(--text-dim);
    font-size: 0.75rem;
    margin-top: 20px;
}

.gate-back {
    margin-top: 24px;
    font-size: 0.8rem;
}

.gate-back a {
    color: var(--text-dim);
    text-decoration: none;
}

.gate-back a:hover {
    color: var(--primary-light);
}

/* Code blocks inside bootcamp cards */
pre.bc-code {
    font-family: var(--font-code);
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.78rem;
    line-height: 1.5;
}

.bc-flow {
    display: grid;
    gap: 0.5rem;
    text-align: center;
    font-size: 0.9rem;
}

.bc-flow strong {
    color: var(--text);
}

@media (max-width: 768px) {
    .topbar-label {
        display: none;
    }
    #topbar {
        flex-wrap: wrap;
        height: auto;
        min-height: var(--topbar-h);
        padding-top: 10px;
        padding-bottom: 10px;
    }
    .topbar-center {
        order: 3;
        flex: 100%;
        text-align: center;
        padding-top: 4px;
    }
}
