:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --background-color: #f8fafc;
    --card-background: #ffffff;
    --text-color: #1e293b;
    --border-color: #e2e8f0;
    --button-text: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --editor-background: #ffffff;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    width: 100%;
    flex: 1;
}

.editor-container {
    background: var(--card-background);
    border-radius: 1rem;
    box-shadow: 0 4px 6px var(--shadow-color);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.editor-wrapper {
    height: 400px;
    border-bottom: 1px solid var(--border-color);
}

#editor {
    height: 100%;
    width: 100%;
}

.controls {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.button-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.btn {
    background-color: var(--primary-color);
    color: var(--button-text);
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

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

.info-panel {
    background: var(--card-background);
    border-radius: 1rem;
    box-shadow: 0 4px 6px var(--shadow-color);
    padding: 1.5rem;
}

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

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #64748b;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
}

@media (max-width: 640px) {
    .container {
        margin: 1rem auto;
    }
    
    .button-group {
        grid-template-columns: 1fr;
    }
    
    .stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}
