:root {
    /* Color System - ARIA-friendly colors with higher contrast */
    --primary-hue: 238;
    --primary-color: hsl(var(--primary-hue), 80%, 50%); /* Darker blue for better contrast */
    --primary-hover: hsl(var(--primary-hue), 85%, 45%);
    --primary-active: hsl(var(--primary-hue), 90%, 40%);
    --primary-light: hsl(var(--primary-hue), 60%, 92%);
    --primary-dark: hsl(var(--primary-hue), 90%, 35%);
    
    --success-color: hsl(142, 75%, 35%); /* Darker green */
    --warning-color: hsl(30, 95%, 40%); /* Darker orange */
    --error-color: hsl(354, 85%, 44%); /* Darker red */
    --info-color: hsl(200, 90%, 40%); /* Darker blue */
    
    --background-color: hsl(210, 20%, 98%);
    --card-background: hsl(0, 0%, 100%);
    --sidebar-bg: hsl(220, 25%, 12%); /* Darker for better contrast with text */
    --sidebar-hover: hsl(220, 20%, 20%);
    
    --text-color: hsl(220, 25%, 15%); /* Darker for better contrast */
    --text-muted: hsl(220, 10%, 45%); /* Darker for better contrast */
    --text-light: hsl(220, 10%, 96%);
    --text-lighter: hsl(0, 0%, 100%);
    
    --border-color: hsl(220, 15%, 85%);
    --divider-color: hsl(220, 15%, 90%);
    
    /* Elevation/Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px 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);
    
    /* Typography */
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    --font-family-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    
    /* Border Radius */
    --radius-xs: 0.125rem;
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-3xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    
    /* Transitions */
    --transition-normal: all 0.2s ease-in-out;
    --transition-slow: all 0.3s ease-in-out;
    
    /* App Layout */
    --sidebar-width: 240px;
    --header-height: 64px;
    --footer-height: 48px;
    
    /* Z-index layers */
    --z-sidebar: 100;
    --z-header: 90;
    --z-modal: 1000;
    --z-toast: 2000;
}

/* Dark Mode Theme Variables - ARIA-friendly with higher contrast */
body.dark-theme {
    --primary-color: hsl(var(--primary-hue), 80%, 65%); /* Brighter blue for dark mode */
    --primary-hover: hsl(var(--primary-hue), 85%, 70%);
    --primary-active: hsl(var(--primary-hue), 90%, 60%);
    --primary-light: hsl(var(--primary-hue), 40%, 25%); /* Slightly lighter for better visibility */
    --primary-dark: hsl(var(--primary-hue), 75%, 75%); /* Much lighter for contrast */
    
    --success-color: hsl(142, 75%, 45%); /* Brighter for dark mode */
    --warning-color: hsl(30, 95%, 50%); /* Brighter for dark mode */
    --error-color: hsl(354, 85%, 54%); /* Brighter for dark mode */
    --info-color: hsl(200, 90%, 50%); /* Brighter for dark mode */
    
    --background-color: hsl(220, 15%, 9%);
    --card-background: hsl(220, 15%, 13%);
    --sidebar-bg: hsl(220, 15%, 8%);
    --sidebar-hover: hsl(220, 15%, 15%);
    
    --text-color: hsl(220, 15%, 95%); /* Lighter for better contrast in dark mode */
    --text-muted: hsl(220, 10%, 70%); /* Lighter for better contrast */
    --text-light: hsl(220, 15%, 50%);
    --text-lighter: hsl(220, 10%, 95%);
    
    --border-color: hsl(220, 15%, 22%); /* More visible borders */
    --divider-color: hsl(220, 15%, 20%);
    
    /* Adjust shadows for dark mode */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

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

html, body {
    height: 100%;
    width: 100%;
    overscroll-behavior: none;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: var(--transition-normal);
}

/* --- App Layout Structure --- */
.app-wrapper {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: var(--text-lighter);
    display: flex;
    flex-direction: column;
    padding: var(--space-4);
    z-index: var(--z-sidebar);
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.brand {
    display: flex;
    align-items: center;
    padding: var(--space-5) var(--space-3);
    margin-bottom: var(--space-6);
}

.logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: var(--space-3);
}

.brand-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0;
}

.brand-text h1 span {
    color: var(--primary-color);
}

.version {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: -2px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    margin-bottom: auto;
    gap: var(--space-1);
}

.nav-item {
    display: flex;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
}

.nav-item i {
    margin-right: var(--space-3);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.nav-item:hover {
    background-color: var(--sidebar-hover);
    color: var(--text-lighter);
}

.nav-item.active {
    background-color: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
}

.powered-by {
    padding: var(--space-4);
    margin-top: var(--space-8);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    border-top: 1px solid var(--sidebar-hover);
}

.tech-logos {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-2);
    font-size: 1.2rem;
}

/* --- Main Content Area --- */
.main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Top Bar */
.top-bar {
    height: var(--header-height);
    padding: 0 var(--space-5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--card-background);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-xs);
    z-index: var(--z-header);
    transition: var(--transition-normal);
}

