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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: #333;
}

.header {
    background: linear-gradient(135deg, #059598 0%, #013f54 100%);
    color: white;
    padding: 30px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.breadcrumb {
    margin-bottom: 20px;
    padding: 15px 0;
    font-size: 0.95rem;
}

.breadcrumb a {
    color: #059598;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #013f54;
    text-decoration: underline;
}

.breadcrumb .separator {
    margin: 0 8px;
    color: #999;
}

.breadcrumb .current {
    color: #666;
    font-weight: 600;
}

/* Plot Section */
.plot-section {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.plot-container {
    padding: 20px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

#plot-output {
    width: 100%;
    max-width: 100%;
}

#plot-output canvas {
    max-width: 100%;
    height: auto !important;
    display: block;
    margin: 0 auto;
}

.plot-empty {
    color: #999;
    text-align: center;
    padding: 40px;
}

.plot-empty i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

/* Editor Container */
.editor-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 0;
}

.panel {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
}

.panel-header {
    background: linear-gradient(135deg, #059598 0%, #013f54 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-content {
    padding: 0;
}

.CodeMirror {
    height: 500px;
    font-size: 14px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.output-area {
    height: 500px;
    padding: 20px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    overflow-y: auto;
    background: #1e1e1e;
    color: #d4d4d4;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.controls {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-run {
    background: linear-gradient(135deg, #059598 0%, #013f54 100%);
    color: white;
}

.btn-run:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(5, 149, 152, 0.3);
}

.btn-run:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-clear {
    background: #6c757d;
    color: white;
}

.btn-clear:hover {
    background: #5a6268;
}

.status {
    padding: 10px 20px;
    background: #e9ecef;
    border-top: 1px solid #dee2e6;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-loading {
    background: #f69318;
}

.status-ready {
    background: #28a745;
}

.status-error {
    background: #dc3545;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.examples {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.examples h3 {
    color: #013f54;
    margin-bottom: 15px;
}

.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.example-card {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #059598;
    cursor: pointer;
    transition: all 0.3s ease;
}

.example-card:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.example-card h4 {
    color: #013f54;
    margin-bottom: 5px;
    font-size: 1rem;
}

.example-card p {
    color: #666;
    font-size: 0.9rem;
}

@media (max-width: 1024px) {
    .editor-container {
        grid-template-columns: 1fr;
    }

    .CodeMirror {
        height: 400px;
    }

    .output-area {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.5rem;
    }

    .header p {
        font-size: 1rem;
    }

    .CodeMirror {
        height: 300px;
    }

    .output-area {
        height: 300px;
    }

    .controls {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .plot-container {
        min-height: 300px;
    }
}
/* Shortcuts Panel */
.shortcuts-panel {
    background: white;
    border-radius: 10px;
    padding: 0;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
}

.shortcuts-content {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.shortcut-item:hover {
    background: #e9ecef;
    transform: translateX(3px);
}

.shortcut-item kbd {
    background: linear-gradient(135deg, #059598 0%, #013f54 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 5px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    min-width: 80px;
    text-align: center;
    white-space: nowrap;
}

.shortcut-item span {
    color: #666;
    font-size: 0.95rem;
    flex: 1;
}

@media (max-width: 768px) {
    .shortcuts-content {
        grid-template-columns: 1fr;
    }
    
    .shortcut-item kbd {
        min-width: 100px;
    }
}
