/* css/style.css */
:root {
    --bg-color: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --error: #ef4444;
    --success: #10b981;
    --radius: 8px;
    --list-hover: #f1f5f9;
    --list-selected: #e0e7ff;
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --card-bg: #1e293b;
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --list-hover: #334155;
    --list-selected: #1e3a8a;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: "Vazirmatn", sans-serif;
    line-height: 1.5;
    padding: 2rem 1rem;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 700px;
    margin: 0 auto;
}

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

.header {
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.hidden {
    display: none !important;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-main);
}

.input-control {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-main);
    background-color: var(--card-bg);
    transition: border-color 0.2s;
}

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

.file-input {
    padding: 0.5rem;
    background-color: var(--bg-color);
    border: 1px dashed var(--border-color);
    cursor: pointer;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

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

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-icon {
    background: transparent;
    font-size: 1.2rem;
    padding: 0.5rem;
    cursor: pointer;
    border: none;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--success);
    color: white;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: bold;
}

.message-list-container {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background-color: var(--bg-color);
}

.message-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.9rem;
}

.message-item:last-child {
    border-bottom: none;
}

.message-item:hover {
    background-color: var(--list-hover);
}

.message-item.selected {
    background-color: var(--list-selected);
    border-right: 3px solid var(--primary);
}

.output-box {
    background-color: #0f172a;
    color: #f8fafc;
    padding: 1.25rem;
    border-radius: var(--radius);
    border: 1px solid #334155;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
    white-space: pre-wrap;
    min-height: 80px;
    text-align: start;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.text-error {
    color: #fca5a5;
    display: block;
    margin-bottom: 0.25rem;
}

.text-success {
    color: #6ee7b7;
    display: block;
    margin-bottom: 0.25rem;
}

.text-highlight {
    color: #93c5fd;
    font-weight: 700;
    background: rgba(147, 197, 253, 0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

.select-all {
    user-select: all;
}