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

:root {
    --primary-color: #3182ce;
    --primary-hover: #2c5aa0;
    --secondary-bg: #f7fafc;
    --secondary-hover: #edf2f7;
    --border-color: #e2e8f0;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --success-bg: #d4edda;
    --success-text: #155724;
    --success-border: #c3e6cb;
    --error-bg: #f8d7da;
    --error-text: #721c24;
    --error-border: #f5c6cb;
    --info-bg: #d1ecf1;
    --info-text: #0c5460;
    --info-border: #bee5eb;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f8f9fa;
    color: var(--text-primary);
    min-height: 100vh;
}

/* Header Styles */
.header {
    background: white;
    border-bottom: 2px solid var(--border-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-decoration: none;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.logo-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Navigation */
.main-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-link:hover {
    background: var(--secondary-bg);
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
    background: var(--secondary-bg);
}

/* Container */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

/* Workspace */
.workspace {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.workspace-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.workspace-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.workspace-description {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Controls */
.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

button {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

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

button.secondary {
    background: var(--secondary-bg);
    color: var(--text-secondary);
}

button.secondary:hover {
    background: var(--secondary-hover);
}

button.danger {
    background: #e53e3e;
}

button.danger:hover {
    background: #c53030;
}

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

/* Editor Layout */
.editor-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    min-height: 500px;
}

.editor-panel {
    display: flex;
    flex-direction: column;
}

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

.panel-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.char-count {
    font-size: 0.75rem;
    color: #a0aec0;
    font-family: 'Fira Code', monospace;
}

textarea {
    flex: 1;
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    resize: vertical;
    min-height: 500px;
    background: #f8f9fa;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
}

textarea.error {
    border-color: #e53e3e;
}

/* Status Messages */
.status-bar {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 0.85rem;
    display: none;
}

.status-bar.show {
    display: block;
}

.status-bar.success {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid var(--success-border);
}

.status-bar.error {
    background: var(--error-bg);
    color: var(--error-text);
    border: 1px solid var(--error-border);
}

.status-bar.info {
    background: var(--info-bg);
    color: var(--info-text);
    border: 1px solid var(--info-border);
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 10px;
    }

    .main-nav {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .nav-link {
        width: 100%;
        text-align: center;
    }

    .controls {
        flex-direction: column;
    }

    button {
        width: 100%;
    }

    .editor-layout {
        gap: 15px;
    }

    textarea {
        min-height: 350px;
    }
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}
