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

body {
    font-family: 'Courier New', 'Segoe UI', monospace;
    background: #ffffff;
    min-height: 100vh;
    transition: background 0.2s ease, color 0.2s ease;
}

/* Тёмная тема */
body.dark {
    background: #1a1a1a;
}

body.dark .input-panel {
    background: #222;
    border-right-color: #333;
}

body.dark .input-panel h2,
body.dark .section-title,
body.dark .field label {
    color: #ddd;
}

body.dark .field input,
body.dark .field textarea,
body.dark .simple-item input,
body.dark .simple-item textarea,
body.dark .input-row input,
body.dark .category-header input,
body.dark .category-add-form input {
    background: #333;
    border-color: #555;
    color: #eee;
}

body.dark .field input:focus,
body.dark .field textarea:focus,
body.dark .simple-item input:focus,
body.dark .simple-item textarea:focus,
body.dark .input-row input:focus,
body.dark .category-header input:focus,
body.dark .category-add-form input:focus {
    border-color: #fff;
}

body.dark .tag {
    background: #444;
    border-color: #555;
    color: #eee;
}

body.dark .category-block {
    background: #2a2a2a;
    border-color: #444;
}

body.dark .output-panel {
    background: #1a1a1a;
}

body.dark .output-panel h2 {
    color: #ddd;
    border-bottom-color: #444;
}

body.dark .pure-text {
    color: #eee;
}

body.dark .counter {
    color: #888;
}

body.dark .add-btn,
body.dark .input-row button,
body.dark .category-add-form button,
body.dark .copy-main-btn {
    background: #555;
}

body.dark .add-btn:hover,
body.dark .input-row button:hover,
body.dark .category-add-form button:hover,
body.dark .copy-main-btn:hover {
    background: #777;
}

body.dark .simple-item button,
body.dark .category-header button {
    background: #c9302c;
}

body.dark .empty-message {
    color: #777;
}

.container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.input-panel {
    background: #fafafa;
    border-right: 1px solid #e0e0e0;
    padding: 40px;
    overflow-y: auto;
}

.input-panel h2 {
    font-size: 20px;
    font-weight: normal;
    margin-bottom: 30px;
    color: #333;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
}

.theme-panel {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
    /* justify-content: flex-end; */
    justify-content: flex-start;
    flex-wrap: wrap;
}

.theme-btn, .lang-btn {
    background: #333;
    color: white;
    border: none;
    padding: 5px 12px;
    cursor: pointer;
    font-family: monospace;
    font-size: 11px;
    border-radius: 0px;
}

.section {
    margin-bottom: 35px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 20px;
}

.section-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
    letter-spacing: 1px;
}

.field {
    margin-bottom: 20px;
}

.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #555;
}

.field input, 
.field textarea {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    border: 1px solid #ccc;
    background: white;
    border-radius: 0px;
}

.field input:focus, 
.field textarea:focus {
    outline: none;
    border-color: #000;
}

.counter {
    font-size: 10px;
    color: #999;
    margin-top: 4px;
    text-align: right;
}

.simple-list {
    margin-top: 10px;
}

.simple-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: flex-start;
}

.simple-item input, 
.simple-item textarea {
    flex: 1;
    padding: 8px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    border: 1px solid #ccc;
    background: white;
    border-radius: 0px;
}

.simple-item input:focus,
.simple-item textarea:focus {
    outline: none;
    border-color: #000;
}

.simple-item textarea {
    min-height: 60px;
}

.simple-item button {
    background: #d9534f;
    color: white;
    border: none;
    padding: 6px 12px;
    cursor: pointer;
    font-family: monospace;
    font-size: 11px;
    margin: 0;
    height: 34px;
    border-radius: 0px;
}

.add-btn {
    width: 100%;
    background: #333;
    color: white;
    border: none;
    padding: 8px;
    cursor: pointer;
    font-family: monospace;
    font-size: 13px;
    margin-top: 10px;
    border-radius: 0px;
}

.add-btn:hover {
    background: #555;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 10px;
    min-height: 40px;
}

.tag {
    background: #f0f0f0;
    padding: 4px 10px;
    font-size: 13px;
    font-family: monospace;
    border: 1px solid #ccc;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 0px;
}

