*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Visual-First Card Experience - Dark Gradient Theme */
    --primary-color: #06b6d4; /* cyan-500 */
    --primary-dark: #0891b2; /* cyan-600 */
    --primary-light: rgba(6, 182, 212, 0.15);
    --background: linear-gradient(to bottom right, #0f172a, #1e293b, #0f172a); /* slate-900 to slate-800 */
    --background-solid: #0f172a; /* slate-900 */
    --surface: linear-gradient(to bottom right, #334155, #1e293b); /* slate-700 to slate-800 */
    --surface-solid: #334155; /* slate-700 */
    --text-primary: #ffffff;
    --text-secondary: #94a3b8; /* slate-400 */
    --border-color: #475569; /* slate-600 */
    --error-color: #ef4444; /* red-500 */

    /* Lens gradient colors */
    --lens-ux-from: #2563eb; /* blue-600 */
    --lens-ux-to: #0891b2; /* cyan-600 */
    --lens-ai-from: #9333ea; /* purple-600 */
    --lens-ai-to: #db2777; /* pink-600 */
    --lens-system-from: #16a34a; /* green-600 */
    --lens-system-to: #059669; /* emerald-600 */
    --lens-musical-from: #d97706; /* amber-600 */
    --lens-musical-to: #ea580c; /* orange-600 */

    /* Loading overlay colors */
    --loading-overlay-bg: rgba(0, 0, 0, 0.6);
    --loading-spinner-bg: rgba(6, 182, 212, 0.2);
    --loading-spinner-primary: #06b6d4;
    --loading-spinner-secondary: #0891b2;
    --loading-text: #06b6d4;
    --loading-cancel-bg: rgba(6, 182, 212, 0.1);
    --loading-cancel-border: rgba(6, 182, 212, 0.3);
    --loading-cancel-hover-bg: rgba(6, 182, 212, 0.2);
    --loading-cancel-hover-border: rgba(6, 182, 212, 0.5);

    /* Card hover effects */
    --card-hover-shadow: 0 10px 40px rgba(6, 182, 212, 0.2);
    --card-hover-border: #06b6d4;
}

/* Light theme overrides (optional - keeping for compatibility) */
.light-theme-app {
    --primary-color: #0891b2;
    --primary-dark: #0e7490;
    --primary-light: rgba(6, 182, 212, 0.1);
    --background: linear-gradient(to bottom right, #f8fafc, #e2e8f0, #f8fafc);
    --background-solid: #f8fafc;
    --surface: linear-gradient(to bottom right, #ffffff, #f1f5f9);
    --surface-solid: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border-color: #cbd5e1;
    --error-color: #dc2626;
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--background);
}

.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--background);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header Toolbar - Site-level navigation */
.header-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: var(--background-solid);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 15px;
}

.header-brand:hover {
    color: var(--primary-color);
}

.brand-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.brand-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.brand-tagline {
    height: 14px;
    width: auto;
    object-fit: contain;
    margin-top: 2px;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.header-brand:hover .brand-tagline {
    opacity: 1;
}

.brand-icon {
    font-size: 18px;
}

.brand-text {
    letter-spacing: -0.01em;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 13px;
    transition: all 0.15s ease;
}

.header-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.header-nav .nav-link.active {
    background: var(--primary-light);
    color: var(--primary-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.viewer-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

/* Viewer Toolbar - Document-level actions */
.viewer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--surface-solid);
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
    flex-shrink: 0;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-name {
    color: var(--text-secondary);
    font-size: 13px;
}

/* File picker button */
.file-picker-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--primary-color);
    border-radius: 16px;
    background: var(--primary-color);
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.file-picker-btn:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
    box-shadow: 0 2px 6px rgba(6, 182, 212, 0.3);
}

.file-picker-btn input[type="file"] {
    display: none;
}

.file-picker-btn.large {
    padding: 12px 32px;
    font-size: 16px;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--surface-solid);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.icon-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.icon-btn .btn-icon {
    font-size: 14px;
    line-height: 1;
}

.icon-btn .btn-label {
    font-size: 11px;
    font-weight: 600;
}

