/* Instant Text Cleaner Tool - Main Styles */
.instant-text-cleaner-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.itc-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
    overflow: hidden;
}

.itc-input-section,
.itc-output-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.itc-input-section h3,
.itc-output-section h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5em;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f2f5;
}

.itc-textarea {
    width: 100%;
    min-height: 200px;
    padding: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 15px;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fafbfc;
    color: #333;
    box-sizing: border-box;
}

.itc-textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: #fff;
}

#itc-output-text {
    background: #f8fafc;
    border-color: #d1e9ff;
    color: #2c3e50;
}

.itc-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    margin-top: 10px;
}

.itc-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    text-decoration: none;
    user-select: none;
}

.itc-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.itc-btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    flex: 1;
}

.itc-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9, #2573a7);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.itc-btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #e9ecef;
    flex: 1;
}

.itc-btn-secondary:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-1px);
}

.itc-btn-success {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    flex: 1;
}

.itc-btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #27ae60, #219653);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.2);
}

.itc-btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    flex: 1;
}

.itc-btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.2);
}

.itc-checkbox-option {
    margin-left: auto;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.itc-checkbox-option label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

.itc-checkbox-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3498db;
}

.itc-message {
    padding: 15px;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
    margin-top: 15px;
    display: none;
    animation: fadeIn 0.3s ease;
}

.itc-message.success {
    background: #d5edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.itc-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.itc-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    display: block;
}

/* Responsive Design */
@media (min-width: 768px) {
    .itc-container {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    
    .itc-textarea {
        min-height: 300px;
    }
    
    .itc-btn {
        flex: 0 1 auto;
        min-width: 180px;
    }
    
    .itc-btn-primary,
    .itc-btn-secondary {
        flex: 1;
    }
}

@media (max-width: 767px) {
    .itc-container {
        padding: 20px;
        gap: 25px;
    }
    
    .itc-action-buttons {
        flex-direction: column;
    }
    
    .itc-btn {
        width: 100%;
    }
    
    .itc-checkbox-option {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .instant-text-cleaner-wrapper {
        padding: 10px;
    }
    
    .itc-container {
        padding: 15px;
    }
    
    .itc-input-section h3,
    .itc-output-section h3 {
        font-size: 1.3em;
    }
    
    .itc-textarea {
        padding: 15px;
        font-size: 14px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state */
.itc-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.itc-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}