/* LanDocs promo — namespaced styles scaled for 1920×1080 video.
   Mirrors the source app visually but bumps the base scale ~1.5x. */

.ld-app {
    width: 1920px;
    height: 1080px;
    background: #ffffff;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 18px;
    color: #111;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* ── Top bar ───────────────────────────────────────────────── */
.ld-topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
    flex-shrink: 0;
    height: 64px;
}
.ld-app-title {
    font-size: 22px;
    font-weight: 600;
    margin-right: 12px;
    letter-spacing: -0.01em;
}
.ld-sep {
    width: 1px;
    height: 28px;
    background: #e0e0e0;
    margin: 0 6px;
}
.ld-zoom-display {
    min-width: 56px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-size: 16px;
    color: #555;
}

.ld-btn {
    font: 500 16px system-ui, sans-serif;
    color: #111;
    background: #fff;
    border: 1px solid #ccc;
    padding: 7px 14px;
    cursor: pointer;
    border-radius: 2px;
    white-space: nowrap;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.ld-btn.hot {
    background: #f0f0f0;
    border-color: #999;
}
.ld-btn.pressed {
    background: #d8d8d8;
    border-color: #777;
}
.ld-btn-ai {
    background: #1a237e;
    color: #fff;
    border-color: #1a237e;
    font-weight: 600;
}
.ld-btn-ai.hot { background: #283593; border-color: #283593; }
.ld-btn-ai.pressed { background: #0f1656; border-color: #0f1656; }

/* ── Workspace ─────────────────────────────────────────────── */
.ld-workspace {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* ── Toolbox ───────────────────────────────────────────────── */
.ld-toolbox {
    width: 280px;
    flex-shrink: 0;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
}
.ld-toolbox-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #777;
    padding: 14px 16px 8px;
    border-bottom: 1px solid #e0e0e0;
}
.ld-device-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 10px;
    padding: 11px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    background: #fff;
    user-select: none;
    transition: background 0.12s, border-color 0.12s, transform 0.18s;
    position: relative;
}
.ld-device-card.hot {
    background: #f5f5f5;
    border-color: #bbb;
}
.ld-device-card.pressed {
    background: #e8e8e8;
    border-color: #999;
    transform: scale(0.98);
}
.ld-device-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
}
.ld-device-label {
    font-size: 16px;
    color: #111;
    font-weight: 500;
}
.ld-device-sub {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.ld-toolbox-shortcuts {
    margin-top: auto;
    border-top: 1px solid #e0e0e0;
    padding: 8px 0 12px;
}
.ld-shortcuts-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #999;
    padding: 6px 14px;
}
.ld-shortcut-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 14px;
    gap: 8px;
}
.ld-shortcut-row span {
    font-size: 13px;
    color: #888;
    text-align: right;
    flex: 1;
}
.ld-kbd {
    font: 500 12px system-ui, sans-serif;
    color: #444;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 2px;
    padding: 2px 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Canvas ────────────────────────────────────────────────── */
.ld-canvas-panel {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: #fff;
}
.ld-canvas-svg {
    display: block;
    width: 100%;
    height: 100%;
    user-select: none;
}
.ld-zoom-overlay {
    position: absolute;
    bottom: 14px;
    right: 18px;
    pointer-events: none;
    font-size: 14px;
    color: #888;
    background: rgba(255,255,255,0.7);
    padding: 4px 8px;
    border-radius: 2px;
}

/* ── Toggle strip + right panel ────────────────────────────── */
.ld-toggle-strip {
    width: 18px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    color: #888;
    font-size: 18px;
    user-select: none;
}

.ld-config-panel {
    width: 380px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
}
.ld-config-header {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    border-bottom: 1px solid #e0e0e0;
}
.ld-config-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.ld-config-content {
    flex: 1;
    overflow: hidden;
    padding: 14px 18px;
}
.ld-panel-empty {
    color: #aaa;
    font-size: 16px;
    padding: 16px 0;
    text-align: center;
    margin: 0;
}
.ld-panel-header { margin-bottom: 14px; }
.ld-type-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 3px 9px;
    border-radius: 2px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: #555;
}
.ld-type-badge.switch { background: #e0f7fa; border-color: #00838f; color: #00838f; }
.ld-type-badge.router { background: #fff3e0; border-color: #e65100; color: #e65100; }
.ld-type-badge.server { background: #e8eaf6; border-color: #3949ab; color: #3949ab; }
.ld-type-badge.pc     { background: #f1f8e9; border-color: #558b2f; color: #558b2f; }

.ld-panel-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px;
}
.ld-panel-row label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #777;
}
.ld-panel-input {
    font: 400 16px system-ui, sans-serif;
    color: #111;
    border: 1px solid #e0e0e0;
    background: #fff;
    padding: 7px 9px;
    border-radius: 2px;
    width: 100%;
    outline: none;
    min-height: 34px;
    display: flex;
    align-items: center;
}
.ld-panel-input.focused {
    border-color: #1565c0;
    box-shadow: 0 0 0 2px rgba(21,101,192,0.12);
}
.ld-panel-input .caret {
    display: inline-block;
    width: 1px;
    height: 18px;
    background: #111;
    margin-left: 1px;
    animation: ld-blink 0.9s infinite step-end;
    vertical-align: middle;
}
@keyframes ld-blink {
    50% { opacity: 0; }
}
.ld-panel-input .ld-placeholder {
    color: #aaa;
}

.ld-tag-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.ld-tag-chip {
    display: inline-block;
    font-size: 12px;
    padding: 3px 9px;
    border: 1px solid #ccc;
    border-radius: 12px;
    background: #f5f5f5;
    color: #555;
}

.ld-panel-section { margin-top: 10px; }
.ld-ports-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 6px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 8px;
}
.ld-section-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #777;
}