/* Back button for drill-down navigation */
.icon-btn.back-btn {
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

.icon-btn.back-btn:hover {
    background: rgba(6, 182, 212, 0.15);
    box-shadow: 0 2px 6px rgba(6, 182, 212, 0.2);
}

/* Success state for copy button */
.icon-btn.success {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
    transition: all 0.3s ease-out;
}

.icon-btn.success:hover {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

/* Panel toggle button */
.icon-btn.panel-toggle {
    border-color: var(--border-color);
}

.icon-btn.panel-toggle.active {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.icon-btn.panel-toggle .btn-icon {
    font-size: 16px;
}

/* Zoom controls */
.zoom-controls {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 8px;
    border-left: 1px solid var(--border-color);
    padding-left: 12px;
}

.zoom-btn {
    padding: 4px 8px;
    font-size: 16px;
    font-weight: bold;
    min-width: 28px;
}

.zoom-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.zoom-level {
    padding: 4px 8px;
    min-width: 50px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--surface-solid);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.zoom-level:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Document frame container for zoom */
.document-frame-container {
    overflow: auto;
    width: 100%;
    height: 100%;
    position: relative;
}

/* Drilled-down beat title */
.drilled-down-title {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

/* Movement view title */
.movement-title {
    font-weight: 500;
    color: var(--primary-color);
    font-size: 14px;
}

/* Horizontal split container for movement drill-down */
.split-container {
    display: flex;
    flex: 1;
    height: 100%;
    overflow: hidden;
}

.description-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--surface-solid);
    border-right: 1px solid var(--border-color);
    min-width: 200px;
    max-width: 600px;
    flex-shrink: 0;
}

.description-header {
    padding: 12px 16px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.description-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.description-content {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-primary);
}

.description-content p {
    margin: 0 0 16px 0;
}

.description-content p:last-child {
    margin-bottom: 0;
}

.description-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

.description-content code {
    background: var(--code-bg, rgba(0, 0, 0, 0.05));
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
}

.description-list {
    padding-left: 24px;
    margin: 8px 0;
    list-style-type: disc;
}

.description-list li {
    margin-bottom: 6px;
    padding-left: 4px;
}

.description-list li:last-child {
    margin-bottom: 0;
}

/* Draggable split handle */
.split-handle {
    width: 6px;
    background: var(--border-color);
    cursor: col-resize;
    position: relative;
    flex-shrink: 0;
    transition: background 0.15s ease;
}

.split-handle:hover,
.split-handle:active {
    background: var(--primary-color);
}

.handle-grip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 32px;
    background: var(--text-secondary);
    border-radius: 1px;
    opacity: 0.4;
}

.split-handle:hover .handle-grip,
.split-handle:active .handle-grip {
    opacity: 0.8;
    background: white;
}

/* Viewer panel in split layout */
.viewer-panel {
    flex: 1;
    height: 100%;
    overflow: hidden;
    min-width: 0;
}

.viewer-panel .content-frame {
    width: 100%;
    height: 100%;
    border: none;
}

/* Body class during resize to prevent text selection */
body.resizing-panel {
    cursor: col-resize !important;
    user-select: none !important;
}

/* Side panel sections */
.movement-description-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.beat-cards-section {
    margin-top: 8px;
}

/* Movement view panel sections - using StructurePanel styling */
.description-content .panel-section {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.description-content .section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease;
    margin: 0;
    text-transform: none;
    letter-spacing: normal;
}

.description-content .section-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.description-content .section-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.description-content .section-title {
    flex: 1;
}

.description-content .section-count {
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.description-content .section-toggle {
    font-size: 10px;
    color: var(--text-secondary);
    opacity: 0.6;
}

.description-content .section-list {
    list-style: none;
    padding: 0 0 8px 0;
    margin: 0;
}

.description-content .list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 36px;
    font-size: 12px;
    color: var(--text-secondary);
    border-radius: 4px;
    transition: all 0.15s ease;
}

.description-content .list-item.clickable {
    cursor: pointer;
}

.description-content .list-item.clickable:hover {
    background: rgba(6, 182, 212, 0.1);
    color: var(--text-primary);
}

.description-content .list-item.active {
    background: rgba(6, 182, 212, 0.15);
    color: var(--text-primary);
}

.description-content .item-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 10px;
    font-weight: 600;
    color: var(--primary-color);
}