.status-indicator {
    display: flex;
    align-items: center;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-full);
    background-color: var(--primary-light);
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 600; /* Increased weight for better readability */
    transition: var(--transition-normal);
}

.status-indicator i {
    margin-right: var(--space-2);
}

.status-indicator.error {
    background-color: hsla(354, 90%, 58%, 0.15); /* Increased opacity for better contrast */
    color: var(--error-color);
    border: 1px solid hsla(354, 90%, 58%, 0.3); /* Added border for better visibility */
}

.status-indicator.success {
    background-color: hsla(152, 80%, 45%, 0.15); /* Increased opacity for better contrast */
    color: var(--success-color);
    border: 1px solid hsla(152, 80%, 45%, 0.3); /* Added border for better visibility */
}

.status-indicator.warning {
    background-color: hsla(38, 92%, 50%, 0.15); /* Increased opacity for better contrast */
    color: var(--warning-color);
    border: 1px solid hsla(38, 92%, 50%, 0.3); /* Added border for better visibility */
}

.status-indicator.info {
    background-color: hsla(200, 98%, 60%, 0.15); /* Increased opacity for better contrast */
    color: var(--info-color);
    border: 1px solid hsla(200, 98%, 60%, 0.3); /* Added border for better visibility */
}

.actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.action-button {
    display: flex;
    align-items: center;
    padding: var(--space-2) var(--space-4);
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-normal);
}

.action-button:hover {
    background-color: var(--primary-hover);
}

.action-button:active {
    background-color: var(--primary-active);
}

.action-button i {
    margin-right: var(--space-2);
}

.action-button:disabled {
    background-color: var(--text-light);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Theme toggle switch */
.theme-toggle {
    position: relative;
    display: flex;
}

.theme-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.theme-toggle label {
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 50px;
    height: 24px;
    background-color: var(--background-color);
    border-radius: var(--radius-full);
    padding: 0 var(--space-1);
    transition: var(--transition-normal);
}

.theme-toggle label::after {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: var(--primary-color);
    border-radius: 50%;
    transition: var(--transition-normal);
}

.theme-toggle input:checked + label::after {
    transform: translateX(26px);
}

.theme-toggle label i {
    font-size: 12px;
    color: var(--text-muted);
    z-index: 1;
}

.theme-toggle label i:first-child {
    color: var(--warning-color);
}

.theme-toggle label i:last-child {
    color: var(--text-muted);
}

.theme-toggle input:checked + label i:first-child {
    color: var(--text-muted);
}

.theme-toggle input:checked + label i:last-child {
    color: var(--primary-color);
}

/* Tab Content */
.tab-content {
    display: none;
    flex-direction: column;
    padding: var(--space-6);
    transition: var(--transition-normal);
    opacity: 0;
    transform: translateY(10px);
}

.tab-content.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.tab-header {
    margin-bottom: var(--space-6);
}

.tab-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: var(--space-2);
}

.tab-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.tab-header h2 i {
    margin-right: var(--space-2);
    color: var(--primary-color);
}

/* Recorder Tab */
.recorder-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-8);
    padding: var(--space-6) 0;
}

.microphone-visualizer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.microphone-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: var(--space-4);
}

.microphone-icon {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 2;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
    /* Improve ARIA accessibility with better focus indication */
    outline: 3px solid transparent;
}

.microphone-icon:hover {
    transform: scale(1.05);
}

.microphone-icon:focus, .microphone-icon:focus-visible {
    outline: 3px solid var(--primary-dark);
    outline-offset: 3px;
}

.microphone-icon.recording {
    background-color: var(--error-color);
    animation: pulse-light 2s infinite;
    /* Add a clear visual indicator beyond just color */
    border: 3px solid white;
}

.recording-pulse {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background-color: var(--error-color);
    opacity: 0;
    transform: scale(1);
    z-index: 1;
}

.recording-pulse.active {
    animation: pulse-out 2s infinite;
}

