:root {
    --bg-color: #f8fafc;
    --text: #334155;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --border: #cbd5e1;
    --card-bg: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem;
}

.container {
    width: 100%;
    max-width: 900px;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
}

.highlight {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-thickness: 4px;
    text-underline-offset: 4px;
}

.subtitle {
    color: #64748b;
    margin-top: 0.5rem;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tool-btn {
    background: #f1f5f9;
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    transition: all 0.2s;
}

.tool-btn:hover,
.tool-btn:focus {
    background: white;
    border-color: var(--primary);
    color: var(--primary);
    outline: none;
}

.divider {
    width: 1px;
    background: var(--border);
    margin: 0 0.5rem;
}

.editor-area {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

textarea {
    width: 100%;
    min-height: 400px;
    padding: 1.5rem;
    border: none;
    resize: vertical;
    font-family: 'Roboto Mono', monospace;
    font-size: 1rem;
    line-height: 1.6;
    color: #334155;
    outline: none;
}

textarea:focus {
    background: #f8fafc;
}

.stats-bar {
    background: #f1f5f9;
    padding: 0.75rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 2rem;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

.actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.primary-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.primary-btn:hover,
.primary-btn:focus {
    background: var(--primary-hover);
    outline: none;
}

.secondary-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: #64748b;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.secondary-btn:hover,
.secondary-btn:focus {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fca5a5;
    outline: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}