/*---------------------------------------/*
 # SETTINGS
/*---------------------------------------*/

/* Prevent horizontal overflow on mobile */
* {
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

:root {
    --primary: #4f46e5;
    --primary-solid: #4f46e5;
    --secondary: #7c3aed;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-hover: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
}

/* Dark mode */
[data-theme="dark"] {
    --primary: #6366f1;
    --primary-solid: #6366f1;
    --secondary: #8b5cf6;
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;
    --info: #60a5fa;
    
    --bg: #0f172a;
    --surface: #1e293b;
    --surface-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-light: #94a3b8;
    --border: #334155;
    --border-light: #475569;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
}

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

/*---------------------------------------/*
 # ELEMENTS
/*---------------------------------------*/
body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--border-light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--surface);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--border);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

/*---------------------------------------/*
 # OBJECTS
/*---------------------------------------*/
.o-container {
    width: 100%;
    padding: 0 1rem;
    margin: 1rem auto;
}

/*---------------------------------------/*
 # COMPONENTS
/*---------------------------------------*/

/* Header */
.header {
    background: var(--surface);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .header {
    background: var(--surface);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.header-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.logo-link {
    text-decoration: none;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-actions .form-select {
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text-primary);
    height: 36px;
    min-width: 170px;
    max-width: 320px;
    line-height: 36px;
    box-shadow: var(--shadow-sm);
}

.header-actions .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(44, 76, 124, 0.06);
    outline: none;
}

.header-actions .form-select:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.header-actions .form-select option[disabled] {
    color: var(--text-light);
}

.header-actions #loadExampleBtn {
    padding: 8px 12px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.header-actions #resetExampleBtn {
    padding: 8px 12px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(180deg, rgba(74,144,226,0.08), rgba(74,144,226,0.04));
    border: 1px solid rgba(74,144,226,0.12);
    color: var(--text-primary);
}

.header-actions #resetExampleBtn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.header-actions #loadExampleBtn {
    background: linear-gradient(180deg, var(--primary), rgba(44,76,124,0.9));
    color: #fff;
    border: none;
    box-shadow: var(--shadow-md);
}
.header-actions #loadExampleBtn:hover { transform: translateY(-2px); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    line-height: 1.5;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--secondary);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    box-shadow: none;
}

.btn-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--text-light);
}

.btn-success {
    background: var(--success);
    color: #ffffff;
    box-shadow: var(--shadow-md);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.1);
}

.btn-danger {
    background: var(--danger);
    color: #ffffff;
    box-shadow: var(--shadow-md);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.1);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-icon {
    padding: 6px 8px;
    min-width: 32px;
    justify-content: center;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Form Elements */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 14px;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(44, 76, 124, 0.1);
    outline: none;
}

[data-theme="dark"] .form-input:focus,
[data-theme="dark"] .form-textarea:focus,
[data-theme="dark"] .form-select:focus {
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-light);
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.01em;
}

.card-body {
    padding: 28px;
}

.card-body-sm {
    padding: 20px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.active {
    animation: modalFadeIn 0.2s ease;
}

.modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Hidden states */
.hidden {
    display: none !important;
}

/* Transitions */
* {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

/*---------------------------------------/*
 # DASHBOARD LAYOUT
/*---------------------------------------*/

.dashboard-container {
    display: flex;
    min-height: calc(100vh - 56px);
}

.sidebar {
    width: 240px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 0 20px 16px;
    margin-bottom: 8px;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    margin: 2px 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius-md);
    position: relative;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
    transition: height 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover {
    background: var(--surface-hover);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.1) 0%, rgba(79, 70, 229, 0.05) 100%);
    color: var(--primary);
}

.nav-item.active::before {
    height: 24px;
}

.nav-icon {
    font-size: 18px;
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.nav-text {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
}

.nav-item.active .nav-text {
    color: var(--primary);
    font-weight: 700;
}

.sidebar-section {
    margin-top: 20px;
    padding: 0 20px;
}

.sidebar-section-title {
    margin: 0 0 12px 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-actions .btn {
    width: 100%;
    justify-content: flex-start;
}

.sidebar-actions .form-select {
    width: 100%;
    margin: 0;
}

.dashboard-container.sidebar-collapsed .sidebar-section {
    display: none;
}

.main-content {
    flex: 1;
    background: var(--bg);
    padding: 32px;
    overflow-y: auto;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

.view-header {
    margin-bottom: 32px;
}

.view-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
}

.view-header p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 15px;
    font-weight: 400;
}

.view-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 20px;
}