.description-content .item-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.description-content .item-badge {
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

/* Beat cards */
.beat-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.beat-card:hover {
    border-color: var(--primary-color);
    background: rgba(6, 182, 212, 0.05);
    transform: translateX(2px);
}

.beat-card.active {
    border-color: var(--primary-color);
    background: rgba(6, 182, 212, 0.1);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.beat-card-number {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
}

.beat-card-content {
    flex: 1;
    min-width: 0;
}

.beat-card-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.beat-card-participants {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Sequences section in beat details panel */
.sequences-section {
    margin-top: 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.sequences-section .section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: background 0.15s ease;
    margin-bottom: 0;
    text-transform: none;
    letter-spacing: normal;
}

.sequences-section .section-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.sequences-section .section-title {
    flex: 1;
}

.sequences-section .section-count {
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.sequences-section .section-toggle {
    font-size: 10px;
    color: var(--text-secondary);
    opacity: 0.6;
}

.sequences-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}

.sequence-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 4px;
    transition: background 0.15s ease;
}

.sequence-item:hover {
    background: rgba(6, 182, 212, 0.05);
}

.sequence-flow {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.sequence-sender,
.sequence-receiver {
    color: var(--primary-color);
    font-weight: 500;
}

.sequence-arrow {
    color: var(--text-secondary);
    font-size: 11px;
}

.sequence-message {
    color: var(--text-secondary);
    font-size: 11px;
    padding-left: 8px;
    border-left: 2px solid var(--border-color);
    margin-left: 4px;
}

.sequence-item.clickable {
    cursor: pointer;
}

.sequence-item.clickable:hover {
    background: rgba(6, 182, 212, 0.1);
}

.sequence-item.selected {
    background: rgba(6, 182, 212, 0.15);
    border-left: 3px solid var(--primary-color);
    padding-left: 9px;
}

.sequence-has-details {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    font-size: 10px;
    font-weight: 600;
    font-style: italic;
    margin-left: 6px;
    flex-shrink: 0;
}

.sequence-label {
    font-size: 10px;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-top: 2px;
}

/* Sequence detail view in viewer panel */
.sequence-detail-view {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sequence-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.sequence-detail-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.sequence-label-badge {
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--primary-color);
    color: white;
    font-size: 11px;
    font-weight: 600;
}

.sequence-detail-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sequence-detail-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.sequence-detail-view .content-frame {
    flex: 1;
    border: none;
}

/* Navigation buttons for prev/next movement/beat */
.icon-btn.nav-btn {
    padding: 6px 10px;
    font-size: 16px;
    font-weight: 600;
    min-width: 36px;
    border-color: var(--primary-color);
    color: var(--primary-color);
    border-radius: 12px;
}

.icon-btn.nav-btn:hover:not(:disabled) {
    background: rgba(6, 182, 212, 0.15);
    box-shadow: 0 2px 6px rgba(6, 182, 212, 0.2);
}

.icon-btn.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: var(--border-color);
    color: var(--text-secondary);
}

/* Navigation counter (e.g., "Movement 2/5") */
.nav-counter {
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--primary-light);
    border-radius: 4px;
    min-width: 80px;
    text-align: center;
}

/* Breadcrumb trail for sequence view */
.breadcrumb-trail {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-right: 4px;
}

.breadcrumb-segment {
    color: var(--text-secondary);
    opacity: 0.8;
}

.breadcrumb-separator {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Sequence title in toolbar */
.file-name.sequence-title {
    color: var(--primary-color);
    font-weight: 600;
}

/* Sequence info section in side panel */
.sequence-info-section {
    padding: 12px;
    background: var(--bg-elevated);
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}

.sequence-info-flow {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.sequence-info-message {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.sequence-info-source {
    font-size: 11px;
    color: var(--text-secondary);
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.sequence-info-source strong {
    color: var(--text-primary);
}

/* No content message */
.no-content-message {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    font-size: 14px;
}

.content-area {
    flex: 1;
    overflow: hidden;
    display: flex;
}

.content-frame {
    width: 100%;
    height: 100%;
    border: none;
}

/* Drop zone */
.drop-zone {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 24px;
    border: 3px dashed var(--border-color);
    border-radius: 12px;
    background: var(--surface-solid);
    transition: all 0.2s;
}

.drop-zone.dragging {
    border-color: var(--primary-color);
    background: rgba(6, 182, 212, 0.1);
}

.drop-zone-content {
    text-align: center;
    padding: 40px;
}

.drop-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
}

.drop-zone-content h2 {
    font-size: 24px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.drop-zone-content p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.drop-zone-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Secondary button */
.btn-primary {
    padding: 8px 20px;
    border: none;
    border-radius: 8px;
    background: var(--primary-color);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-block;
    padding: 8px 20px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    background: transparent;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary.large {
    padding: 12px 32px;
    font-size: 16px;
}

/* Paste area */
.paste-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    background: var(--background-solid);
}

.paste-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.icon-btn.small {
    padding: 4px 12px;
    font-size: 13px;
}

.paste-area textarea {
    flex: 1;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: none;
    background: #1e293b;
    color: #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.paste-area textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.paste-area textarea::placeholder {
    color: #64748b;
}

.paste-area button {
    align-self: flex-end;
    padding: 10px 32px;
}

/* Loading Overlay - Movement 1: Open File Experience */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--loading-overlay-bg);
    backdrop-filter: blur(2px);
    z-index: 1000;
    animation: fadeIn 0.2s ease-in-out;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--loading-spinner-bg);
    border-top: 4px solid var(--loading-spinner-primary);
    border-right: 4px solid var(--loading-spinner-secondary);
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.loading-message {
    margin-top: 20px;
    font-size: 16px;
    color: var(--loading-text);
    font-weight: 500;
    opacity: 0.8;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.cancel-btn {
    margin-top: 16px;
    padding: 8px 16px;
    background-color: var(--loading-cancel-bg);
    border: 1px solid var(--loading-cancel-border);
    border-radius: 4px;
    color: var(--loading-text);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.cancel-btn:hover {
    background-color: var(--loading-cancel-hover-bg);
    border-color: var(--loading-cancel-hover-border);
}

.error {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    color: var(--error-color);
}

/* Toast notifications */
.toast {
    position: fixed;
    top: 16px;
    right: 16px;
    padding: 12px 40px 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    background: #4caf50;
    color: white;
}

.toast.warning {
    background: #ff9800;
    color: white;
}

.toast.error {
    background: #f44336;
    color: white;
}

.toast-close {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: inherit;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.8;
    padding: 0 8px;
    line-height: 1;
}

.toast-close:hover {
    opacity: 1;
}

/* Samples link in toolbar */
.samples-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

/* Samples page */
.samples-container {
    min-height: 100vh;
    padding: 40px;
    background: var(--background-solid);
}

.samples-header {
    text-align: center;
    margin-bottom: 48px;
}

.samples-header h1 {
    font-size: 32px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.samples-header p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.back-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    transition: all 0.2s;
}

.back-link:hover {
    background: var(--primary-light);
}

.samples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto 48px;
}

.sample-card {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.sample-card:hover {
    border-color: var(--card-hover-border);
    box-shadow: var(--card-hover-shadow);
    transform: translateY(-2px) scale(1.02);
}

.sample-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.2);
}

.sample-info {
    flex: 1;
}

.sample-info h2 {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.sample-info p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.sample-link {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 500;
}

.samples-footer {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.samples-footer h3 {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.samples-footer p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.samples-footer p:last-child {
    margin-bottom: 0;
}

.samples-footer strong {
    color: var(--text-primary);
}

/* Sample viewer (when viewing a specific sample) */
.sample-viewer {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.sample-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
}

.sample-toolbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sample-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sample-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

.sample-content {
    flex: 1;
    overflow: hidden;
    display: flex;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 12px;
    background: lightyellow;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 12px;
    top: 8px;
}

/* Capabilities page */
.capabilities-container {
    min-height: 100vh;
    padding: 40px;
    background: var(--background-solid);
}

.capabilities-header {
    text-align: center;
    margin-bottom: 48px;
}

.capabilities-header h1 {
    font-size: 32px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.capabilities-header p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto 48px;
}

.capability-card {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.capability-card:hover {
    border-color: var(--card-hover-border);
    box-shadow: var(--card-hover-shadow);
    transform: translateY(-2px) scale(1.02);
}

.capability-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.2);
}

.capability-info {
    flex: 1;
}

.capability-info h2 {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.capability-info p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.capability-uses {
    list-style: none;
    margin-bottom: 12px;
}

.capability-uses li {
    font-size: 13px;
    color: var(--text-secondary);
    padding-left: 16px;
    position: relative;
    margin-bottom: 4px;
}

.capability-uses li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.capability-link {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 500;
}

.capabilities-footer {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.capabilities-footer h3 {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.capabilities-footer p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Instruction viewer */
.instruction-viewer {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.instruction-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--surface-solid);
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
}

.instruction-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

.instruction-content-area {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    background: var(--background-solid);
}

.instruction-intro {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
    padding: 24px;
    background: var(--surface-solid);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.intro-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.2);
}

.intro-text h2 {
    font-size: 20px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.intro-text p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.instruction-block {
    margin-bottom: 32px;
    background: var(--surface-solid);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.instruction-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(6, 182, 212, 0.1);
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
    color: var(--primary-color);
}

.instruction-code {
    padding: 20px;
    margin: 0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    background: #1e293b;
    color: #e2e8f0;
    max-height: 400px;
    overflow-y: auto;
    border-radius: 0 0 12px 12px;
}

/* Guidance panel */
.guidance-panel {
    padding: 24px;
    background: var(--surface-solid);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.guidance-panel h3 {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.guidance-steps {
    list-style: none;
    counter-reset: step;
    margin-bottom: 24px;
}

.guidance-steps li {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 16px 16px 56px;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.guidance-steps li:last-child {
    border-bottom: none;
}

.guidance-steps li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 16px;
    top: 16px;
    width: 28px;
    height: 28px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.guidance-steps li strong {
    font-size: 14px;
    color: var(--text-primary);
}

.guidance-steps li span {
    font-size: 13px;
    color: var(--text-secondary);
}

.guidance-cta {
    text-align: center;
}

.guidance-cta .btn-primary {
    display: inline-block;
    padding: 12px 32px;
    font-size: 16px;
    text-decoration: none;
}

/* Structure info panel for import feedback */
.structure-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: var(--primary-light);
    border-bottom: 1px solid var(--border-color);
}

.structure-info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.structure-info-item strong {
    color: var(--primary-dark);
    font-weight: 600;
}

.structure-info-close {
    margin-left: auto;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
}

.structure-info-close:hover {
    color: var(--text-primary);
}

/* Export dropdown */
.export-dropdown {
    position: relative;
}

.export-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--surface-solid);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 100;
    min-width: 200px;
    overflow: hidden;
}

.export-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    text-align: left;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.export-menu button:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.export-menu button:first-child {
    border-radius: 12px 12px 0 0;
}

.export-menu button:last-child {
    border-radius: 0 0 12px 12px;
}

/* Structure badges for import feedback */
.structure-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Drop zone AI instructions hint */
.drop-zone-ai-hint {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.drop-zone-ai-hint span {
    font-size: 13px;
    color: var(--text-secondary);
}

.ai-instructions-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: var(--primary-light);
    border: 1px solid var(--primary);
    border-radius: 20px;
    color: var(--primary-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.ai-instructions-link:hover {
    background: var(--primary);
    color: white;
}

/* Structure Toolbar Preview Panel - global styles for dynamic content */
.preview-panel-inner {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 12px;
    max-height: 380px;
    overflow-y: auto;
}

.preview-content h4 {
    margin: 0 0 8px 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.preview-content ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.preview-content li {
    padding: 8px 10px;
    font-size: 12px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    border-radius: 4px;
    margin: 0;
    transition: all 120ms ease-out;
}

.preview-content li:hover {
    background: var(--primary-color);
    color: white !important;
}

.preview-content li:hover .closure-badge {
    color: #a5d6a7;
}

.preview-content li:last-child {
    border-bottom: none;
}

.preview-content li.non-clickable {
    cursor: default;
    color: var(--text-secondary);
}

.preview-content li.non-clickable:hover {
    background: transparent;
    color: var(--text-secondary) !important;
}

.closure-badge {
    color: #4caf50;
    font-weight: 600;
}

.more-items {
    color: var(--text-secondary);
    font-style: italic;
    opacity: 0.7;
}

.passed-checks,
.failed-checks {
    margin-top: 8px;
}

.passed-checks strong {
    color: #4caf50;
}

.failed-checks strong {
    color: #f44336;
}

.issue-warning {
    color: #ff9800;
}

.fix-action {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
    padding-left: 8px;
    border-left: 2px solid var(--primary-color);
}

/* ========================================
   VISUAL-FIRST CARD EXPERIENCE STYLES
   ======================================== */

/* Movement Card Grid */
.movement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 32px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Movement Card */
.movement-card {
    position: relative;
    height: 100%;
    background: var(--surface);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.movement-card:hover {
    border-color: var(--card-hover-border);
    box-shadow: var(--card-hover-shadow);
    transform: translateY(-4px) scale(1.05);
}

.movement-card-icon {
    font-size: 48px;
    margin-bottom: 16px;
    line-height: 1;
}

.movement-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}

.movement-card-subtitle {
    font-size: 14px;
    color: var(--primary-color);
    margin-bottom: 16px;
    font-weight: 500;
}

.movement-card-diagram {
    font-size: 12px;
    font-family: 'Consolas', 'Monaco', monospace;
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex: 1;
    line-height: 1.6;
}

/* Movement Card Hover Metadata */
.movement-card-metadata {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: fadeIn 0.3s ease-in-out;
}

.movement-card-metadata-item {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.movement-card-metadata-label {
    color: var(--primary-color);
    font-weight: 600;
}

.movement-card-cta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 12px;
    text-align: center;
    opacity: 0.8;
}

/* Lens Selector Buttons */
.lens-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 0 32px;
    margin-bottom: 24px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.lens-button {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.lens-button.ux {
    background: linear-gradient(to right, var(--lens-ux-from), var(--lens-ux-to));
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.lens-button.ai {
    background: linear-gradient(to right, var(--lens-ai-from), var(--lens-ai-to));
    color: white;
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
}

.lens-button.system {
    background: linear-gradient(to right, var(--lens-system-from), var(--lens-system-to));
    color: white;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.lens-button.musical {
    background: linear-gradient(to right, var(--lens-musical-from), var(--lens-musical-to));
    color: white;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.lens-button:not(.active) {
    background: var(--surface-solid);
    color: var(--text-secondary);
    box-shadow: none;
}

.lens-button:not(.active):hover {
    background: var(--border-color);
    color: var(--text-primary);
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 32px;
    margin-bottom: 24px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    font-size: 14px;
    color: var(--text-secondary);
}

.breadcrumb-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
    cursor: pointer;
}

.breadcrumb-link:hover {
    color: var(--primary-color);
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

.breadcrumb-separator {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Page Header */
.page-header {
    padding: 32px 32px 0;
    max-width: 1400px;
    margin: 0 auto 32px;
}

.page-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-description {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 800px;
}

/* Focused Movement View */
.focused-movement-container {
    padding: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.focused-movement-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 32px;
    border: 1px solid var(--border-color);
}

.focused-movement-header {
    display: flex;
    align-items: start;
    gap: 24px;
    margin-bottom: 32px;
}

.focused-movement-icon {
    font-size: 64px;
    line-height: 1;
}

.focused-movement-info {
    flex: 1;
}

.focused-movement-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.focused-movement-subtitle {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 24px;
    font-weight: 500;
}

/* Narrative Reveal Sections */
.narrative-sections {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.narrative-section {
    border-radius: 8px;
    overflow: hidden;
}

.narrative-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    text-align: left;
}

.narrative-toggle:hover {
    color: var(--primary-color);
    background: rgba(6, 182, 212, 0.05);
}

.narrative-toggle-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.narrative-content {
    padding: 16px 16px 16px 42px;
    background: rgba(15, 23, 42, 0.5);
    border-left: 2px solid var(--primary-color);
    margin-left: 16px;
    border-radius: 0 4px 4px 0;
    color: var(--text-primary);
    line-height: 1.6;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.narrative-content.user-story {
    border-left-color: #06b6d4; /* cyan */
}

.narrative-content.purpose {
    border-left-color: #a855f7; /* purple */
}

.narrative-content.closure {
    border-left-color: #10b981; /* emerald */
}

.narrative-content.principle {
    border-left-color: #f59e0b; /* amber */
    font-style: italic;
}

/* Beat Cards (Next Level) */
.beat-cards-section {
    margin-top: 48px;
}

.beat-cards-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.beat-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.beat-card {
    background: rgba(51, 65, 85, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.beat-card:hover {
    border-color: var(--primary-color);
    background: rgba(51, 65, 85, 0.8);
    transform: translateY(-2px);
}

.beat-card-number {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.beat-card-title {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.beat-card-cta {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Export Button */
.export-button {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.export-button:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

/* Export Success Feedback */
.export-feedback {
    padding: 16px;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid #10b981;
    border-radius: 8px;
    color: #6ee7b7;
    margin-top: 24px;
    animation: fadeIn 0.3s ease-in-out;
}

/* Big Picture Panel */
.big-picture-panel {
    margin-top: 64px;
    padding: 32px;
    background: linear-gradient(to right, rgba(51, 65, 85, 0.5), rgba(30, 41, 59, 0.5));
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.big-picture-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.big-picture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    font-size: 14px;
}

.big-picture-item {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
}

.big-picture-feature {
    color: var(--text-primary);
}

.big-picture-movement {
    color: var(--primary-color);
    font-weight: 600;
}

/* Footer Note */
.footer-note {
    text-align: center;
    padding: 64px 32px 32px;
    color: var(--text-secondary);
    font-size: 14px;
    opacity: 0.7;
}

/* ========================================
   INTENT GATEWAY STYLES
   ======================================== */

/* Hero Logo (Gateway Home Page) */
.hero-logo {
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease-out;
    z-index: 10;
    position: relative;
    text-align: center;
}

.hero-logo img {
    height: 70px;
    width: auto;
    max-width: 500px;
    filter: drop-shadow(0 8px 16px rgba(0, 217, 255, 0.25));
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
}

.hero-logo img:hover {
    filter: drop-shadow(0 12px 24px rgba(0, 217, 255, 0.35));
    transform: scale(1.03);
}

.hero-tagline {
    height: 24px !important;
    width: auto;
    margin: 8px auto 0 auto;
    filter: none !important;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    display: block;
}

.hero-logo:hover .hero-tagline {
    opacity: 1;
    transform: none;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive: Tablet */
@media (max-width: 768px) {
    .hero-logo {
        margin-bottom: 32px;
    }

    .hero-logo img {
        height: 55px;
    }
}

/* Responsive: Mobile */
@media (max-width: 480px) {
    .hero-logo {
        margin-bottom: 24px;
    }

    .hero-logo img {
        height: 40px;
    }
}

.gateway-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 60px);
    padding: 40px;
    background: var(--background-solid);
}

.gateway-header {
    text-align: center;
    margin-bottom: 48px;
}

.gateway-header h1 {
    font-size: 36px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.gateway-header p {
    font-size: 18px;
    color: var(--text-secondary);
}

.gateway-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1200px;
    width: 100%;
}

@media (max-width: 1024px) {
    .gateway-cards {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
}

.gateway-card {
    display: flex;
    flex-direction: column;
    padding: 32px;
    background: var(--surface);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gateway-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 12px 40px rgba(6, 182, 212, 0.25);
    transform: translateY(-4px);
}

.gateway-card .card-icon {
    font-size: 56px;
    margin-bottom: 20px;
    line-height: 1;
}

.gateway-card h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.gateway-card > p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.gateway-card .card-features {
    list-style: none;
    margin-bottom: 24px;
    flex: 1;
}

.gateway-card .card-features li {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 6px 0 6px 20px;
    position: relative;
}

.gateway-card .card-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 600;
}

.gateway-card .card-cta {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: auto;
}

.gateway-card:hover .card-cta {
    color: var(--primary-dark);
}

/* Capability card accent */
.gateway-card.capability-card {
    border-left: 4px solid #9333ea;
}

.gateway-card.capability-card:hover {
    border-color: #9333ea;
    box-shadow: 0 12px 40px rgba(147, 51, 234, 0.25);
}

.gateway-card.capability-card .card-cta {
    color: #9333ea;
}

/* Viewer card accent */
.gateway-card.viewer-card {
    border-left: 4px solid var(--primary-color);
}

/* Samples card accent */
.gateway-card.samples-card {
    border-left: 4px solid #f59e0b;
}

.gateway-card.samples-card:hover {
    border-color: #f59e0b;
    box-shadow: 0 12px 40px rgba(245, 158, 11, 0.25);
}

.gateway-card.samples-card .card-cta {
    color: #f59e0b;
}

/* Header gateway mode - simplified header */
.header-toolbar.gateway-mode .header-nav,
.header-toolbar.gateway-mode .header-right {
    display: none;
}

/* Description preview styling for side panel */
.description-preview {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    padding: 12px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
    margin-bottom: 16px;
}

.beat-description-section {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.sequence-description-preview {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}
