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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.tagline {
    font-size: 1.2em;
    opacity: 0.9;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 500px;
}

.editor-section,
.output-section {
    display: flex;
    flex-direction: column;
}

.editor-section {
    border-right: 2px solid #e0e0e0;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.toolbar h2 {
    font-size: 1.2em;
    color: #333;
}

.toolbar-buttons {
    display: flex;
    gap: 10px;
}

.example-selector {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 14px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.code-editor {
    flex: 1;
    padding: 20px;
    border: none;
    resize: none;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.6;
    outline: none;
}

.output-area {
    flex: 1;
    padding: 20px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.6;
    background: #1e1e1e;
    color: #00ff00;
    overflow-y: auto;
}

.output-placeholder {
    color: #666;
    font-style: italic;
}

.output-success {
    color: #00ff00;
    white-space: pre-wrap;
}

.output-error {
    color: #ff4444;
    white-space: pre-wrap;
}

.info-section {
    padding: 30px;
    background: #f9f9f9;
}

.info-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.reference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.reference-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.reference-card h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.reference-card pre {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    font-size: 12px;
    overflow-x: auto;
    border-left: 3px solid #667eea;
}

footer {
    text-align: center;
    padding: 20px;
    background: #333;
    color: white;
}

footer p {
    margin: 5px 0;
}

footer code {
    background: #444;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 968px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .editor-section {
        border-right: none;
        border-bottom: 2px solid #e0e0e0;
    }
    
    .reference-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    header h1 {
        font-size: 1.8em;
    }
    
    .tagline {
        font-size: 1em;
    }
    
    .toolbar {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .toolbar-buttons {
        flex-direction: column;
    }
}