.text-processor {
    max-width: 1000px;
    margin: 0 auto;
}

.input-section {
    margin-bottom: 2rem;
}

.input-section h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

#inputText {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.3s ease;
}

#inputText:focus {
    outline: none;
    border-color: var(--primary-color);
}

.input-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.options-section {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.options-section h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.option-group {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
}

.option-group h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.checkbox-label:last-child,
.radio-label:last-child {
    margin-bottom: 0;
}

.checkbox-label input[type="checkbox"],
.radio-label input[type="radio"] {
    display: none;
}

.checkmark,
.radio-mark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    margin-right: 0.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.checkmark {
    border-radius: 4px;
}

.radio-mark {
    border-radius: 50%;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.radio-label input[type="radio"]:checked + .radio-mark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.radio-mark::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after,
.radio-label input[type="radio"]:checked + .radio-mark::after {
    opacity: 1;
}

.sort-options {
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
}

.number-options {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.number-options label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
}

.number-options select {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.action-section {
    text-align: center;
    margin-bottom: 2rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    transform: translateY(-2px);
}

.output-section {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.output-header h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.output-actions {
    display: flex;
    gap: 0.5rem;
}

.statistics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

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

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stat-value {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
}

.output-content {
    position: relative;
}

#outputText {
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
}

.info-section {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.info-section h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.info-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-section li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    line-height: 1.6;
    border-bottom: 1px solid var(--border-color);
}

.info-section li:last-child {
    border-bottom: none;
}

.info-section li strong {
    color: var(--text-primary);
}

/* Copy feedback */
.btn.copied {
    background: var(--success-color) !important;
    color: white !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .input-actions,
    .output-actions {
        flex-direction: column;
    }
    
    .output-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .statistics {
        grid-template-columns: 1fr;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --success-color: #10b981;
    }
}