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

:root {
    --primary: #6366f1;
    --success: #10b981;
    --danger: #ef4444;
    --bg: #0f172a;
    --panel: #1e293b;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

.header {
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    padding: 14px 24px;
    flex-shrink: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 28px;
}

.logo h1 {
    font-size: 22px;
    font-weight: 700;
}

.tagline {
    font-size: 11px;
    color: var(--text-muted);
}

.header-stats {
    display: flex;
    gap: 28px;
}

.stat {
    text-align: right;
}

.stat span:first-child {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.stat span:last-child {
    font-size: 10px;
    color: var(--text-muted);
}

.toolbar {
    background: #1a2332;
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    flex-shrink: 0;
}

.find-replace {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.input-row {
    display: flex;
    gap: 16px;
}

.field {
    flex: 1;
}

.field label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.field input {
    width: 100%;
    padding: 10px 14px;
    background: #0f172a;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 15px;
}

.field input:focus {
    outline: none;
    border-color: var(--primary);
}

.options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.options {
    display: flex;
    gap: 20px;
}

.option {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
}

.option input {
    accent-color: var(--primary);
}

.actions {
    display: flex;
    gap: 8px;
}

.btn {
    padding: 9px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary { background: var(--primary); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-secondary { background: #475569; color: white; }

.btn:hover { filter: brightness(1.1); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

.editor-area {
    flex: 1;
    display: flex;
    overflow: hidden;
    padding: 20px;
    gap: 20px;
}

.editor-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: #1a2332;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 14px;
}

.panel-actions {
    display: flex;
    gap: 6px;
}

textarea {
    flex: 1;
    padding: 18px;
    background: #0f172a;
    border: none;
    resize: none;
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

textarea:focus {
    outline: none;
}

#result-text {
    background: #111827;
}

.editor-footer {
    padding: 8px 18px;
    background: #1a2332;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

.status-bar {
    background: var(--panel);
    border-top: 1px solid var(--border);
    padding: 10px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    flex-shrink: 0;
}

#status-message {
    color: var(--text-muted);
}