/* Dashboard View */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    align-items: start;
}

.dashboard-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--text-light);
}

.dashboard-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 13px;
}

.stats {
    display: flex;
    gap: 24px;
    justify-content: space-around;
}

.stat {
    text-align: center;
    flex: 1;
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recent-item {
    padding: 12px;
    background: var(--surface-hover);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.recent-item:hover {
    background: var(--border-light);
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 200px;
    overflow-y: auto;
}

/* Scenes View */
.scenes-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    height: calc(100vh - 200px);
}

.scenes-list {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    overflow-y: auto;
}

.scene-editor {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.scene-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    margin-bottom: 6px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    background: var(--surface);
}

.scene-item:hover {
    background: var(--surface-hover);
    border-color: var(--border);
}

.scene-item.active {
    background: var(--surface-hover);
    border-color: var(--primary);
}

.scene-emoji {
    font-size: 20px;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

.scene-info {
    flex: 1;
}

.scene-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    font-size: 14px;
}

.scene-id {
    font-size: 11px;
    color: var(--text-light);
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

.scene-actions {
    display: flex;
    gap: 8px;
}

.variable-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    gap: 16px;
}

.variable-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 0 0 auto;
    min-width: 120px;
}

.variable-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.variable-type {
    font-size: 11px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.variable-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: flex-end;
}

.variable-value-input {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg);
    color: var(--text-primary);
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-weight: 600;
    font-size: 13px;
    width: 120px;
    transition: all 0.2s ease;
}

.variable-value-input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.variable-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.variable-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.variable-checkbox span {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

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

.editor-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.editor-header p {
    color: var(--text-light);
    margin: 0;
    font-family: monospace;
}

.editor-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.choices-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.choice-item {
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
}

.choice-header {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.choice-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
}

.choice-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.editor-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

/* Variables View */
.variables-container {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.variables-list {
    display: grid;
    gap: 16px;
}

/* Play View */
.play-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    height: calc(100vh - 200px);
}

.play-sidebar {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.play-sidebar h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 20px 0;
}

.play-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.play-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.story-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.story-header {
    margin-bottom: 32px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 20px;
}

.story-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.story-scene-id {
    font-size: 14px;
    color: var(--text-secondary);
    font-family: monospace;
    margin: 0;
}

.story-text {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 32px;
    white-space: pre-line;
}

.story-choices {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.choice-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    color: var(--text-primary);
    text-align: left;
    width: 100%;
}

.choice-btn:hover {
    background: var(--surface-hover);
    border-color: var(--primary);
    transform: translateX(4px);
}

.choice-btn-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}

.stat-item {
    background: var(--surface-hover);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: capitalize;
}

/* Settings View */
.settings-container {
    max-width: 600px;
}

.settings-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.settings-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 20px 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .scenes-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .play-container {
        grid-template-columns: 1fr;
        height: auto;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 56px;
        left: -240px;
        height: calc(100vh - 56px);
        width: 240px;
        z-index: 1000;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-lg);
    }
    
    .dashboard-container.sidebar-open .sidebar {
        left: 0;
    }
    
    .dashboard-container.sidebar-open::before {
        content: '';
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .stats {
        justify-content: space-around;
    }
    
    .view-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Sidebar collapse states */
.dashboard-container.sidebar-collapsed .sidebar {
    width: 60px;
}

.dashboard-container.sidebar-collapsed .sidebar .sidebar-header h2,
.dashboard-container.sidebar-collapsed .sidebar .nav-text {
    display: none;
}

.dashboard-container.sidebar-collapsed .sidebar .nav-item {
    justify-content: center;
    padding: 12px;
}

.dashboard-container.sidebar-collapsed .sidebar .nav-icon {
    margin-right: 0;
}

.dashboard-container.sidebar-collapsed .main-content {
    margin-left: 60px;
}

/* Compact variables on larger displays */
@media (min-width: 1024px) {
    .variable-item {
        gap: 8px;
        padding: 8px 12px;
    }

    .variable-info {
        flex-direction: row;
        gap: 8px;
        align-items: center;
        min-width: 80px;
    }

    .variable-value-input {
        width: 80px;
    }

    .variables-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Toast Notifications */
@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100px);
        opacity: 0;
    }
}

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    font-weight: 500;
    animation: slideInUp 0.3s ease;
}