.recording-waves {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.recording-waves.active {
    opacity: 1;
}

.recording-waves span {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(255, 82, 82, 0.2);
    animation: wave 3s infinite;
}

.recording-waves span:nth-child(1) {
    animation-delay: 0.4s;
}

.recording-waves span:nth-child(2) {
    animation-delay: 0.8s;
}

.recording-waves span:nth-child(3) {
    animation-delay: 1.2s;
}

.recording-waves span:nth-child(4) {
    animation-delay: 1.6s;
}

@keyframes wave {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes pulse-out {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes pulse-light {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.record-status {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: var(--space-2);
}

.controls {
    display: flex;
    gap: var(--space-4);
    width: 100%;
    max-width: 400px;
}

.control-button {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    font-family: var(--font-family);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.control-button.start {
    background-color: var(--primary-color);
    color: white;
}

.control-button.start:hover:not(:disabled) {
    background-color: var(--primary-hover);
}

.control-button.stop {
    background-color: var(--error-color);
    color: white;
}

.control-button.stop:hover:not(:disabled) {
    background-color: hsl(354, 85%, 53%);
}

.control-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Transcript Section */
.transcript-container {
    background-color: var(--card-background);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-top: var(--space-6);
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
    height: 250px;
}

.transcript-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-5);
    background-color: var(--background-color);
    border-bottom: 1px solid var(--border-color);
}

.transcript-header h3 {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.transcript-badge {
    padding: var(--space-1) var(--space-2);
    background-color: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.transcript-badge.processing {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--info-color);
}

.transcript-badge.final {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.transcript-content {
    padding: 0;
    height: calc(100% - 43px);
    overflow: hidden;
}

.transcript-text {
    font-family: var(--font-family-mono);
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--text-color);
    padding: var(--space-5);
    margin: 0;
    height: 100%;
    overflow-y: auto;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    background-color: transparent;
    border: none;
}

/* Diagram Tab */
.diagram-container {
    background-color: var(--card-background);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 550px;
    transition: var(--transition-normal);
}

.diagram-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-5);
    background-color: var(--background-color);
    border-bottom: 1px solid var(--border-color);
}

.diagram-type {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
}

.diagram-actions, .docs-actions {
    display: flex;
    gap: var(--space-1);
}

.diagram-action, .docs-action {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
    color: var(--text-muted);
}

.diagram-action:hover, .docs-action:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.diagram-content {
    flex: 1;
    overflow: auto;
    padding: var(--space-6);
    position: relative;
}

.mermaid {
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    overflow: auto;
    border: none;
    padding: 0;
}

.mermaid svg {
    max-width: 100%;
    height: auto;
    transition: var(--transition-normal);
}

/* Documentation Tab */
.docs-container {
    background-color: var(--card-background);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 550px;
    transition: var(--transition-normal);
}

.docs-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-5);
    background-color: var(--background-color);
    border-bottom: 1px solid var(--border-color);
}

.docs-format {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
}

.docs-content {
    flex: 1;
    overflow: auto;
    padding: 0;
    position: relative;
}

.docs-text {
    font-family: var(--font-family-mono);
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--text-color);
    padding: var(--space-5);
    margin: 0;
    height: 100%;
    overflow-y: auto;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    background-color: transparent;
    border: none;
}

/* Help Tab */
.help-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.help-section {
    background-color: var(--card-background);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.help-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--primary-dark);
}

.help-section h3 i {
    color: var(--primary-color);
}

.help-section ol, .help-section ul {
    margin-left: var(--space-5);
}

.help-section li {
    margin-bottom: var(--space-2);
    line-height: 1.6;
}

.help-section strong {
    color: var(--primary-dark);
    font-weight: 600;
}

/* Toasts */
.toast-container {
    position: fixed;
    bottom: var(--space-5);
    right: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    z-index: var(--z-toast);
}

.toast {
    display: flex;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    background-color: var(--card-background);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: slide-in 0.3s ease-out forwards;
    max-width: 300px;
}

.toast-content {
    margin-left: var(--space-3);
    font-size: 0.875rem;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.toast-message {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.toast-close {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.toast.success {
    border-left-color: var(--success-color);
}

.toast.error {
    border-left-color: var(--error-color);
}

.toast.warning {
    border-left-color: var(--warning-color);
}

.toast.info {
    border-left-color: var(--info-color);
}

@keyframes slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--card-background);
    border-radius: var(--radius-lg);
    overflow: hidden;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-xl);
    transform: translateY(20px);
    transition: all 0.3s ease-in-out;
}

.modal.show .modal-content {
    transform: translateY(0);
}

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

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-body {
    padding: var(--space-5);
}

.export-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-3);
}

.export-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-4);
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
}

.export-option:hover {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.export-option i {
    font-size: 2rem;
    margin-bottom: var(--space-3);
    color: var(--primary-color);
}

.export-option span {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 200px;
    }
}

@media (max-width: 768px) {
    .app-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: 60px;
        flex-direction: row;
        align-items: center;
        padding: 0 var(--space-4);
    }
    
    .brand {
        margin-bottom: 0;
        padding: var(--space-2);
    }
    
    .brand-text h1 {
        font-size: 1rem;
    }
    
    .nav-menu {
        flex-direction: row;
        margin-bottom: 0;
        overflow-x: auto;
        gap: var(--space-2);
        padding: 0 var(--space-2);
    }
    
    .nav-item {
        padding: var(--space-2) var(--space-3);
        white-space: nowrap;
    }
    
    .nav-item i {
        margin-right: var(--space-2);
    }
    
    .powered-by {
        display: none;
    }
    
    .main-content {
        height: calc(100vh - 60px);
    }
    
    .tab-content {
        padding: var(--space-4);
    }
}

@media (max-width: 640px) {
    .actions {
        gap: var(--space-2);
    }
    
    .action-button span {
        display: none;
    }
    
    .action-button i {
        margin-right: 0;
    }
    
    .controls {
        flex-direction: column;
        gap: var(--space-3);
    }
    
    .diagram-container, .docs-container {
        height: 450px;
    }
    
    .diagram-type, .docs-format {
        display: none;
    }
}