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

:root {
    --bg: #0a0a0f;
    --surface: #111118;
    --surface-2: #1a1a24;
    --border: #2a2a3a;
    --text: #f0f0f5;
    --text-dim: #8888a0;
    --accent: #7c5cfc;
    --accent-glow: rgba(124, 92, 252, 0.3);
    --green: #22c55e;
    --red: #ef4444;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* PASSWORD GATE */
.password-gate {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 24px;
}

.password-gate .gate-logo {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.password-gate .gate-sub {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 32px;
}

.password-gate .gate-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.password-gate .gate-box h2 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.password-gate .gate-box p {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 24px;
}

.password-gate input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.password-gate input:focus {
    border-color: var(--accent);
}

.password-gate input.error {
    border-color: var(--red);
    animation: shake 0.3s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.password-gate .gate-btn {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.password-gate .gate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px var(--accent-glow);
}

.password-gate .gate-error {
    color: var(--red);
    font-size: 0.8rem;
    margin-top: 12px;
    display: none;
}

.password-gate .gate-error.show {
    display: block;
}

/* MAIN CONTENT (hidden until authenticated) */
.tutorial-content {
    display: none;
}

.tutorial-content.visible {
    display: block;
}

/* HEADER */
.tut-header {
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

.tut-header .logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
}

.tut-header .logo span {
    color: var(--accent);
}

.tut-header .header-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.tut-header .header-links a {
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* PAGE TITLE */
.page-title {
    text-align: center;
    padding: 60px 24px 40px;
    max-width: 700px;
    margin: 0 auto;
}

.page-title h1 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 800;
    margin-bottom: 12px;
}

.page-title p {
    color: var(--text-dim);
    font-size: 1rem;
}

/* TUTORIAL SECTIONS */
.tutorials-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.tut-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.tut-section:hover {
    border-color: var(--accent);
}

.tut-section-header {
    padding: 20px 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    user-select: none;
}

.tut-section-header h3 {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tut-section-header .section-num {
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tut-section-header .chevron {
    color: var(--text-dim);
    font-size: 1.2rem;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.tut-section.open .tut-section-header .chevron {
    transform: rotate(180deg);
}

.tut-section-body {
    display: none;
    padding: 0 24px 24px;
}

.tut-section.open .tut-section-body {
    display: block;
}

.tut-section-body p {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 16px;
    line-height: 1.7;
}

.tut-section-body ul,
.tut-section-body ol {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin: 0 0 16px 20px;
    line-height: 1.8;
}

.tut-section-body li {
    margin-bottom: 4px;
}

.tut-section-body strong {
    color: var(--text);
}

/* VIDEO PLACEHOLDERS */
.video-box {
    background: var(--bg);
    border: 2px dashed var(--border);
    border-radius: 10px;
    padding: 40px 24px;
    text-align: center;
    margin: 16px 0;
}

.video-box .video-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.video-box .video-name {
    font-size: 0.85rem;
    color: var(--text-dim);
    font-family: monospace;
}

.video-box .video-note {
    font-size: 0.75rem;
    color: var(--accent);
    margin-top: 8px;
}

/* YOUTUBE EMBED */
.youtube-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    margin: 16px 0;
}

.youtube-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}

/* INFO CALLOUT */
.callout {
    background: rgba(124, 92, 252, 0.08);
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    padding: 14px 18px;
    margin: 16px 0;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.callout strong {
    color: var(--accent);
}

.callout.warning {
    background: rgba(239, 68, 68, 0.08);
    border-left-color: var(--red);
}

.callout.warning strong {
    color: var(--red);
}

/* QUICK COMMANDS */
.commands-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

.commands-section h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.commands-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.command-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.command-keys {
    font-family: monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    min-width: 200px;
    flex-shrink: 0;
}

.command-desc {
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* FAQ */
.faq-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.faq-section h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-q {
    width: 100%;
    padding: 18px 0;
    background: none;
    border: none;
    color: var(--text);
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-q .faq-chevron {
    color: var(--text-dim);
    transition: transform 0.2s;
}

.faq-item.open .faq-q .faq-chevron {
    transform: rotate(180deg);
}

.faq-a {
    display: none;
    padding: 0 0 18px;
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.7;
}

.faq-item.open .faq-a {
    display: block;
}

.faq-a ul {
    margin: 8px 0 0 20px;
}

.faq-a li {
    margin-bottom: 4px;
}

/* FOOTER */
.tut-footer {
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 32px 24px;
    max-width: 800px;
    margin: 0 auto;
}

.tut-footer p {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.tut-footer a {
    color: var(--accent);
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .tut-section-header {
        padding: 16px 18px;
    }

    .tut-section-body {
        padding: 0 18px 18px;
    }

    .command-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .command-keys {
        min-width: auto;
    }

    .tut-header {
        flex-direction: column;
        gap: 8px;
    }
}