/* ── Modals ────────────────────────────────────────────────── */
.ld-modal-overlay {
    position: absolute;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.40);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ld-modal-box {
    background: #fff;
    border: 1px solid #ccc;
    padding: 26px 32px 22px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.20);
    border-radius: 3px;
    max-width: 760px;
    width: 760px;
}
.ld-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.ld-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #111;
}
.ld-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #777;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
}
.ld-modal-intro {
    font-size: 15px;
    color: #555;
    margin: 0 0 14px;
    line-height: 1.55;
}
.ld-ai-textarea {
    width: 100%;
    height: 280px;
    font: 400 14px 'JetBrains Mono', 'Courier New', monospace;
    line-height: 1.6;
    color: #222;
    background: #fafafa;
    border: 1px solid #ddd;
    padding: 14px 16px;
    box-sizing: border-box;
    white-space: pre-wrap;
    overflow: hidden;
}
.ld-modal-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
    margin-top: 14px;
}
.ld-copy-feedback {
    font-size: 14px;
    color: #2e7d32;
    font-weight: 600;
}

/* ── Toast / file drop notice (overlay, always visible) ──── */
.ld-toast {
    position: absolute;
    top: 110px;
    right: 60px;
    background: #111;
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    padding: 14px 22px;
    border-radius: 6px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.30);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 800;
    font-family: 'Inter', system-ui, sans-serif;
    letter-spacing: -0.01em;
}
.ld-toast .dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #2e7d32;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}
.ld-toast .filename {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
}

/* ── Cursor ────────────────────────────────────────────────── */
.ld-cursor {
    position: absolute;
    width: 32px;
    height: 32px;
    pointer-events: none;
    z-index: 9999;
    transform-origin: 6px 4px;
    transition: transform 0.08s ease-out;
    will-change: transform, left, top;
}
.ld-cursor.click {
    transform: scale(0.82);
}
.ld-cursor-ripple {
    position: absolute;
    border: 2px solid rgba(21,101,192,0.55);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
}