.tag button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    color: #999;
    padding: 0;
    margin: 0;
}

.input-row {
    display: flex;
    gap: 8px;
    margin-top: 5px;
}

.input-row input {
    flex: 1;
    padding: 8px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    border: 1px solid #ccc;
    background: white;
    border-radius: 0px;
}

.input-row input:focus {
    outline: none;
    border-color: #000;
}

.input-row button {
    padding: 8px 15px;
    background: #333;
    color: white;
    border: none;
    cursor: pointer;
    font-family: monospace;
    font-size: 12px;
    margin: 0;
    border-radius: 0px;
}

.copy-main-btn {
    background: #333;
    color: white;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-family: monospace;
    font-size: 14px;
    margin-top: 10px;
    width: 100%;
    border-radius: 0px;
}

.copy-main-btn:hover {
    background: #555;
}

.clear-btn {
    background: #d9534f;
    color: white;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-family: monospace;
    font-size: 14px;
    margin-top: 10px;
    border-radius: 0px;
}

.clear-btn:hover {
    background: #c9302c;
}

body.dark .clear-btn {
    background: #c9302c;
}

body.dark .clear-btn:hover {
    background: #a94442;
}

.output-panel {
    background: white;
    /* padding: 40px; */
    padding: 86px;
    overflow-y: auto;
}

.output-panel h2 {
    font-size: 20px;
    font-weight: normal;
    margin-bottom: 30px;
    color: #333;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
}

.pure-text {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #111;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.empty-message {
    color: #999;
    font-family: monospace;
    font-style: italic;
}

.category-block {
    background: white;
    border: 1px solid #e0e0e0;
    margin-bottom: 15px;
    padding: 12px;
}

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

.category-header input {
    flex: 1;
    padding: 8px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    border: 1px solid #ccc;
    background: white;
    border-radius: 0px;
}

.category-header input:focus {
    outline: none;
    border-color: #000;
}

.category-header button {
    background: #d9534f;
    color: white;
    border: none;
    padding: 6px 12px;
    margin-left: 10px;
    cursor: pointer;
    font-family: monospace;
    font-size: 11px;
    border-radius: 0px;
}

.category-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    min-height: 30px;
}

.category-add-form {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.category-add-form input {
    flex: 1;
    padding: 8px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    border: 1px solid #ccc;
    background: white;
    border-radius: 0px;
}

.category-add-form input:focus {
    outline: none;
    border-color: #000;
}

.category-add-form button {
    padding: 8px 15px;
    background: #333;
    color: white;
    border: none;
    cursor: pointer;
    font-family: monospace;
    font-size: 12px;
    margin: 0;
    border-radius: 0px;
}

.footer {
    text-align: center;
    padding: 15px;
    font-size: 10px;
    font-family: monospace;
    border-top: 1px solid #e0e0e0;
    color: #999;
    background: #fafafa;
}

body.dark .footer {
    background: #222;
    border-top-color: #333;
    color: #777;
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }
    .input-panel, .output-panel {
        padding: 25px;
    }
    .theme-panel {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .input-panel, .output-panel {
        padding: 15px;
    }
    .simple-item {
        flex-direction: column;
    }
    .simple-item input,
    .simple-item textarea {
        width: 100%;
    }
    .simple-item button {
        align-self: flex-end;
    }
    .category-header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .category-header button {
        margin-left: 0;
        align-self: flex-end;
    }
    .input-row {
        flex-direction: column;
    }
    .input-row button {
        align-self: flex-start;
    }
    .category-add-form {
        flex-direction: column;
    }
    .section-title {
        font-size: 12px;
    }
}

@media (max-width: 320px) {
    .input-panel, .output-panel {
        padding: 12px;
    }
    .field input, .field textarea {
        font-size: 11px;
        padding: 6px;
    }
    .pure-text {
        font-size: 11px;
    }
    .footer {
        font-size: 9px;
        padding: 10px;
    }
}

/* ========== КЛАССЫ ДЛЯ TEXTAREA ========== */

/* Только для поля "О себе" */
.about-textarea {
    max-height: 400px;
    min-height: 100px;
    resize: vertical;
}

/* Только для textarea в образовании */
.education-textarea {
    resize: vertical;
    max-height: 200px;
    min-height: 60px;
}