/* ── Apple-style chapter cards (between every scene) ───────── */
.ld-scene-card {
    position: absolute;
    inset: 0;
    z-index: 950;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    will-change: opacity;
}
.ld-scene-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    text-align: center;
    max-width: 90%;
    will-change: transform, opacity;
}
.ld-scene-card-text {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 132px;
    font-weight: 700;
    color: #0a0a0a;
    letter-spacing: -0.045em;
    line-height: 1.02;
}
.ld-scene-card-sub {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 32px;
    font-weight: 400;
    color: #555;
    letter-spacing: -0.012em;
    line-height: 1.2;
}

/* ── (Legacy) Big bold feature callouts — unused in v2 ──────── */
.ld-callout {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
    pointer-events: none;
    max-width: 92%;
}
.ld-callout-text {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 76px;
    font-weight: 700;
    color: #111;
    letter-spacing: -0.035em;
    line-height: 1;
    white-space: nowrap;
    text-shadow:
        0 0 24px rgba(255,255,255,0.95),
        0 0 56px rgba(255,255,255,0.85),
        0 0 100px rgba(255,255,255,0.65);
}
.ld-callout-sub {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 22px;
    font-weight: 500;
    color: #333;
    letter-spacing: -0.005em;
    white-space: nowrap;
    text-shadow:
        0 0 16px rgba(255,255,255,0.95),
        0 0 40px rgba(255,255,255,0.8);
}

/* ── Intro / Outro ─────────────────────────────────────────── */
.ld-titlecard {
    position: absolute;
    inset: 0;
    z-index: 1000;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    text-align: center;
}
.ld-intro-question {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 128px;
    font-weight: 700;
    letter-spacing: -0.045em;
    color: #111;
    line-height: 1;
    will-change: transform, opacity;
}
.ld-titlecard .wordmark {
    font-size: 96px;
    font-weight: 700;
    letter-spacing: -0.035em;
    color: #111;
    line-height: 1;
}
.ld-titlecard .tagline {
    font-size: 28px;
    color: #555;
    letter-spacing: -0.01em;
}
.ld-titlecard .cta {
    margin-top: 26px;
    font-size: 18px;
    color: #888;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 600;
}
.ld-titlecard .accent-bar {
    width: 64px;
    height: 4px;
    background: #0066ff;
    border-radius: 2px;
}

/* Outro: bigger wordmark, more breathing room (Apple closer feel) */
.ld-titlecard.ld-outro {
    gap: 28px;
    z-index: 1100;
}
.ld-titlecard.ld-outro .wordmark {
    font-size: 156px;
    letter-spacing: -0.045em;
    line-height: 0.95;
}
.ld-titlecard.ld-outro .tagline {
    font-size: 34px;
    color: #444;
    letter-spacing: -0.012em;
    margin-top: 4px;
}
.ld-titlecard.ld-outro .cta {
    margin-top: 60px;
    font-size: 19px;
    color: #8a8a8a;
    letter-spacing: 0.18em;
}
.ld-titlecard.ld-outro .accent-bar {
    width: 92px;
    height: 5px;
    margin-bottom: 8px;
}

/* The small dragged-device ghost following the cursor while dragging */
.ld-drag-ghost {
    position: absolute;
    pointer-events: none;
    background: #fff;
    border: 1px solid #bbb;
    border-radius: 3px;
    padding: 8px 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #111;
    z-index: 9000;
    opacity: 0.95;
}

/* Scene focus highlight ring (subtle glow around the part being shown) */
.ld-focus-ring {
    position: absolute;
    pointer-events: none;
    border: 2px solid rgba(0,102,255,0.4);
    border-radius: 6px;
    box-shadow: 0 0 0 9999px rgba(255,255,255,0.0), 0 0 36px rgba(0,102,255,0.20);
    z-index: 50;
    transition: opacity 0.3s ease;
}
